This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Vertex Value Manipulation Distributed Mesh

+3 votes

I need to manipulate the vertex values of a CG 1 function in parallel with a distributed mesh. My single threaded code iterates over the vertices and does some calculations which require global connectivity information. Afterwards, I use the dofmap to update the .vector() of the function.
In parallel, every dof seems to be uniquely assigned to a processor, but the same vertex can be present on different processors.

So, I would either need
a) A simple way to gather the complete distributed mesh into a serial mesh on processor 0 so I can use my single threaded code or
b) An easy methodology to broadcast (and sum the components of) my array, which is bigger than the local_range to all processors

Thanks!

asked May 15, 2014 by sschmidt FEniCS Novice (490 points)

I am using the Python interface

1 Answer

0 votes

It's not possible to move a mesh between processes (yet). It will be possible in the future.

The are functions for summing distributed vectors, and there is an interface for MPI broadcasting (take a look inn dolfin/common/MPI.h). If what you need is not available, we can extend the MPI wrapper layer.

answered May 21, 2014 by Garth N. Wells FEniCS Expert (35,930 points)
...