I have defined the mesh and MeshFunction with "model.xml" and "model_physical_region.xml" data, so it's like:
mesh = Mesh("model.xml")
subdomains = MeshFunction("size_t", mesh, "model_physical_region.xml")
and my "model_physical_region.xml" data looks like:
<?xml version="1.0" encoding="UTF-8"?>
<dolfin xmlns:dolfin="http://fenicsproject.org">
<mesh_function type="uint" dim="3" size="8">
<entity index="0" value="1"/>
<entity index="1" value="1"/>
<entity index="2" value="2"/>
<entity index="3" value="2"/>
<entity index="4" value="3"/>
<entity index="5" value="3"/>
<entity index="6" value="4"/>
<entity index="7" value="4"/>
</mesh_function>
</dolfin>
I know how to get the entities' indices if I use the code like:
for cell in cells(subdomains.mesh()):
print cell.index()
but I don't know how to parallel get the entities' values("1", "2", "3", "4") in the "model_physical_region.xml" data. I'll be appreciated to get the answer.