[petsc-users] DMPlex assemble submatrices with overlapping dofs
Fabian Jakub
Fabian.Jakub at physik.uni-muenchen.de
Wed Apr 1 09:59:36 CDT 2020
Dear Matt, dear PETSc Devs,
I have a dmplex mesh with wedge type cells (2d triangle mesh extruded in
the vertical, i.e. prism cells).
Let me call the faces with 3 edges "top/bot" faces and the faces with 4
edges "side" faces
The mesh can be subdivided into two regions.
The upper part where a petsc section has only dofs on the "top/bot"
faces and a lower part where i have dofs on the "side" faces as well.
At the moment I take care of this layout when I assemble the matrices.
I was wondering if I could assemble a submatrix for each part, then
create a combined matrix from the two regions.
What I tried so far was to
clone the dm twice (topdm and botdm)
generate a section with the corresponding layouts
e.g. now
topdm has 2 cells with dofs on 3 faces
botdm has 1 cell with dofs on 5 faces
DMCompositeCreate()
DMCompositeAddDM(topdm and botdm)
Now, looking at the matrix generated on the composite DM
or calling DMCompositeGetGlobalISs
I see that the dofs on the face between the two sub meshes are not shared.
My question is:
Is this generally the way to go about it or do you suggest a completely
different approach
i.e. instead of "sharing" the dofs on the interfacing faces I could
"couple" the meshes with matrix entries in the composite Mat
Does that sound more practical?
Or how should I go about telling the composite DM about the shared dofs?
Many Thanks!
Fabian
More information about the petsc-users
mailing list