[petsc-users] DMPlexCreateFromDAG for P2 elements

Stefano Zampini stefano.zampini at gmail.com
Tue Oct 8 14:18:51 CDT 2019


DMPlex abstracts the mesh topology. PetscSection defines the dofs associated to the mesh entities.
Why do you need P2 elements? For the discrete solution or because you have a high order mesh?

If it is only for the solution, you should create a linear mesh (cell-vertex only), interpolate the mesh, and then use
PetscFECreateDefault (https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/FE/PetscFECreateDefault.htm <https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/FE/PetscFECreateDefault.htm>)
+
DMAddField (https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMAddField.html <https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMAddField.html>)
+
DMCreateDS (https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMCreateDS.html <https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMCreateDS.html>)

Instead, if you have a high-order mesh, you should create a linear mesh, and then manipulate yourself the PetscSection defining the local coordinates.
However, I’m not sure how complete is the support for high-order meshes when it comes to compute FEM residuals and assemble Jacobians


> On Oct 8, 2019, at 9:54 PM, Asitav Mishra via petsc-users <petsc-users at mcs.anl.gov> wrote:
> 
> Hi,
> 
> Does Petsc support DMPlexCreateFromDAG for 2nd order (P2) elements, or any orders higher than one (P1) for that matter? I know it is possible to create DMPlex mesh from GMSH files with P2 elements, but not sure how the 'cone/support' structures are built. One approach is to ignore the higher order nodes in an element to create the 'cones', but is there a way to preserve the P2 element information in the 'cones'? 
> 
> For example: how would the depth=1 cone structure look like for a mesh with two P2 triangles sharing a face?
>             2
>           / | \
>         /   |   \
>      6     |     8
>     /       |       \
>   /         |         \
> 0   0    5    1    3
>   \         |         /
>     \       |       /
>      4     |     7
>         \   |   /
>           \ | /
>            1
> 
> Higher order nodes: [4, 5, 6, 7, 8]. Can we construct cones with cells-to-nodes (depth = 1)?:
> 
> numPoints = [9, 2];                                             // 9 nodes instead of just 4?
> coneSizes = [6, 6,    0, 0, 0, 0, 0, 0, 0, 0, 0];
> cones        = [0, 1, 2, 4, 5, 6,    2, 1, 3, 5, 7, 8];
> etc.
> 
> Any help would be greatly appreciated.
> 
> Thanks,
> Asitav
> 
> -- 
> Asitav Mishra, PhD 
> Research Engineer II, NIA

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20191008/3b246bc8/attachment.html>


More information about the petsc-users mailing list