Can I use mesh partitioned using GMSH with fenics?

10 months ago by
Hello Everyone,

I have a mesh portioned in using GMSH and I would like to use it in FEniCS. For instance, I would like to call FEniCS assembly routines on each subdomains separately.

When I use dolfin-convert to convert "gmsh" to "xml" the subdomain level information is losses and FEniCS read the mesh as one whole domain.

Is anyone have any suggestion?

Community: FEniCS Project
Do you want to use partition as Bimaterial domain? If yes you can read and use in fenics
written 10 months ago by hirshikesh  
Hi hsk,
Thanks for your comment.

I want to use domain decomposition method so I need to divide the domain into multiple subdomains.  
written 10 months ago by AJ  

1 Answer

10 months ago by

Actually, when you use dolfin-convert you can retrieve some information of subdomains and boundaries, by:
subdomains = MeshFunction('size_t',mesh,'geom_physical_region.xml');
boundaries = MeshFunction('size_t',mesh,'geom_facet_region.xml');​

However, it just works if you define a different Physical Group for each subdomain in GMSH.

There may be better solutions, but I've been using it this way.

If the Physical Groups are not created, the files 
will not be created either by using dolfin-convert.
written 10 months ago by Igor Baratta  
Hi Igor,
Thanks for your comment. I was trying that option but without defining physical group for each subdomain.

Do you have an example of ".geo" file where you have defined physical group for each subdomain?
written 10 months ago by AJ  
Just curious, but if you can define the subdomains with GMSH, why not just reproduce them with FEniCS?
written 10 months ago by pf4d  
You can use create like this :
written 10 months ago by hirshikesh  
Please login to add an answer/comment or follow this question.

Similar posts:
Search »