Skip to content

Commit cd4ecca

Browse files
authored
Merge pull request #1566 from su2code/fix_1564
Fix CGNS mesh reader for multizone problems (one CGNS mesh per zone)
2 parents 265bc4f + 1eb38b6 commit cd4ecca

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

Common/include/geometry/meshreader/CCGNSMeshReaderFVM.hpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,9 @@ class CCGNSMeshReaderFVM: public CMeshReaderFVM {
4545

4646
#ifdef HAVE_CGNS
4747
int cgnsFileID; /*!< \brief CGNS file identifier. */
48-
int cgnsBase; /*!< \brief CGNS database index. */
49-
int cgnsZone; /*!< \brief CGNS zone index. */
48+
const int cgnsBase = 1; /*!< \brief CGNS database index (the CGNS reader currently assumes a single database). */
49+
const int cgnsZone = 1; /*!< \brief CGNS zone index (and 1 zone in that database). */
5050

51-
int nZones; /*!< \brief Total number of zones in the CGNS file. */
5251
int nSections; /*!< \brief Total number of sections in the CGNS file. */
5352

5453
vector<bool> isInterior; /*!< \brief Vector of booleans to store whether each section in the CGNS file is an interior or boundary section. */

Common/src/geometry/meshreader/CCGNSMeshReaderFVM.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@ CCGNSMeshReaderFVM::CCGNSMeshReaderFVM(CConfig *val_config,
3535
: CMeshReaderFVM(val_config, val_iZone, val_nZone) {
3636

3737
#ifdef HAVE_CGNS
38-
/*--- We use val_iZone with +1 for the 1-based indexing in CGNS. ---*/
39-
cgnsZone = val_iZone + 1;
40-
nZones = val_nZone;
41-
42-
/*--- The CGNS reader currently assumes a single database. ---*/
43-
cgnsBase = 1;
4438
OpenCGNSFile(config->GetMesh_FileName());
4539

4640
/*--- Read the basic information about the database and zone(s). ---*/

0 commit comments

Comments
 (0)