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

Dolfin XML subdomain format

0 votes

I don't understand how boundary markers are defined in the Dolfin XML format. I see that it is a mesh function of data type uint. But what does the entity index refer to? A vertex?

  <mesh_function type="uint" dim="2" size="4">
    <entity index="0" value="27"/>

I have an example converted from gmsh using dolfin-convert where the size of mesh_function entries doesn't match with vertex nor with tetraedra count.

Thanks for your help.

asked Dec 22, 2015 by rwalt FEniCS Novice (480 points)

1 Answer

0 votes
 
Best answer

The meshfunction dimension "dim=2" tells you the entity type (here a triangle)

answered Dec 28, 2015 by chris_richardson FEniCS Expert (31,740 points)
selected Jan 4, 2016 by rwalt

So do I get this right: The boundary marker is saved as a function defined on the (internal) boundary mesh?

You can define a MeshFunction on vertices, edges, facets or cells. Typically for setting BCs, you will use a FacetFunction, which in 3D is defined on triangles (dim=2).
This contains a value for every Facet in the Mesh including all internal facets.

Ok thanks very much Chris. I figured it out. I now defined my boundary using a MeshFunction defined on vertices (dim=0).

...