Copying my private reply that appeared off-list. If you have one base with different element types, that's in scope for what I plan to develop soon.
Congrats, you crashed cgnsview. $ cgnsview dl/HybridGrid.cgns Error in startup script: file was not found while executing "CGNSfile $ProgData(file)" (procedure "file_stats" line 4) invoked from within "file_stats" (procedure "file_load" line 53) invoked from within "file_load $fname" invoked from within "if {$argc} { set fname [lindex $argv [expr $argc - 1]] if {[file isfile $fname] && [file readable $fname]} { file_load $fname } }" (file "/usr/share/cgnstools/cgnsview.tcl" line 3013) This file looks okay in cgnscheck and paraview, but I don't have a need for multi-block and I'm stretched really thin so probably won't make it work any time soon. But if you make a single block with HexElements alongside PyramidElements and TetElements, I should be able to read it. If you don't mind prepping such a file (this size or smaller), it would help me test. "Engblom, William A." <engbl...@erau.edu> writes: > 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. <ferra...@my.erau.edu> > Sent: Monday, January 16, 2023 5:41 PM > To: petsc-users@mcs.anl.gov <petsc-users@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): ferra...@my.erau.edu > > jesus.ferr...@gmail.com