<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">DMPlex abstracts the mesh topology. PetscSection defines the dofs associated to the mesh entities.<div class="">Why do you need P2 elements? For the discrete solution or because you have a high order mesh?</div><div class=""><br class=""></div><div class="">If it is only for the solution, you should create a linear mesh (cell-vertex only), interpolate the mesh, and then use</div><div class="">PetscFECreateDefault (<a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/FE/PetscFECreateDefault.htm" class="">https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/FE/PetscFECreateDefault.htm</a>)</div><div class="">+</div><div class="">DMAddField (<a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMAddField.html" class="">https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMAddField.html</a>)</div><div class="">+</div><div class="">DMCreateDS (<a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMCreateDS.html" class="">https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMCreateDS.html</a>)</div><div class=""><br class=""></div><div class="">Instead, if you have a high-order mesh, you should create a linear mesh, and then manipulate yourself the PetscSection defining the local coordinates.</div><div class="">However, I’m not sure how complete is the support for high-order meshes when it comes to compute FEM residuals and assemble Jacobians</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div><blockquote type="cite" class=""><div class="">On Oct 8, 2019, at 9:54 PM, Asitav Mishra via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" class="">petsc-users@mcs.anl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Hi,</div><div class=""><br class=""></div><div class="">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'? </div><div class=""><br class=""></div><div class="">For example: how would the depth=1 cone structure look like for a mesh with two P2 triangles sharing a face?</div><div class=""> 2<br class="gmail-Apple-interchange-newline"> / | \</div><div class=""> / | \<br class=""> 6 | 8</div><div class=""> / | \<br class=""> / | \<br class="">0 0 5 1 3<br class=""> \ | /<br class=""> \ | /<br class=""> 4 | 7<br class=""> \ | /<br class=""></div><div class=""> \ | /</div><div class=""><div class=""> 1</div><div class=""><br class=""></div><div class="">Higher order nodes: [4, 5, 6, 7, 8]. Can we construct cones with cells-to-nodes (depth = 1)?:</div><div class=""><br class=""></div><div class="">numPoints = [9, 2]; // 9 nodes instead of just 4?</div><div class="">coneSizes = [6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0];</div><div class="">cones = [0, 1, 2, 4, 5, 6, 2, 1, 3, 5, 7, 8];</div><div class="">etc.<br class=""><div class=""><div class=""><br class=""></div><div class="">Any help would be greatly appreciated.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Asitav</div><div class=""><br class=""></div>-- <br class=""><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class="">Asitav Mishra, PhD <div class=""><div class="">Research Engineer II, NIA</div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div></blockquote></div><br class=""></div></body></html>