[petsc-users] mapping from the original ordering to the PETSc/global ordering for the imported unstructured mesh

Matthew Knepley knepley at gmail.com
Wed Dec 23 11:07:23 CST 2020


On Wed, Dec 23, 2020 at 11:29 AM Hui LIU <h.liu at whu.edu.cn> wrote:

> Dear the maintainer of the PETSc:
>
>
>
> I am implementing the CPU parallel finite element calculation of the
> unstructured grids by using the great PETSc platform.
>
> The unstructured grids are imported from other open access software, for
> example, Gmsh.
>
> Herein we call the node numbering for the mesh generated by the Gmsh as
> the original ordering, before distributing the mesh to each processor.
>
> After distributing this unstructured mesh to each process, is it possible
> to find the mapping between the original ordering (before distributing) and
> the PETSc/global ordering (after distributing)?
>
> If yes, how to extract or find it?
>
>
It is possible using
https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DMPLEX/DMPlexNaturalToGlobalBegin.html
However, I do not recommend you do this. It is not scalable and makes your
code fragile.


> If no, could you give me some suggestions for better applying the
> displacement constraints and load boundary conditions?
>

Sure. You should mark your boundaries with a marker that indicates the kind
of condition to apply. This is easy in GMsh, and those
markers will be translated to DMLabel objects when you import the mesh.
These markers will be preserved when the mesh is distributed,
or redistributed for load balance.


> Another question is how to distinguish the nodes subject to displacement
> boundary constraints and the nodes subject to the external force loads.
>

Use a different marker.

  Thanks,

     Matt


> Thank you very much. Looking forward to your reply.
>
>
>
> Best regards,
>
>
>
> Hui Liu
>
> Wuhan University
>
>
>


-- 
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/20201223/a375ca9e/attachment.html>


More information about the petsc-users mailing list