NEMoSys  0.63.0
A modular, extensible resource with robust automated mesh generation, mesh quality analysis, adaptive mesh refinement, and data transfer between arbitrary meshes.
rocstarCgns.H
Go to the documentation of this file.
1 /*******************************************************************************
2 * Promesh *
3 * Copyright (C) 2022, IllinoisRocstar LLC. All rights reserved. *
4 * *
5 * Promesh is the property of IllinoisRocstar LLC. *
6 * *
7 * IllinoisRocstar LLC *
8 * Champaign, IL *
9 * www.illinoisrocstar.com *
10 * promesh@illinoisrocstar.com *
11 *******************************************************************************/
12 /*******************************************************************************
13 * This file is part of Promesh *
14 * *
15 * This version of Promesh is free software: you can redistribute it and/or *
16 * modify it under the terms of the GNU Lesser General Public License as *
17 * published by the Free Software Foundation, either version 3 of the License, *
18 * or (at your option) any later version. *
19 * *
20 * Promesh is distributed in the hope that it will be useful, but WITHOUT ANY *
21 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS *
22 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more *
23 * details. *
24 * *
25 * You should have received a copy of the GNU Lesser General Public License *
26 * along with this program. If not, see <https://www.gnu.org/licenses/>. *
27 * *
28 *******************************************************************************/
29 #ifndef NEMOSYS_ROCSTARCGNS_H_
30 #define NEMOSYS_ROCSTARCGNS_H_
31 
32 // Nemosys headers
33 #include "nemosys_export.h"
34 #include "IO/cgnsAnalyzer.H"
35 
36 /* Special purpose class for Rocstar CGNS files */
37 class NEMOSYS_EXPORT rocstarCgns : public cgnsAnalyzer {
38  public:
39  rocstarCgns(std::string fname);
40  rocstarCgns(const std::vector<std::string> &fnames);
41  ~rocstarCgns();
42 
43  public:
44  // loading/unloading
45  void loadCgSeries();
46  void loadCgSeries(int nCg);
47  virtual void closeCG();
48 
49  // cgObjects access
50  int getNCgObj();
51 
52  // name/misc access
53  std::string getBaseName();
54  std::string getBaseName(int indx);
55  std::string getCgFName(int indx);
56  std::string getBaseItrName(int indx);
57  int getNTStep(int indx);
58  double getTimeStep(int indx);
59  std::string getZoneItrName(int indx, int zidx);
60  std::string getGridCrdPntr(int indx, int zidx);
61  std::string getSolutionPntr(int indx, int zidx);
62 
63  // zone data access
64  int getNZone(int indx);
65  std::string getZoneName(cgnsAnalyzer *cgObj, int zoneIdx);
66  std::string getZoneName(int cgIdx, int zoneIdx);
67  CGNS_ENUMT(ZoneType_t) getZoneType(int indx, int zidx);
68  std::string getSectionName(int cgIdx, int zoneIdx);
69  int getElementType(int cgIdx, int zoneIdx);
70  int getZoneNVrtx(cgnsAnalyzer *cgObj, int zoneIdx);
71  int getZoneNCell(cgnsAnalyzer *cgObj, int zoneIdx);
72  std::vector<double> getZoneCoords(cgnsAnalyzer *cgObj, int zoneIdx, int dim);
73  std::vector<cgsize_t> getZoneRealConn(cgnsAnalyzer *cgObj, int zoneIdx);
74  int getZoneRealSecType(cgnsAnalyzer *cgObj, int zoneIdx);
75 
76  // pane data access
77  int getPaneBcflag(cgnsAnalyzer *cgObj, int zoneIdx);
78  int getPanePatchNo(cgnsAnalyzer *cgObj, int zoneIdx);
79  int getPaneCnstrType(cgnsAnalyzer *cgObj, int zoneIdx);
80 
81  // data processing
82  void stitchGroup();
83  void stitchMe(cgnsAnalyzer *cgObj, int zoneIdx);
84  void stitchFldBc(cgnsAnalyzer *cgObj, int zoneIdx);
85  void stitchMe(rocstarCgns *cgObj);
86 
87  void setBurnBool(bool b) { _burn = b; };
88 
89  // management data
90  private:
91  std::string myCgFName;
92  std::string baseCgFName;
93  bool _burn;
94  std::vector<std::string> cgFNames;
95  int padSize;
96  std::vector<cgnsAnalyzer *> myCgObjs;
97 
98  // mesh data
99  private:
100  std::vector<int> bcFlag;
101  std::vector<int> bFlag;
102  std::vector<int> patchNo;
103 };
104 
105 #endif // NEMOSYS_ROCSTARCGNS_H_
std::string getSolutionPntr()
Definition: cgnsAnalyzer.C:443
std::string baseCgFName
Definition: rocstarCgns.H:92
void setBurnBool(bool b)
Definition: rocstarCgns.H:87
std::string getZoneItrName()
Definition: cgnsAnalyzer.C:439
std::vector< int > bcFlag
Definition: rocstarCgns.H:100
std::string getGridCrdPntr()
Definition: cgnsAnalyzer.C:441
std::string getBaseItrName()
Definition: cgnsAnalyzer.C:433
std::vector< int > patchNo
Definition: rocstarCgns.H:102
CGNS_ENUMT(MassUnits_t) getMassUnit()
double getTimeStep()
Definition: cgnsAnalyzer.C:455
std::string getSectionName()
Definition: cgnsAnalyzer.C:431
std::string getZoneName()
Definition: cgnsAnalyzer.C:425
std::string getBaseName()
Definition: cgnsAnalyzer.C:423
std::vector< std::string > cgFNames
Definition: rocstarCgns.H:94
std::vector< cgnsAnalyzer * > myCgObjs
Definition: rocstarCgns.H:96
std::vector< int > bFlag
Definition: rocstarCgns.H:101
virtual void closeCG()
Definition: cgnsAnalyzer.H:153
int getElementType()
Definition: cgnsAnalyzer.C:451