[petsc-users] Re-ordering in DMPlexCreateFromCellListParallelPetsc

Nicolas Barral nicolas.barral at math.u-bordeaux.fr
Sat Mar 20 09:06:57 CDT 2021


Hi all,

I'm building a plex from elements arrays using 
DMPlexCreateFromCellListParallelPetsc. Once the plex is built, I need to 
set up boundary labels. I have an array of faces containing a series of 
3 vertex local indices. To rebuild boundary labels, I need to loop over 
the array and get the join of 3 consecutive points to find the 
corresponding face point in the DAG.

Problem, vertices get reordered by DMPlexCreateFromCellListParallelPetsc 
so that locally owned vertices are before remote ones, so local indices 
are changed and the indices in the face array are not good anymore.

Is there a way to track this renumbering ? For owned vertices, I can 
find the local index from the global one (so do old local index -> 
global index -> new local index). For the remote ones, I'm not sure. I 
can hash global indices, but is there a more idiomatic way ?

Thanks,

-- 
Nicolas



More information about the petsc-users mailing list