<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Nov 11, 2016 at 10:21 AM, Wang <span dir="ltr"><<a href="mailto:quanwang.us@gmail.com" target="_blank">quanwang.us@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">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.<div><br></div><div>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)? </div></div></blockquote><div><br></div><div>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.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>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? </div></div></blockquote><div><br></div><div>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</div><div>it picks the permutation to use when returning the result. These groups of permutations can usually be decomposed into rotations and reflections,</div><div>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</div><div>not say for quad faces.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>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. </div><div><br></div><div>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.</div></div></blockquote><div><br></div><div>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</div><div>have the symmetry group of the interval, which only has two members. Our number double counts here:</div><div><br></div><div> 0: Start at vertex 0 and go forward, {0, 1}</div><div> 1: Start at vertex 1 and go forward, {1, 0} since we wrap around</div><div> -1: Start at vertex 0 and go backward, {0, 1} since we wrap around</div><div> -2: Start at vertex 1 and go backward, {1, 0}</div><div><br></div><div>I do not use the wrap around ordering numbers for edges since its confusing. Note that for a face, they would be meaningful.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div> 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.</div></div></blockquote><div><br></div><div>Shown above.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>3. No matter what the answer to question 1 is, I'm assuming DMPlexDistribute only renumbers things without changing the orientation. Am I correct?</div></div></blockquote><div><br></div><div>Yes.</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Thanks in advance.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Wang</div></font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">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></div>