[petsc-users] How to get nodes list refer to unstructure mesh element

Mark Adams mfadams at lbl.gov
Fri Oct 12 04:21:50 CDT 2018


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 陳宗興 <barrydog505 at 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20181012/d5b7b7d2/attachment.html>


More information about the petsc-users mailing list