53 const bool doublePrecisionFields;
58 struct BoundaryMarker {
60 unsigned short kindBC;
61 vector<unsigned long> conn;
63 vector<BoundaryMarker> boundaryMarkers;
65 vector<string> surfaceMarkers;
68 vector<string> boundaryNames;
69 string volumeZoneName =
"Zone";
70 string solutionName =
"Fields";
71 std::map<unsigned short, string> sectionNames;
86 unsigned long nLocalPoints;
93 static constexpr cgsize_t maxSectionEntries = std::numeric_limits<int32_t>::max();
96 static constexpr size_t maxNameLength = 32;
115 void WriteData(
string val_filename)
override ;
139 void InitializeMeshFile(
const string& val_filename);
145 void WriteZone(
const string& zoneName);
151 void InitializeZone(
const string& zoneName);
160 vector<string> GetUniqueNames(
const vector<string>& tags, vector<string> taken = {})
const;
176 cgsize_t SectionCount(
GEO_TYPE type)
const;
181 void WriteBoundaries();
189 void WriteField(
int iField,
const string& FieldName);
198 void WriteFieldOfType(
int iField,
const string& FieldName, DataType_t dataType);
205 void WriteConnectivity(
GEO_TYPE type,
const string& SectionName);
210 void InitializeFields();
221 int SectionWrite(
const string& name, ElementType_t type, cgsize_t start, cgsize_t end,
int* section);
231 int ElementsWriteData(
int section, cgsize_t start, cgsize_t end,
const cgsize_t* elements);
237 static inline void CallCGNS(
const int& ier) {
238 if (ier) cg_error_exit();
245 static BCType_t GetCGNSBCType(
unsigned short kindBC);
251 static inline ElementType_t GetCGNSType(
unsigned short elementType) {
252 switch (elementType) {
268 assert(
false &&
"Invalid element type.");
269 return ElementTypeNull;
Headers fo the file writer class.
Definition CCGNSFileWriter.hpp:50
void WriteData(string val_filename) override
Write sorted data to file in CGNS file format.
Definition CCGNSFileWriter.cpp:41
void SetSurfaceMarkers(CConfig *valConfig, CGeometry *valGeometry)
Write a surface file with one zone per plotted marker, named as the marker. The data of the surface s...
Definition CCGNSFileWriter.cpp:122
void SetBoundaryMarkers(const CConfig *valConfig, const CGeometry *valGeometry, const CFVMDataSorter *volumeSorter)
Add the boundaries to a volume file: one boundary section, BC and family per marker,...
Definition CCGNSFileWriter.cpp:86
static const string fileExt
File extension.
Definition CCGNSFileWriter.hpp:102
Main class for defining the problem; basically this class reads the configuration file,...
Definition CConfig.hpp:64
Definition CFVMDataSorter.hpp:33
Definition CFileWriter.hpp:42
Parent class for defining the geometry of the problem (complete geometry, multigrid agglomerated geom...
Definition CGeometry.hpp:75
Definition CParallelDataSorter.hpp:39
GEO_TYPE
Types of geometric entities based on VTK nomenclature.
Definition option_structure.hpp:131
@ TRIANGLE
VTK nomenclature for defining a triangle element.
Definition option_structure.hpp:134
@ PYRAMID
VTK nomenclature for defining a pyramid element.
Definition option_structure.hpp:139
@ PRISM
VTK nomenclature for defining a prism element.
Definition option_structure.hpp:138
@ QUADRILATERAL
VTK nomenclature for defining a quadrilateral element.
Definition option_structure.hpp:135
@ HEXAHEDRON
VTK nomenclature for defining a hexahedron element.
Definition option_structure.hpp:137
@ LINE
VTK nomenclature for defining a line element.
Definition option_structure.hpp:133
@ TETRAHEDRON
VTK nomenclature for defining a tetrahedron element.
Definition option_structure.hpp:136