[petsc-users] dumb questions about orientations of entities in dmplex

Matthew Knepley knepley at gmail.com
Sat Nov 12 09:18:09 CST 2016


On Fri, Nov 11, 2016 at 10:21 AM, Wang <quanwang.us at gmail.com> wrote:

> Hello, I'm new user of PETSc. I'm a little confused of the orientations of
> those meshing entities in DM. Here are my questions.
>
> 1. When creating DM from a given mesh, such as DMPlexCreateGmshFromFile,
> will the ordering of nodes for each element be changed? If so, even for
> mesh which has been oriented (for example, in 2D mesh, the natural order is
> already clockwise-oriented)?
>

I change the ordering from mesh formats to the canonical library ordering.
In 2D this is unambiguous (the right hand rule, or counter-clockwise). In
3D, for simplices we order them so that the first 3 vertices give an
outward normal. For hexes, we order them so that the first four and last
four give an outward normal.


> 2. What do those orientations of points in closure of one cell mean? Why
> do we use those positive or negative integers, like s or -(s+1)? Isn't a
> bool flag enough?
>

The orientation of a point, relative to the point it covers, picks out the
element of the symmetric group on that point to apply, or said another way
it picks the permutation to use when returning the result. These groups of
permutations can usually be decomposed into rotations and reflections,
so we use the minus sign to indicate a reflection as well. If you used a
boolean, that could only encode flipping, which is good enough for edges,
but
not say for quad faces.


> let's look at one example, closure (given by DMPlexGetTransitiveClosure)
> of a 2D cell { f1, o1, e4, o2, e3,o3, e5,o4, v1,o5, v8,o6, v9,o7} where f,
> e or v denotes face, edge or vertex respectively.
>
> If the cone of each point in that list is uniquely defined as given
> by DMPlexGetCone, then, with my understanding, the possible orientation for
> each point in that closure is either 1 or -1.
>

Precisely, o1 does not matter since the face does not cover anything. o5,
o6, and o7 do not matter because vertices have no symmetry group. o2, o3,
and o4
have the symmetry group of the interval, which only has two members. Our
number double counts here:

  0: Start at vertex 0 and go forward,     {0, 1}
  1: Start at vertex 1 and go forward,     {1, 0} since we wrap around
 -1: Start at vertex 0 and go backward, {0, 1} since we wrap around
 -2: Start at vertex 1 and go backward, {1, 0}

I do not use the wrap around ordering numbers for edges since its
confusing. Note that for a face, they would be meaningful.


> What does it mean by having orientation equal to 0, s or  -(s+1),
> respectively,  for certain point in the list, such as edge e4? My question
> is why we need  a start in the orientation of a sieve point if it is
> already defined.
>

Shown above.


> 3. No matter what the answer to question 1 is, I'm
> assuming DMPlexDistribute only renumbers things without changing the
> orientation. Am I correct?
>

Yes.

   Matt


> Thanks in advance.
>
> Wang
>



-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20161112/161413a8/attachment.html>


More information about the petsc-users mailing list