[petsc-users] DMPlex Parallel Output and DMPlexCreateSection Crashes when DMPlexCreateGmshFromFile used

Mike Michell mi.mike1021 at gmail.com
Mon Apr 25 20:29:52 CDT 2022


Dear PETSc developer team,

I'm trying to learn DMPlex to build a parallel finite volume code in 2D &
3D. More specifically, I want to read a grid from .msh file by Gmsh.
For practice, I modified /dm/impls/plex/ex1f90.F90 case to read &
distribute my sample 2D grid, which is attached. I have two questions as
below:

(1) First, if I do not use my grid, but use the default box grid built by
ex1f90.F90 and if I try "DMPlexDistribute" over mpi processors, the output
file (sol.vtk) has only some portion of the entire mesh. How can I print
out the entire thing into a single file? Is there any example for parallel
output? (Related files attached to "/Question_1/") Paraview gives me some
error messages about data size mismatching.

(2) If I create DMPlex object through "DMPlexCreateGmshFromFile",
"DMPlexCreateSection" part is crashed. I do not understand why my example
code does not work, because the only change was switching from "DMCreate"
to "DMPlexCreateGmshFromFile" and providing "new.msh" file. Without the
PetscSection object, the code works fine. Any comments about this? (Related
files attached to "/Question_2/")

Thanks,
Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220425/24629943/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Question_2.zip
Type: application/x-zip-compressed
Size: 3412 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220425/24629943/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Question_1.zip
Type: application/x-zip-compressed
Size: 2331 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220425/24629943/attachment-0001.bin>


More information about the petsc-users mailing list