[petsc-users] DMPlex Reordering

Matthew Knepley knepley at gmail.com
Mon Jul 25 10:54:26 CDT 2022


On Mon, Jul 25, 2022 at 10:11 AM Nicholas Arnold-Medabalimi <
narnoldm at umich.edu> wrote:

> Hi Petsc users,
>
> I have been working on how to read in meshes into a DMPlex object. The
> process of building the cones has been relatively straightforward. The mesh
> files in question have sets of faces that I use to derive the cell vertex
> cones. The method is basically identical to that used in
> DMPlexCreateFluent. After I setup the DMPlex cones and call Symmetrize and
> Stratify, I then load in all the coordinates corresponding to the
> vertices and then use DMInterpolate to generate the intermediate edges
>
> The issue that I am running into is that because I am deriving the
> cell-vertex relationship from independent sets of face-vertex
> relationships, I can end up with cells that have improper mesh ordering.
>
> For example a cell with the coordinates:
> point 0: 0.000000 0.000000
> point 1: 0.000000 2.500000
> point 2: 0.100000 0.000000
> point 3: 0.100000 2.500000
>
> As you can see instead of going around the perimeter of the cell the path
> from 1 to 2 instead bisects the cell.
>
> I can manually reorder these after I read in the coordinates by manually
> checking right-handedness but I was wondering if there is an easier way to
> reorder the cones? If there isn't once I do reorder the cones manually is
> there anything I need to do as far as station keeping on the DM?
>

The function DMPlexOrient() reorders the cones so that all cells have
compatible orientation. However, it will not catch this because it is
an illegal ordering for a quad. This order is called
a DM_POLYTOPE_SEG_PRISM_TENSOR in Plex because it is the tensor product of
two segments (so that opposite sides have the same orientation). If all
your cells are this way, you can just mark them as tensor segments
and you are done. If only some turn out this way, then we have to write
some code to recognize them, or flip them when you create the cones.

  Thanks,

    Matt


> I apologize if I missed any resources on this.
>
> Thanks
> Nicholas
>
> --
> Nicholas Arnold-Medabalimi
>
> Ph.D. Candidate
> Computational Aeroscience Lab
> University of Michigan
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220725/86b5c50b/attachment.html>


More information about the petsc-users mailing list