[petsc-users] DMPlex: a Mapping Array between Natural and Distributed Cell Index
Bora Jeong
boraj1021 at gmail.com
Wed Jul 13 20:52:54 CDT 2022
Dear petsc team,
I am a user of DMPlex for a finite volume code and there is a necessity to
know global index of each cell. Here the global index means the indexing
that can be found from a mesh file itself without distribution over
processors. It seems petsc community denotes this indexing term as
"natural".
What I want to do is to create a local array (not petsc vector but just an
array variable in the program) to map distributed cell ID to natual cell
ID, for example, an array "A";
A(distributed_node_ID) = natural_node_ID
There are some petsc functions to support mapping between global and
natural vectors. However, I just need to define the array "A" as above
example. To achieve this, what is a proper/smart way? In other words, how
can I extract the natural_cell_ID from a distributed local_cell_ID?
I turned on DMSetUseNatural(DM, PETSC_TRUE) before distribution, but after
this, defining all the required section and star forest objects to get
natural and global vectors seems not that direct way for my purpose, which
is just to extract the above mapping array "A". Can I get any comments
about it?
Regards
Mo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220713/0b4e87f3/attachment.html>
More information about the petsc-users
mailing list