[petsc-users] DMPlex shared node indexing

Matthew Knepley knepley at gmail.com
Fri Nov 26 14:07:50 CST 2021


On Fri, Nov 26, 2021 at 12:49 AM 袁煕 <yuanxi at advancesoft.jp> wrote:

> Dear PETSc-team,
>
> When the mesh is distributed, the vertices are renumbered and some
> vertices are shared by neighboring CPUs. My question is:
>
> 1. How to check which vertice is a ghost one?
>

It is present in the PetscSF describing the connections between local
meshes. So you would do

  DMGetPointSF(dm, &sf);
  PetscSFGetGraph(sf, NULL, &Nl, &leaves, NULL);

If your point in the list 'leaves' of length Nl, then it is a ghost.


> 2. Are those ghost vertices always at the end of vertices list? If not
>

No.


> 3. Are there simple ways to let those ghost vertices come after owned ones?
>

You can introduce a permutation of the points when numbering unknowns. This
is what Barry does in his branch.

  Thanks,

     Matt


> Many thanks
>
> Yuan
>


-- 
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/20211126/e7d13d7e/attachment.html>


More information about the petsc-users mailing list