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

How to create subdomains from existing meshes with boundary markers ?

+3 votes

Hello,

I have a mesh that I converted into xml.gz form using VMTK, and it retains mesh marker information (which I double checked with by running some simple tests and checking the id's of the boundary faces using vmtkmeshboundaryinspector).

I now want to create subdomains for each of these faces and define functions and operations on them. However, in most of the examples that I see, the boundary is known as a function of the coordinates, and hence sub-classing from SubDomain class is direct. For example:

class TopWall(SubDomain):
def inside(self, x, on_boundary):
    checkVar = abs(x[1] - boxH) < DOLFIN_EPS
    return checkVar

For my mesh, which is a generalized, curved domain in 3D, I only have boundary ID to mark the faces. I was wondering now as to how to get the mesh-boundary faces to become separate sub-classes using something like above ?

Any help will be appreciated !!

Thanks

asked Sep 20, 2014 by debmukh FEniCS Novice (880 points)

I was wondering whether anyone had the chance to look at this? Figured this would be somewhat buried in the list of questions by now, hence decided to comment and bring it up one activity level.

Thanks

Hi! Did you find an answer for this issue? I am facing the same problem.
Best

I have a similar problem: Is it possible to mark faces on a topological base (e.g. the edges lie on the interface between two subdomains) rather than a geometrical one (e.g. x[1]>0) ?

Thank you!

...