Skip to content

Commit 4379338

Browse files
authored
Merge pull request #2477 from su2code/feature_CGNS_FixHOM
Merging in this one.
2 parents 8a591aa + 77467fe commit 4379338

File tree

2 files changed

+35
-2
lines changed

2 files changed

+35
-2
lines changed

Common/src/geometry/meshreader/CCGNSMeshReaderBase.cpp

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,38 @@ void CCGNSMeshReaderBase::ReadCGNSSectionMetadata() {
320320
/* Check for 1D elements in 2D problems, or for 2D elements in
321321
3D problems. If found, mark the section as a boundary section. */
322322

323-
if ((dimension == 2) && (elemType == BAR_2 || elemType == BAR_3)) isInterior[s] = false;
324-
if ((dimension == 3) && (elemType == TRI_3 || elemType == QUAD_4)) isInterior[s] = false;
323+
if (dimension == 2) {
324+
switch (elemType) {
325+
case BAR_2:
326+
case BAR_3:
327+
case BAR_4:
328+
case BAR_5:
329+
isInterior[s] = false;
330+
break;
331+
default: // To avoid a compiler warning.
332+
break;
333+
}
334+
} else {
335+
switch (elemType) {
336+
case TRI_3:
337+
case TRI_6:
338+
case TRI_9:
339+
case TRI_10:
340+
case TRI_12:
341+
case TRI_15:
342+
case QUAD_4:
343+
case QUAD_8:
344+
case QUAD_9:
345+
case QUAD_12:
346+
case QUAD_16:
347+
case QUAD_P4_16:
348+
case QUAD_25:
349+
isInterior[s] = false;
350+
break;
351+
default: // To avoid a compiler warning.
352+
break;
353+
}
354+
}
325355

326356
/*--- Increment the global element offset for each section
327357
based on whether or not this is a surface or volume section.

Common/src/geometry/meshreader/CCGNSMeshReaderFEM.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ CCGNSMeshReaderFEM::CCGNSMeshReaderFEM(const CConfig* val_config, unsigned short
3939
ReadCGNSDatabaseMetadata();
4040
ReadCGNSZoneMetadata();
4141

42+
/*--- Read the basic information about the sections. ---*/
43+
ReadCGNSSectionMetadata();
44+
4245
/*--- Read the volume connectivity and distribute it
4346
linearly over the MPI ranks. ---*/
4447
ReadCGNSVolumeElementConnectivity();

0 commit comments

Comments
 (0)