[petsc-users] DMPlex global to natural ordering

Danyang Su danyang.su at gmail.com
Wed Nov 28 14:12:52 CST 2018


Hi Blaise,

Thanks for the quick reply. That's a useful example.

Danyang

On 2018-11-28 11:54 a.m., Blaise A Bourdin wrote:
> Have a look at src/dm/impls/plex/examples/tests/ex26.c It does exactly this (among other stuff) using exodus format
>
> Blaise
>
>> On Nov 28, 2018, at 1:51 PM, Danyang Su via petsc-users <petsc-users at mcs.anl.gov> wrote:
>>
>> Dear All,
>>
>> My simulation needs to pass initial condition from external file to the code. The initial condition in the external file is given in the natural ordering, which is consistent with the original input mesh file in VTK format. In the previous development, I use label to save all the local vertex numbering to global natural numbering. The code works, but it is not efficient in DMPlexDistribute when the mesh size is increased with a huge number of different labels.
>>
>> I am looking for a more efficient way to pass the natural ordering data and let each processor read the local owned data (either with or without ghost nodes). I am trying to use DMPlexGetGlobalToNaturalSF and generate local node index to global natural node index. Due to my lack of knowledge about graph theory, I am a bit lost. Is there any example available to do this?
>>
>> Thanks,
>>
>> Danyang
>>
>>
>>


More information about the petsc-users mailing list