<div dir="ltr"><div>Stefano,</div><div><br></div>Thanks a lot for your prompt response. I have a higher-order mesh, so will need to create my own PetscSection to add the local coordinates looks  like.<br><div>At this point, FEM residuals and Jacobian computations are not as important. But, could you direct me to any examples in creating PetscSection for such elements?</div><div><br></div><div>Thanks,</div><div>Asitav</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 8, 2019 at 3:18 PM Stefano Zampini <<a href="mailto:stefano.zampini@gmail.com">stefano.zampini@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;">DMPlex abstracts the mesh topology. PetscSection defines the dofs associated to the mesh entities.<div>Why do you need P2 elements? For the discrete solution or because you have a high order mesh?</div><div><br></div><div>If it is only for the solution, you should create a linear mesh (cell-vertex only), interpolate the mesh, and then use</div><div>PetscFECreateDefault (<a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/FE/PetscFECreateDefault.htm" target="_blank">https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/FE/PetscFECreateDefault.htm</a>)</div><div>+</div><div>DMAddField (<a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMAddField.html" target="_blank">https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMAddField.html</a>)</div><div>+</div><div>DMCreateDS (<a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMCreateDS.html" target="_blank">https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMCreateDS.html</a>)</div><div><br></div><div>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>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><br></div><div><br></div><div><div><blockquote type="cite"><div>On Oct 8, 2019, at 9:54 PM, Asitav Mishra via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>> wrote:</div><br><div><div dir="ltr"><div>Hi,</div><div><br></div><div>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><br></div><div>For example: how would the depth=1 cone structure look like for a mesh with two P2 triangles sharing a face?</div><div>            2<br>          / | \</div><div>        /   |   \<br>     6     |     8</div><div>    /       |       \<br>  /         |         \<br>0   0    5    1    3<br>  \         |         /<br>    \       |       /<br>     4     |     7<br>        \   |   /<br></div><div>          \ | /</div><div><div>           1</div><div><br></div><div>Higher order nodes: [4, 5, 6, 7, 8]. Can we construct cones with cells-to-nodes (depth = 1)?:</div><div><br></div><div>numPoints = [9, 2];                                             // 9 nodes instead of just 4?</div><div>coneSizes = [6, 6,    0, 0, 0, 0, 0, 0, 0, 0, 0];</div><div>cones        = [0, 1, 2, 4, 5, 6,    2, 1, 3, 5, 7, 8];</div><div>etc.<br><div><div><br></div><div>Any help would be greatly appreciated.</div><div><br></div><div>Thanks,</div><div>Asitav</div><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Asitav Mishra, PhD <div><div>Research Engineer II, NIA</div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div></blockquote></div><br></div></div></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><div dir="ltr">Asitav Mishra, PhD <div><div>Research Engineer II, NIA</div></div></div></div></div></div></div></div></div></div>