[petsc-users] DMPlex and CGNS
Jed Brown
jed at jedbrown.org
Mon Jan 16 17:15:07 CST 2023
How soon do you need this? I understand the grumbling about CGNS, but it's easy to build, uses HDF5 parallel IO in a friendly way, supports high order elements, and is generally pretty expressive. I wrote a parallel writer (with some limitations that I'll remove) and plan to replace the current reader with a parallel reader because I have need to read big CGNS meshes. Alas, my semester is starting so it's hard to make promises, but this is a high priority for my research group and if you share your mesh file, I hope to be able to make the parallel reader work in the next couple weeks.
"Ferrand, Jesus A." <FERRANJ2 at my.erau.edu> writes:
> Dear PETSc team:
>
> I would like to use DMPlex to partition a mesh stored as a CGNS file. I configured my installation with --download_cgns = 1, got me a .cgns file and called DMPlexCreateCGNSFromFile() on it. Doing so got me this error:
>
> [0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
> [0]PETSC ERROR: Error in external library
> [0]PETSC ERROR: CGNS file must have a single section, not 4
> [0]PETSC ERROR: See https://petsc.org/release/faq/ for trouble shooting.
> [0]PETSC ERROR: Petsc Release Version 3.18.3, unknown
> [0]PETSC ERROR: ./program.exe on a arch-linux-c-debug named F86 by jesus Mon Jan 16 17:25:11 2023
> [0]PETSC ERROR: Configure options --download-mpich=yes --download-hdf5=yes --download-cgns=yes --download-metis=yes --download-parmetis=yes --download-ptscotch=yes --download-chaco=yes --with-32bits-pci-domain=1
> [0]PETSC ERROR: #1 DMPlexCreateCGNS_Internal() at /home/jesus/Desktop/JAF_NML/3rd_Party/PETSc/petsc/src/dm/impls/plex/cgns/plexcgns2.c:104
> [0]PETSC ERROR: #2 DMPlexCreateCGNS() at /home/jesus/Desktop/JAF_NML/3rd_Party/PETSc/petsc/src/dm/impls/plex/plexcgns.c:60
> [0]PETSC ERROR: #3 DMPlexCreateCGNSFromFile_Internal() at /home/jesus/Desktop/JAF_NML/3rd_Party/PETSc/petsc/src/dm/impls/plex/cgns/plexcgns2.c:27
> [0]PETSC ERROR: #4 DMPlexCreateCGNSFromFile() at /home/jesus/Desktop/JAF_NML/3rd_Party/PETSc/petsc/src/dm/impls/plex/plexcgns.c:29
>
> I looked around mail archives for clused and found this one (https://lists.mcs.anl.gov/pipermail/petsc-users/2018-June/035544.html). There, Matt provides a link to the source code for DMPlexCreateCGNSFromFile() and another (seemingly broken) link to CGNS files that can be opened with the former. After reading the source code I now understand that it is hardcoded for CGNS files that feature a single "base" and a single "section", whatever those are.
>
> After navigating the CGNS documentation, I can sympathize with the comments in the source code.
>
> Anyhow, I wanted to ask if I could be furnished with one such CGNS file that is compatible with DMPlexCreateCGNSFromFile() to see if I can modify my CGNS files to conform to it. If not, I will look into building the DAG myself using DMPlex APIs.
>
>
> Sincerely:
>
> J.A. Ferrand
>
> Embry-Riddle Aeronautical University - Daytona Beach FL
>
> 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
More information about the petsc-users
mailing list