Mfem: Extracting a part of the ParMesh for a subdomain

Created on 23 Mar 2018  路  3Comments  路  Source: mfem/mfem

Hello,

Suppose I have a subdomain for a given domain and a ParMesh for the domain. The subdomain is described, for example as a part of the domain which lies between two planes x_n = c1 and x_n = c2 for the last coordinate x_n.
Is there any tool to extract a ParMesh for a subdomain?

I imagine it is not hard to extract the serial arrays for elements, boundary elements and vertices. But I am afraid of the truly ParMesh things like managing shared entities.

Thanks,
Kirill

mesh question

All 3 comments

You are perhaps right to pay attention on distributing shared entity information.
I am not aware of routines on the c++ side. Are your two planes on c1 and c2
the boundary element? Is it okay that the domain between c1 and c2 are labeled
by a special domain attribute number? If so, the following is something I wrote
recently in Python. The surface function is to make a partial surface mesh, and
the volume function is to make a partial volume mesh. Domain and Boundary
attribute numbers are carried to the newly created partial mesh. Please note that
this script won't work by itself since it rely on some MPI communication helpers.
But, it may help you to get an idea.

p.s. I wish to have this functionality in c++, but perhaps, we need to wait the
entity set....

partial_mesh.py.txt

To add to @sshiraiwa's answer: if you are in serial, you can always provide the optional partitioning argument to the ParMesh constructor -- that will extract the submesh you want locally, creating a parallel mesh globally.

Thanks for sharing your ideas, the goal which involved mesh extraction has been postponed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rcarson3 picture rcarson3  路  4Comments

latug0 picture latug0  路  4Comments

tbarani picture tbarani  路  3Comments

nghiakvnvsd picture nghiakvnvsd  路  4Comments

thorvath12 picture thorvath12  路  3Comments