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

MeshEditor and MeshPartitioning in Parallel

+2 votes

I am using dolfin 1.4.0+ with python in parallel with mpi.

In my problem, I manually create the mesh using the build-in MeshEditor. Essentially, I have to mirror the mesh along one axis, creating a symmetric mesh out of a given half/quarter symmetric mesh generated using gmsh.

I am using the MeshEditor to essentially have each processor calculate the mirrored mesh out of the partition it has. The result is a parallel mesh where each processor has two disjunct partitions (a bit like a Rorschach Picture ;) )

If I assemble my weak form on this mesh, however, dolfin crashes. I figure this is because each processor has two disjunct domains.

From what I have figured out from this thread:
http://scicomp.stackexchange.com/questions/7188/fenics-initialize-vector-of-degrees-of-freedom-for-function/16006

I figure that a call to
MeshPartitioning.build_distributed_mesh(mesh)

should correctly repartition the mesh I have created. However, this gives me the error:
Traceback (most recent call last):
File "main_opt.py", line 84, in
MeshPartitioning.build_distributed_mesh(Mesh1)
NameError: name 'MeshPartitioning' is not defined

Is it possible that the MeshPartitioning functionality is only present in the C-Version of FEniCS? Is there any other way to mirror a mesh in distributed parallel execution?

Many thanks!

asked Oct 27, 2014 by sschmidt FEniCS Novice (490 points)
...