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

mesh refinement discards domain information

0 votes

Hi,

I just noticed that domain informations stored within the mesh object get lost when using mesh refinement. The following code demonstrates the problem:

mesh = Mesh("mesh_with_domains.xml.gz")
domains = MeshFunction("size_t", mesh, 3, mesh.domains())
facets = MeshFunction("size_t", mesh, 2, mesh.domains())

mesh = refine(mesh)
domains_fine = MeshFunction("size_t", mesh, 3, mesh.domains())
facets_fine = MeshFunction("size_t", mesh, 2, mesh.domains())

domains/facets contain two domains with values 1 and 2, whereas domains_fine and facets_fine contains useless data (1.8e19).

greetings
Florian

asked Jul 29, 2015 by florian_bruckner FEniCS Novice (380 points)

Florian, this could be classsified as a bug and as such it should be filed to bitbucket ;-)

...