Can I use mesh partitioned using GMSH with fenics?


130
views
0
7 weeks ago by
AJ  
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?

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

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

1 Answer


0
7 weeks ago by
Hello,

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 
*_physical_region.xml
*_facet_region.xml
will not be created either by using dolfin-convert.
written 7 weeks 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 7 weeks ago by AJ  
Just curious, but if you can define the subdomains with GMSH, why not just reproduce them with FEniCS?
written 7 weeks ago by pf4d  
You can use create like this : https://fenicsproject.org/qa/14080/set-domain-definition-from-gmsh-created-mesh
written 7 weeks ago by hsk  
Please login to add an answer/comment or follow this question.

Similar posts:
Search »