Rajat,

The IndexSet given by DoF_Handler::locally_owned_dofs gives a 
non-overlapping partitioning of the dofs.
Therefore, you are safe if you just modify values at locally owned dofs of 
a distributed vector.
Note, that you normally are not allowed to modify a ghosted vector at all, 
but need a non-ghosted one for that and
assign afterwards. If you write to the non-ghosted vector, you are only 
allowed to do so at the locally owned dofs and IndexSet::is_element
is a appropriate way to do so.

The mesh movement code does something different as the vertex positions are 
purely local values. In particular, they do not belong
to a distributed Vector as explained above.

Best,
Daniel

Am Samstag, 28. Mai 2016 22:34:41 UTC+2 schrieb RAJAT ARORA:
>
> Hi Daniel,
> Thanks for your prompt reply.
>
> While in case of mesh movement, the vertices are independent. However, if 
> want to add something to the solution vector at dofs of a vertex shared 
> between processors, 
> This mesh movement code wont be able to do that, It will add that value 
> twice for the dofs at the shared vertex.
>
> What could be an ideal way to do that?
>
> Will checking that the dof is a locally owned dof by using the is_element 
> of the indexset of locally owned dofs help ?
> Will this be slow ?
>
>
> On Wednesday, May 25, 2016 at 7:19:27 AM UTC-4, Daniel Arndt wrote:
>>
>> Dear Rajat,
>>
>> After the mesh partitioning is done, in a 
>> parallel::distributed::Triangulation the local meshes are independent of 
>> each other. In particular, moving a vertex on one process does not change 
>> anything for all the other processes.
>> Therefore, it is necessary to move the vertices of a given face on all 
>> processes that have a cell that has this face as it is done in step-42.
>>
>> Of course, there is as well 
>> parallel::distributed::communicate_locally_moved_vertices[1] to synchronize 
>> changes in vertex positions if you don't keep track of this yourself.
>>
>> Best,
>> Daniel
>>
>> [1] 
>> https://www.dealii.org/8.4.0/doxygen/deal.II/classparallel_1_1distributed_1_1Triangulation.html#a247598f1323a9f847832e60d6c840469
>>
>

-- 
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