[petsc-users] local to global mapping for DMPlex
Yann JOBIC
yann.jobic at univ-amu.fr
Wed Dec 20 10:08:42 CST 2017
On 12/19/2017 05:50 PM, Matthew Knepley wrote:
> On Tue, Dec 19, 2017 at 11:40 AM, Yann JOBIC <yann.jobic at univ-amu.fr
> <mailto:yann.jobic at univ-amu.fr>> wrote:
>
> Hello,
>
> We want to extract the cell connectivity from a DMPlex. We have no
> problem for a sequential run.
>
>
> Do you want it on disk? If so, you can just DMView() for HDF5. That
> outputs the connectivity in a global numbering.
> I can show you the calls I use inside if you want.
I looked at the code, specifically DMPlexWriteTopology_Vertices_HDF5_Static
cellIS should have what i want.
However it seems that it is not the case. Do i look at the right spot in
the code ?
I also looked at DMPlexGetCellNumbering, which does exactly what i want
for the global numbering of Cells, even if the ordering is different for
different number of processors.
When i use DMPlexGetVertexNumbering, i've got negative values, which is
correctly handeled by DMPlexWriteTopology_Vertices_HDF5_Static, but i
really don't understand this part.
I succeed in having the coordinates, but maybe not in the right order. I
reused DMPlexWriteCoordinates_HDF5_Static, which create a Vec of vertex
coordinates, but i couldn't understand the order of vertex coordinate
linked (or not) with DMPlexWriteTopology_Vertices_HDF5_Static. The
number of local coordinates is also strange, and does not correspond to
the cell's topology.
Thanks for the help!
Regards,
Yann
> I usually put
>
> DMViewFromOptions(dm, NULL, "-dm_view")
>
> Then
>
> -dm_view hdf5:mesh.h5
>
> Thanks,
>
> Matt
>
> However for parallel ones, we need to get the node numbering in
> the global ordering, as when we distribute the mesh, we only have
> local nodes, and thus local numbering.
>
> It seems that we should use DMGetLocalToGlobalMapping (we are
> using Fortran with Petsc 3.8p3). However, we get the running error :
>
> [0]PETSC ERROR: No support for this operation for this object type
> [0]PETSC ERROR: DM can not create LocalToGlobalMapping
>
> Is it the right way to do it ?
>
> Many thanks,
>
> Regards,
>
> Yann
>
>
>
>
> --
> 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.caam.rice.edu/%7Emk51/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20171220/cf8a275a/attachment.html>
More information about the petsc-users
mailing list