[petsc-users] dmplex face normals orientation

Ingo Gaertner ingogaertner.tus at gmail.com
Wed Apr 12 10:52:32 CDT 2017


Hello,
I have problems determining the orientation of the face normals of a DMPlex.

I create a DMPlex, for example with DMPlexCreateHexBoxMesh().
Next, I get the face normals using DMPlexComputeGeometryFVM(DM dm, Vec
*cellgeom, Vec *facegeom). facegeom gives the correct normals, but I don't
know how the inside/outside is defined with respect to the adjacant cells?

Finally, I iterate over all cells. For each cell I iterate over the
bounding faces (obtained from DMPlexGetCone) and try to obtain their
orientation with respect to the current cell using
DMPlexGetConeOrientation(). However, the six integers for the orientation
are the same for each cell. I expect them to flip between neighbour cells,
because if a face normal is pointing outside for any cell, the same normal
is pointing inside for its neighbour. Apparently I have a misunderstanding
here.

How can I make use of the face normals in facegeom and the orientation
values from DMPlexGetConeOrientation() to get the outside face normals for
each cell?

Thank you
Ingo

<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virenfrei.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170412/fb3651bc/attachment.html>


More information about the petsc-users mailing list