[petsc-users] Correct way to set/track global numberings in DMPlex?

Ferrand, Jesus A. FERRANJ2 at my.erau.edu
Wed Apr 3 13:17:05 CDT 2024


Dear PETSc team:

(Hoping to get a hold of Jed and/or Matt for this one)
(Also, sorry for the mouthful below)

I'm developing routines that will read/write CGNS files to DMPlex and vice versa.
One of the recurring challenges is the bookkeeping of global numbering for vertices and cells.
Currently, I am restricting my support to single Zone CGNS files, in which the file provides global numbers for vertices and cells.

I used PetscHSetI as exemplified in DMPlexBuildFromCellListParallel() to obtain local DAG numbers from the global numbers provided by the file.
I also used PetscSFCreateByMatchingIndices() to establish a basic DAG point distribution over the MPI processes.
I use this PointSF to manually assemble a global PetscSection.
For owned DAG points  (per the PointSF) , I call PetscSectionSetOffset(section, point, file_offset);
For ghost DAG points  (per the PointSF) I call PetscSectionSetOffset(section, point, -(file_offset + 1));

All of what I have just described happens in my CGNS version of DMPlexTopologyLoad().
My intention is to retain those numbers into the DMPlex, and reuse them in my CGNS analogues of DMPlexCoordinatesLoad(), DMPlexLabelsLoad(), and DMPlexGlobalVectorLoad().
Anyhow, is this a good wait to track global numbers?
Also, I need (for other applications) to eventually call DMPlexInterpolate() and DMPlexDistribute(), will the global PetscSection offsets be preserved after calling those two?



Sincerely:

J.A. Ferrand

Embry-Riddle Aeronautical University - Daytona Beach - FL
Ph.D. Candidate, Aerospace Engineering

M.Sc. Aerospace Engineering

B.Sc. Aerospace Engineering

B.Sc. Computational Mathematics


Phone: (386)-843-1829

Email(s): ferranj2 at my.erau.edu

    jesus.ferrand at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20240403/5e1d7fbe/attachment.html>


More information about the petsc-users mailing list