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

Converting a Function object to a VTK object in parallel

0 votes

I am looking to use a VTK filter at run time and thus need to convert the dolfin.Function object to a vtkUnstructuredGrid. While I have figured out how to do this in serial as shown in my answer to this question, this does not work in parallel. The line V.tabulate_dof_coordinates() gives the coordinates of the nodes belonging to the current sub-process, which (in all cases I've tested) do not complete the cells in that same sub-process.

As an example, consider the mesh created by dolfin.UnitSquareMesh(1,1), and run this on 2 processes. One cell will go to each process, while three nodes go to one, and the last single node goes to the other process. So the second process contains a connectivity matrix with local node IDs (0, 1, 2), but only has one node. How do I access or duplicate the other nodes necessary to complete the cell?

asked Jul 13, 2017 by miguelr FEniCS Novice (420 points)
...