Dear Daniel

Thank you. You really help me. 

Best,
Pasha

On Friday, July 1, 2016 at 5:21:08 PM UTC+4:30, Daniel Arndt wrote:
>
> Pasha,
>
> First of all: The sum of values in the right-hand side vector only 
> corresponds to a sum of values of the represented right-hand side function, 
> if you use interpolating Finite Elements (such as FE_Q).
> Furthermore, you have to be sure that you are really interested in the 
> values and not in the integral over the boundary or something similar.
>
> Apart from the last issue you mentioned, your approach seems to be correct 
> but is not really efficient.
> For summing up all the values in the right-hand side vector corresponding 
> to degrees of freedom on the boundary, you would just want to use your 
> inner part with small modifications:
>
>         dealii::IndexSet::ElementIterator index = in_set.begin(),
>         dealii::IndexSet::ElementIterator endind = in_set.end();
>
>         dealii::IndexSet locally_owned_dofs = 
> dof_handler.locally_owned_dofs();
>
>     for (; index!=endind; ++index)
>     {
>     dealii::types::global_dof_index gdi = *index;
>         // check if this DoF is locally owned
>                 if (locally_owned_dofs.is_element(gdi))
>                   local_load -= saved_residual(gdi);
>     }
>
> Note that checking whether the DoF is locally owned, you circumvent the 
> problem of taking the same DoF in to account multiple times on different 
> MPI processes.
>
> Best,
> Daniel
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to