[petsc-users] How to get specific ordering

Carlos Velazquez carlos.v.hd1 at gmail.com
Sun Sep 19 14:20:57 CDT 2021


Hi there. I have a question whether I can get the DAG values in DMPlex in a
different order.

I am working on a code that uses the same node ordering to form the
elements found in the mesh file. Example:

If I use the file "doublet-tet.msh" that is inside the DMPlex mesh files
folder, this file tells us that the elements are formed as follows:

1 - 2 4 3 1
2 - 2 3 4 5
Element 1 by nodes 2, 4, 3, 1
Element 2 by nodes 2, 3, 4, 5

So what I'm doing to get this through DMPlex is getting the transitive
closure with DMPlexGetTransitiveClosure and getting the points from level
0, which is the node level, but the ordering is different. Example:

With DMPlexGetTransitiveClosure I obtain that the elements are formed as
follows:

0 - 5 3 4 2
1 - 4 3 5 6
Element 1 by nodes 5, 3, 4, 2
Element 2 by nodes 4, 3, 5, 6

But comparing this ordering with the previous one in the coordinate matrix
I can see that the order is not equivalent.

I would like to know if there is a way to modify the ordering of the graph
to obtain the same ordering that is in the mesh file for the nodes that
make up the elements or even if there is some way to configure it for a
specific desired order.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210919/c2e76608/attachment.html>


More information about the petsc-users mailing list