Parent facet map

Is there an equivalent for the facets of:

mesh.data().array("parent_cell", mesh.topology().dim())

I need the map between the initial and the refined mesh facets and i coudn’t find anywhere all the possible array name to use in data().array().

Thanks in advance.

Since you havent supplied a minimal working example of your code, this is just guesswork from me, but could you do
mesh.data().array("parent_cell", mesh.topology().dim()-1)?

1 Like

Sadly i already tried both

mesh.data().array("parent_cell", mesh.topology().dim-1)

and

mesh.data().array("parent_facet", mesh.topology().dim-1)

without any luck.

If you want any help on this topic, you Need to supply a minimal example of the code until the point Where you are stuck

Thanks for the replies, here is a mwe, it’s just a simple refinement of a mesh on which i want to find the map between parent and child but i have no clue how.

from dolfin import *
import numpy as np

mesh = UnitSquareMesh(2,2)
File('mesh.pvd') << (mesh,0)

mark = MeshFunction('bool', mesh, mesh.topology().dim(), False)
m = [0]
mark.array()[m] = True

mesh2 = refine(mesh, mark)
File('mesh2.pvd') << mesh2

rmap = mesh2.data().array("parent_cell", mesh2.topology().dim())
#fmap = (?) facet map between parent and child

Thanks in advance.