Comment 2 for bug 991905

Revision history for this message
Johan Hake (johan-hake) wrote : Re: [Bug 991905] [NEW] dolfin-convert dumps facet regions in old xml format

Instead of writing separate MeshFunction files one should instead write
Meshdomains directly to the generated mesh files, using the
MeshValueCollection tag. This should be robust in parallel, and probably
also much simpler to handle in the mesh convert script.

Johan

On 04/30/2012 01:57 PM, Patrick Farrell wrote:
> Public bug reported:
>
> Try:
>
> $ dolfin-convert doughnut.msh doughnut.xml
>
> $ cat load_meshfunc.py
> from dolfin import *
>
> mesh = Mesh("doughnut.xml")
> facet_labels = MeshFunction("uint", mesh, "doughnut_facet_region.xml")
>
> $ mpiexec -n 2 python load_meshfunc.py
> *** -------------------------------------------------------------------------
> *** Error: Unable to read mesh function from XML file.
> *** Reason: Reading old-style XML MeshFunctions is not supported in parallel. Consider using the new format.
> *** Where: This error was encountered inside XMLMeshFunction.h.
> *** -------------------------------------------------------------------------
>
> If you read it in (in serial) and dump it out again, it gets converted
> to the new XML format and then you can read it in parallel.
>
> ** Affects: dolfin
> Importance: Undecided
> Status: New
>