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

Matthew Knepley knepley at gmail.com
Fri Oct 12 06:04:54 CDT 2018


If you only have cell-vertex meshes, then using the single-layer version
DMPlexGetCone() is faster.

  Thanks,

     Matt

On Fri, Oct 12, 2018 at 5:56 AM 陳宗興 <barrydog505 at gmail.com> wrote:

> Thanks, I'll check them out.
>
> Mark Adams <mfadams at lbl.gov> 於 2018年10月12日 週五 下午5:22寫道:
>
>> 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
>>>
>>

-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20181012/82069ce5/attachment.html>


More information about the petsc-users mailing list