Repository navigation
Conversation
The CGNS mesh reader made one marker per boundary section, named after the section. Meshers that split a boundary by element type (e.g. sections tri_wall and quad_wall) therefore gave two markers, and the same boundary conditions had to be set twice in the config file. Name each boundary section after the boundary condition of the zone (ZoneBC) that covers its elements: the family name of that BC if it has one, otherwise the name of the BC. Sections sharing a name become one marker, and their connectivity is concatenated. Sections that no BC covers, and files without a ZoneBC node, keep the previous behaviour of one marker named after the section. A BC given by points instead of elements is ignored, since it cannot be matched to a section. The sections grouped into a marker are printed to the console. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ctions The mesh (su2code/TestCases, cgns_reader/) is a small 3D channel whose boundaries are split in sections by element type and by block, grouped by the ZoneBC. The markers of the config file are the names of the BCs, so the case only runs if the reader groups the sections into markers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L7oxzVir4zENrpy3K3W6Fm
Temporary, for the mesh of the TestCases PR. To be reverted to develop before merging. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L7oxzVir4zENrpy3K3W6Fm
This was referenced Oct 14, 2026
…ne BC - cg_famname_read copies the whole family name, which can be longer than 32 characters (a path in the family tree of CGNS 4): use a buffer of the maximum size, and keep only the last part of a path. - A section partly covered by a boundary condition, or covered by boundary conditions with different names, took the name of the last one. It is now kept as one marker named after the section, with a warning, since a section cannot be split. - Boundary conditions given by ElementRange or ElementList without a GridLocation (older files) are also matched to the sections. - The loop index of the markers has the type of their number (CodeQL). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L7oxzVir4zENrpy3K3W6Fm
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
Meshers such as Pointwise often split one boundary into several CGNS sections. For example, a wing with triangles and quadrilaterals becomes
tri_wingandquad_wing. The CGNS reader made one marker per section, so the config file had to list both names and set the same boundary condition twice.With this PR, the reader uses the
ZoneBCof the file:ZoneBC, work as before: one marker per section, named after the section.FaceCenter/EdgeCenter/CellCenter, orElementRange/ElementListin older files. BCs given by points (Vertex) cannot be matched to a section and are ignored.Marker back groups the sections quad_back tri_back.So the grouping follows the names written by the mesher. The reader does not guess from similar names. For two BCs
lower_wallandlower_WT:lowerlowerlower_walland familylower_WTlower_wallandlower_WTlower_wallandlower_WTMeshers such as Pointwise usually give each BC its own family with the same name. So two BCs in the mesher stay two markers in SU2, unless the user puts them in the same family.
Test case
New regression test
cgns_reader_sections(serial and parallel),TestCases/cgns_reader/channel_sections.cfg. The mesh is a small 3D channel with 96 cells, made of hexahedra and prisms. It covers each case:lower_1,lower_2lower_wall, familylowerlowerquad_back,tri_backback, familybackbackquad_front,tri_frontfront, familyfrontfrontupper_sideupper, no familyupperinletinletdevelop, the case stops with:The configuration file doesn't have any definition for marker lower_1.I also checked a real Pointwise mesh of a wing (1.1M cells, 4 ranks):
developstops ontri_back.backhas 4209 elements, which istri_back(1002) +quad_back(3207).The regression tests that already read CGNS meshes give the same results as with
develop: wedge, bend, cylinder_split, MFR_coupling, flatplate_supersonic, flamelet, and the CGNS output/readback tests.Related Work
.github/workflows/regression.ymluses thecgnsReaderMarkersbranch of TestCases until Mesh with boundaries split in sections for the CGNS reader test TestCases#212 is merged. I will set it back todevelopbefore merging.PR Checklist
pre-commit run --allto format old commits.🤖 Generated with Claude Code
https://claude.ai/code/session_01L7oxzVir4zENrpy3K3W6Fm