<div dir="ltr"><div dir="ltr">On Fri, Mar 19, 2021 at 2:55 PM Jed Brown <<a href="mailto:jed@jedbrown.org">jed@jedbrown.org</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">Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> writes:<br>
<br>
> On Fri, Mar 19, 2021 at 2:21 PM Jed Brown <<a href="mailto:jed@jedbrown.org" target="_blank">jed@jedbrown.org</a>> wrote:<br>
><br>
>> Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> writes:<br>
>><br>
>> >> Notice how the permutations are contained within the vertices {0, ...,<br>
>> 8},<br>
>> >> edges {9, ..., 24}, and cells {25, ..., 32}. I would like to get rid of<br>
>> >> that restriction, but you've said it would have significant non-local<br>
>> >> consequences so I haven't tried.<br>
>> >><br>
>> ><br>
>> > Yes, that is not a good idea, even in theory. It wrecks the nice<br>
>> contiguity<br>
>> > we use for topological operations.<br>
>> ><br>
>> > As Lawrence points out, this need not affect your smoother because dof<br>
>> > permutations can break this stratification. It has been that way for a<br>
>> > decade.<br>
>><br>
>> I only want to break dof stratification, not point stratification. The<br>
>> points produced by the stratified RCM are okay (at least as Lawrence<br>
>> described it; not sure how it's done in DMPlexGetOrdering, but can't be<br>
>> anything hard).<br>
>><br>
>> What code needs to be written to get unstratified RCM-like dofs? Lawrence<br>
>> evidently has this code in Firedrake, but I want it in DMPlex, tested and<br>
>> probably done by default because most users would benefit from it. I could<br>
>> swear you said it would break some other assumptions and thus not<br>
>> everything would work, but perhaps we weren't talking about the same thing.<br>
>><br>
><br>
> It is possible that I misunderstood what you were asking for. What Section<br>
> requires for everything to work is that dofs follow the point ordering. <br>
<br>
I think what you mean is that the dofs for any point are contiguous, not that the dofs for point p come before the dofs for point p+1.<br></blockquote><div><br></div><div>Yes.</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">
> The point ordering can be anything we want since we can use a permutation from the mesh point ordering. However, some stuff depends on all dofs associated with a point being contiguous. Not everything does, since I wrote something for LibMesh which allows them to order in a field major way, instead of point major, but it is probably not possible to individually permute unknowns. Usually, this is not what we want anyway I would assume.<br>
<br>
I don't want to break up the dofs for a point, just an unstratified locality-preserving ordering of dofs (not points).<br></blockquote><div><br></div><div>Good.</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">
PetscSectionSetUp currently calculates offsets by walking the points in order. I'd like to be able to walk them in a different ordering, perhaps specified via an IS permutation, which could be computed using MATORDERINGRCM or directly via BFS of a closure (saves building a Mat).<br></blockquote><div><br></div><div>You can do this using</div><div><br></div><div>  <a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PetscSection/PetscSectionSetPermutation.html">https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PetscSection/PetscSectionSetPermutation.html</a></div><div><br></div><div>This is what Lawrence is doing. He permutes the points so that interior points come first, then points that are not</div><div>shared but touch shared points, then shared points.</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">
1. Would this break anything you can think of?<br>
2. How would you like it implemented?<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>