<span>Hello,</span><div><br></div><div><span>In an old question about obtaining the node connectivity of a cell with a high order approximation space, the use of the flag "-dm_plex_high_order_view"  for visualization purposes was brought up, as a way to refine the grid down to linear space. </span></div><div><br></div><div><span>Link: <a target="_blank" rel="noreferrer nofollow noopener" href="https://urldefense.us/v3/__https://gitlab.com/petsc/petsc/-/blob/main/src/dm/impls/plex/plex.c?ref_type=heads*L2021__;Iw!!G_uCfscf7eWS!ZZVaar4OGVdTXOAAjkEadcw-CAZUpAAzibpD_2SKpRupYG4oxSH-W7u5necsgTYDii6v-1kjfV4aqsllxL9XI_hK2YITfNz-$">https://gitlab.com/petsc/petsc/-/blob/main/src/dm/impls/plex/plex.c?ref_type=heads#L2021</a></span></div><div><br></div><div><span>I'm trying to make use of this flag to see the refinement, but I see no difference with higher order approximations.  Perhaps I am misunderstanding its use? I thought that by using it, one could see a "subdivision" of each element. Say, a single triangle, FE approximation space order 2 (3 corner nodes, 3 mid-edge nodes), would be refined into e.g. 4 linear triangles.</span></div><div><br></div><div><span>The code (Fortran) looks something along these lines:</span></div><div style="font-family: Arial, sans-serif; font-size: 14px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><span><br></span></div><div style="font-family: Arial, sans-serif; font-size: 14px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><span><span>! Create a DM from the mesh file</span><br><span></span><br></span></div><div></div><span></span><div><span>  DM :: cdm</span></div><div><span>  PetscInt :: K, cdim, fedim</span></div><div><span>  PetscBool :: simplex</span></div><div><span>  PetscFE :: cfe</span></div><div><span>  PetscViewer :: viewer</span></div><div><span>  PetscErrorCode :: ierr</span></div><div><br></div><div><span>  PetsCallA(DMSetFromOptions(cdm, ierr))</span></div><div><span>  PetsCallA(DMGetDimension(cdm, cdim, ierr))</span></div><div><span>  PetsCallA(DMPlexSimplex(cdm, simplex, ierr))</span></div><div><span>  PetsCallA(PetscFECreateDefault(PETSC_COMM_WORLD, cdim, cdim, simplex, "ho_", K, cfe, ierr))</span></div><div><span>  PetsCallA(PetscFEGetDimension(cfe, fedim, ierr))</span></div><div><br></div><div><span>  PetsCallA(PetscViewerCreate(PETSC_COMM_WORLD, viewer, ierr))</span></div><div><span>  PetsCallA(PetscViewerDrawOpen(PETSC_COMM_WORLD, PETSC_NULL_CHARACTER, PETSC_NULL_CHARACTER, 100, 100, 800, 800, viewer, ierr))</span></div><div><span>  PetsCallA(PetscViewerSetFromOptions(viewer, ierr))    ! also using flag -draw_pause 5</span></div><div><span>  PetsCallA(DMView(cdm, viewer, ierr))</span></div><div><span>  [...]</span></div><span></span><div><br></div><div><br></div><div><span>With the following list of flags:</span></div><div><br></div><div><span></span></div><span>    -ho_petscspace_degree K</span><div><span>    -ho_petscdualspace_lagrange_node_type equispaced</span></div><div><span>    -ho_petscdualspace_lagrange_node_endpoints 1</span></div><div><span>    -dm_plex_high_order_view</span></div><div><span>    -options_left</span></div><div><span>                               </span></div><div><span>Using "-options_left" shows that "there are no unused options"; so "-dm_plex_high_order_view" is used somehow; it is at least required for the call to "DMPlexCreateHighOrderSurrogate_Internal" within the "draw" functions.</span></div><div><br></div><div><span>From the CoordinateDM I can see the additional nodes created for the higher order approximation (e.g. mid-edge, mid-face nodes), so it seems the FE space is correct.</span></div><div><br></div><div><span>Regardless of the order "K", the mesh plotted with "DMView" is always the same, corresponding to the linear case. </span></div><div><br></div><div><span>Thank you.</span></div><div><br></div><div><span>Noam</span></div><span></span>