<div dir="ltr"><div dir="ltr">On Wed, Apr 1, 2020 at 10:58 AM Fabian Jakub <<a href="mailto:Fabian.Jakub@physik.uni-muenchen.de">Fabian.Jakub@physik.uni-muenchen.de</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">Dear Matt, dear PETSc Devs,<br>
<br>
<br>
I have a dmplex mesh with wedge type cells (2d triangle mesh extruded in<br>
the vertical, i.e. prism cells).<br>
<br>
Let me call the faces with 3 edges "top/bot" faces and the faces with 4<br>
edges "side" faces<br>
<br>
The mesh can be subdivided into two regions.<br>
<br>
The upper part where a petsc section has only dofs on the "top/bot"<br>
faces and a lower part where i have dofs on the "side" faces as well.<br>
<br>
At the moment I take care of this layout when I assemble the matrices.<br>
<br>
I was wondering if I could assemble a submatrix for each part, then<br>
create a combined matrix from the two regions.<br></blockquote><div><br></div><div>Would it be good enough to just get a custom ordering for the dofs, so that your combined matrix</div><div>could look like you want?</div><div><br></div><div>If so, you can give the PetscSection object for your DM a permutation that orders the points the way you want,</div><div>first points on the top, then on the bottom, then in between.</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">
What I tried so far was to<br>
<br>
clone the dm twice (topdm and botdm)<br>
<br>
generate a section with the corresponding layouts<br>
<br>
e.g. now<br>
<br>
topdm has 2 cells with dofs on 3 faces<br>
<br>
botdm has 1 cell with dofs on 5 faces<br>
<br>
DMCompositeCreate()<br>
<br>
DMCompositeAddDM(topdm and botdm)<br>
<br>
<br>
Now, looking at the matrix generated on the composite DM<br>
<br>
or calling DMCompositeGetGlobalISs<br>
<br>
I see that the dofs on the face between the two sub meshes are not shared.<br>
<br>
My question is:<br>
<br>
Is this generally the way to go about it or do you suggest a completely<br>
different approach<br>
<br>
i.e. instead of "sharing" the dofs on the interfacing faces I could<br>
"couple" the meshes with matrix entries in the composite Mat<br>
<br>
Does that sound more practical?<br>
<br>
Or how should I go about telling the composite DM about the shared dofs?<br>
<br>
Many Thanks!<br>
<br>
Fabian<br>
<br>
<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>