You want to use DMPlexVecGetClosure: https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DMPLEX/DMPlexVecGetClosure.html
The examples shown here don't close cells. What you want. src/dm/impls/plex/examples/tutorials/ex6.c does iterate over cells, and get the closure (vertices), which is what you want. Mark On Fri, Oct 12, 2018 at 4:58 AM 陳宗興 <barrydog...@gmail.com> wrote: > Hi all, > > I have import a .msh file from DMPlexCreateFromFile. > I have found DMDAGetElements in DMDA's ex5 having this function, > how can i do this from DMPlex or unstructure grid. > Are there any methods that can get nodes list refer to unstructure mesh > element? > ------------------------------------ > for example : > 4 > / \ > / 1 \ > 2 - - - - - 3 element [1] >> nodes list [2 3 4] > > Thanks a lot. > > Best regards, > Barry >