<div dir="ltr">That is all true. If you want lower level pieces to make it yourself, I have -dm_plex_high_order_view, which activates<div>DMPlexCreateHighOrderSurrogate_Internal(). This is a simple function that refines the mesh lg(p) times to try and</div><div>resolve the high order behavior.</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Wed, Jan 29, 2025 at 4:55 PM Jed Brown <<a href="mailto:jed@jedbrown.org">jed@jedbrown.org</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">I like the CGNS workflow for this, at least with quadratic and cubic elements. You can use options like -snes_view_solution cgns:solution.cgns (configure with --download-cgns). It can also monitor transient solves with flexible batch sizes (geometry and connectivity are stored only once within a batch of output frames).<br>
<br>
Anna Dalklint via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>> writes:<br>
<br>
> Hello,<br>
><br>
> We have created a finite element code in PETSc for unstructured meshes using DMPlex. The first order meshes are created in gmsh and loaded into PETSc. To introduce higher order elements, e.g. 10 node tetrahedral elements, we start from scratch using PetscSection and loop over the relevant points it the DM to introduce additional degrees-of-freedom (example; for 10 node tets we have 4 vertices “nodes” and 6 edge “nodes”). The coordinates of the new “nodes” are obtained by interpolation using the finite element basis functions.<br>
><br>
> The simulations seem to run well, but we face issues when trying to visualize the results in ParaView. We have tried to use both CGNS and HDF5+XDMF file formats for e.g. VecView. CGNS works, but the edge degrees-of-freedom appear to not be interpolated correctly (we observe oscillations in the fields, don’t know if this is a PETSc och ParaView issue). Also, we would prefer to use another file format than CGNS since it does not appear to directly allow timeseries (at least ParaView doesn’t recognize it). We haven’t got the HDF5+XDMF file format to work at all when running on more than one core (the mesh is highly distorted when saving using VecView and DMView + running the “petsc_gen_xdmf.py” script on the .h5 output file).<br>
><br>
> VTU format works but then only the vertices’ degrees-of-freedom are visualized. As far as we have understood it, this is because VTU/VTK only supports degrees-of-freedom on vertices/cell level.<br>
><br>
> Does anyone have any idea of how to visualize fields generated from higher order elements in ParaView? Or understand what we might be doing wrong?<br>
><br>
> Best regards,<br>
> Anna<br>
</blockquote></div><div><br clear="all"></div><div><br></div><span class="gmail_signature_prefix">-- </span><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="https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!bARGOByHrNW1kx6GeTEkq8OOmkrXte9cSpdwEz_FYq-Qc2FVXoBXoFOjJtKExsznxY8rJjfzPN_Hp2vIMQvr$" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div>