- marked as enhancement
- marked as minor
Refinement algorithm sets parent facets data in 2D, but not in 3D
Issue #502
resolved
In this issue, it was already reported that some refinement algorithms don't set any parent entities data. I also found out that for setting parent facet data of a 2D mesh, one needs to choose "plaza_with_parent_facets", and this code works:
from dolfin import *
parameters["refinement_algorithm"] = "plaza_with_parent_facets"
mesh = UnitSquareMesh(2, 2)
cf = CellFunction('bool', mesh, True)
mesh1 = adapt(mesh, cf)
f = FacetFunction("size_t", mesh)
f_refined = adapt(f, mesh1)
However, when using a 3D mesh, we get the same error as for "plaza" in 2D, because the parent facets data is missing, so
from dolfin import *
parameters["refinement_algorithm"] = "plaza_with_parent_facets"
mesh = UnitCubeMesh(2, 2, 2)
cf = CellFunction('bool', mesh, True)
mesh1 = adapt(mesh, cf)
f = FacetFunction("size_t", mesh)
f_refined = adapt(f, mesh1)
results in the error message
*** Error: Unable to adapt mesh function.
*** Reason: Unable to extract information about parent mesh entites.
*** Where: This error was encountered inside adapt.cpp.
Comments (4)
-
reporter -
I think this has been fixed in
master
. Maybe you can try out the development version, and see if that works. -
-
assigned issue to
-
assigned issue to
-
- changed status to resolved
Fixed in dev version, will be in release 1.6
- Log in to comment