<div dir="ltr"><div dir="ltr">On Sun, Mar 7, 2021 at 8:52 AM Nicolas Barral <<a href="mailto:nicolas.barral@math.u-bordeaux.fr">nicolas.barral@math.u-bordeaux.fr</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Matt,<br>
<br>
Thanks for your answer.<br>
<br>
However, DMPlexComputeCellGeometryFVM does not compute what I need <br>
(normals of height 1 entities). I can't find any function doing that, is <br>
there one ?<br></blockquote><div><br></div><div>The normal[] in DMPlexComputeCellGeometryFVM() is exactly what you want. What does not look right to you?</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
So far I've been doing it by hand, and after a lot of experimenting the <br>
past weeks, it seems that if I call P0P1P2P3 a tetrahedron and note x <br>
the cross product,<br>
P3P2xP3P1 is the outward normal to face P1P2P3<br>
P0P2xP0P3 " P0P2P3<br>
P3P1xP3P0 " P0P1P3<br>
P0P1xP0P2 " P0P1P2<br>
Have I been lucky but can't expect it to be true ?<br>
<br>
(Alternatively, there is a link between the normals and the element <br>
Jacobian, but I don't know the formula and can find them)<br>
<br>
<br>
Thanks,<br>
<br>
-- <br>
Nicolas<br>
<br>
On 08/02/2021 15:19, Matthew Knepley wrote:<br>
> On Mon, Feb 8, 2021 at 6:01 AM Nicolas Barral <br>
> <<a href="mailto:nicolas.barral@math.u-bordeaux.fr" target="_blank">nicolas.barral@math.u-bordeaux.fr</a> <br>
> <mailto:<a href="mailto:nicolas.barral@math.u-bordeaux.fr" target="_blank">nicolas.barral@math.u-bordeaux.fr</a>>> wrote:<br>
> <br>
> Hi all,<br>
> <br>
> Can I make any assumption on the orientation of triangular facets in a<br>
> tetrahedral plex ? I need the inward facet normals. Do I need to use<br>
> DMPlexGetOrientedFace or can I rely on either the tet vertices<br>
> ordering,<br>
> or the faces ordering ? Could DMPlexGetRawFaces_Internal be enough ?<br>
> <br>
> <br>
> You can do it by hand, but you have to account for the face orientation <br>
> relative to the cell. That is what<br>
> DMPlexGetOrientedFace() does. I think it would be easier to use the <br>
> function below.<br>
> <br>
> Alternatively, is there a function that computes the normals - without<br>
> bringing out the big guns ?<br>
> <br>
> <br>
> This will compute the normals<br>
> <br>
> <a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DMPLEX/DMPlexComputeCellGeometryFVM.html" rel="noreferrer" target="_blank">https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DMPLEX/DMPlexComputeCellGeometryFVM.html</a><br>
> Should not be too heavy weight.<br>
> <br>
> THanks,<br>
> <br>
> Matt<br>
> <br>
> Thanks<br>
> <br>
> -- <br>
> Nicolas<br>
> <br>
> <br>
> <br>
> -- <br>
> What most experimenters take for granted before they begin their <br>
> experiments is infinitely more interesting than any results to which <br>
> their experiments lead.<br>
> -- Norbert Wiener<br>
> <br>
> <a href="https://www.cse.buffalo.edu/~knepley/" rel="noreferrer" target="_blank">https://www.cse.buffalo.edu/~knepley/</a> <<a href="http://www.cse.buffalo.edu/~knepley/" rel="noreferrer" target="_blank">http://www.cse.buffalo.edu/~knepley/</a>><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>