[petsc-users] DMPlex and CGNS

Engblom, William A. engbl7de at erau.edu
Mon Jan 16 16:48:09 CST 2023


Jesus,

The CGNS files we get from Pointwise have only one base, so that should not be an issue.  However, sections are needed to contain each cell type, the BCs, and zonal boundaries. So, there are always several sections.  The grid that Spencer made for you must have multiple sections.  We have to be able to deal with grids like Spencer's example or else it's not useful.

B.






________________________________
From: Ferrand, Jesus A. <FERRANJ2 at my.erau.edu>
Sent: Monday, January 16, 2023 5:41 PM
To: petsc-users at mcs.anl.gov <petsc-users at mcs.anl.gov>
Subject: DMPlex and CGNS

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20230116/9a58353b/attachment.html>


More information about the petsc-users mailing list