[petsc-users] PetscSection and DMPlexVTKWriteAll in parallel

Ferrand, Jesus A. FERRANJ2 at my.erau.edu
Mon Mar 21 10:22:28 CDT 2022


Greetings.

I am having trouble exporting a vertex-based solution field to ParaView when I run my PETSc script in parallel (see screenshots). The smoothly changing field is produced by my serial runs whereas the "messed up" one is produced by my parallel runs. This is not a calculation bug, rather, it concerns the vtk output only (the solution field  is the same in parallel and serial). I am using DMPlexVTKWriteAll() but will make the switch to hdf5 sometime.

Anyways, my suspicion is about PetscSection and how I am setting it up. I call PetscSectionSetChart() where my "pStart" and "pEnd" I collect from  DMPlexGetDepthStratum() where "depth" is set to zero (for vertices) and then I call DMSetLocalSection(). After tinkering with DMPlex routines, I realize that DMPlexGetDepthStratum() returns "pStart" and "pEnd" in local numbering when the run is in parallel. Thus, I think that my serial output is correct because in that case local numbering matches the global numbering.

So, am I correct in believing that the PetscSectionSetChart() call should be done with global numbering?
Also, I noticed that the parallel DMPlex counts ghost vertices towards the "pStart" and "pEnd". So, when I set the chart in the local PetscSection, should I figure out the chart for the owned vertices or can PETSc figure the ghost/owned dilemma when the local PetscSections feature overlapping charts?


Sincerely:

J.A. Ferrand

Embry-Riddle Aeronautical University - Daytona Beach FL

M.Sc. Aerospace Engineering | May 2022

B.Sc. Aerospace Engineering

B.Sc. Computational Mathematics



Sigma Gamma Tau

Tau Beta Pi



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/20220321/28b82d20/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot from 2022-03-18 19-18-25.png
Type: image/png
Size: 63193 bytes
Desc: Screenshot from 2022-03-18 19-18-25.png
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220321/28b82d20/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot from 2022-03-18 19-18-11.png
Type: image/png
Size: 22021 bytes
Desc: Screenshot from 2022-03-18 19-18-11.png
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220321/28b82d20/attachment-0003.png>


More information about the petsc-users mailing list