Hi All,
I have a mesh file (generated from vmtk) which, along with the mesh information, also contains the subdomain markers (i.e. inlet/outlet/surface of an Lshape pipe) inside the mesh file. However, when I refine the mesh, these markers are lost. Is there a way to update it for the new mesh and write this data to the new refined mesh file? I have tried the solution posted here but could not achieve this. I have also searched through Q&A but could not find exactly what I was looking for.
Below is a simple example using a small mesh I generated. Since I am not able to attach it here, I can email it to anyone interested. I output the subdomain information for original and refined mesh, and compute inlet and outlet areas for both.
from dolfin import *
mesh1=Mesh("./data/lshape_2.xml")
subdomain1=mesh1.domains().markers(2) #Boundary Markers in mesh
outputfile=File("markers1.xml")
outputfile<<subdomain1 #File contains Markers
#Refine Mesh Uniformly
mesh2=refine(mesh1) #Refined mesh
subdomain2=mesh2.domains().markers(2) #Markers?
outputfile=File("markers2.xml")
outputfile<<subdomain2 #Empty file
#Compute Inlet and Outlet Areas for both meshes
#Facet Domains
fd1=mesh1.domains().facet_domains()
fd2=mesh2.domains().facet_domains()
#Areas
Area1=[assemble(Constant(1)*ds[fd1](i),mesh=mesh1) for i in range (3)]
#Original Mesh: [30.96,3.02,3.03] ==> surface,inlet,outlet
Area2=[assemble(Constant(1)*ds[fd2](i),mesh=mesh2) for i in range (3)]
#Refined Mesh: [0,0,0]
Any help would be greatly appreciated :)