62 fluidUnitsMap.insert(std::pair<std::string,std::string>(
"CoordinateX",
"m"));
63 fluidUnitsMap.insert(std::pair<std::string,std::string>(
"CoordinateY",
"m"));
64 fluidUnitsMap.insert(std::pair<std::string,std::string>(
"CoordinateZ",
"m"));
65 fluidUnitsMap.insert(std::pair<std::string,std::string>(
"dispX",
"none"));
66 fluidUnitsMap.insert(std::pair<std::string,std::string>(
"dispY",
"none"));
67 fluidUnitsMap.insert(std::pair<std::string,std::string>(
"dispZ",
"none"));
68 fluidUnitsMap.insert(std::pair<std::string,std::string>(
"gs",
"m/s"));
69 fluidUnitsMap.insert(std::pair<std::string,std::string>(
"rhof",
"kg/(m^3)"));
70 fluidUnitsMap.insert(std::pair<std::string,std::string>(
"rhovfX",
"kg/(m^2 s)"));
71 fluidUnitsMap.insert(std::pair<std::string,std::string>(
"rhovfY",
"kg/(m^2 s)"));
72 fluidUnitsMap.insert(std::pair<std::string,std::string>(
"rhovfZ",
"kg/(m^2 s)"));
73 fluidUnitsMap.insert(std::pair<std::string,std::string>(
"rhoEf",
"(J/(m^3))"));
74 fluidUnitsMap.insert(std::pair<std::string,std::string>(
"pf",
"N/(m^2)"));
75 fluidUnitsMap.insert(std::pair<std::string,std::string>(
"Tf",
"K"));
76 fluidUnitsMap.insert(std::pair<std::string,std::string>(
"af",
"m/s"));
83 std::vector<float> dim1 = {0, 1, 0, 0, 0};
84 std::vector<float> dim2 = {0, 0, 0, 0, 0};
85 fluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"CoordinateX", dim1));
86 fluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"CoordinateY", dim1));
87 fluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"CoordinateZ", dim1));
88 fluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"gs", dim2));
89 fluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"rhof", dim2));
90 fluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"rhovfX", dim2));
91 fluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"rhovfY", dim2));
92 fluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"rhovfZ", dim2));
93 fluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"rhoEf", dim2));
94 fluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"pf", dim2));
95 fluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"Tf", dim2));
96 fluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"af", dim2));
106 fluidMagMap.insert(std::pair<std::string,int>(
"CoordinateX", 0));
107 fluidMagMap.insert(std::pair<std::string,int>(
"CoordinateY", 0));
108 fluidMagMap.insert(std::pair<std::string,int>(
"CoordinateZ", 0));
109 fluidMagMap.insert(std::pair<std::string,int>(
"dispX", 1));
110 fluidMagMap.insert(std::pair<std::string,int>(
"dispY", 0));
111 fluidMagMap.insert(std::pair<std::string,int>(
"dispZ", 0));
112 fluidMagMap.insert(std::pair<std::string,int>(
"gs", 0));
113 fluidMagMap.insert(std::pair<std::string,int>(
"rhof", 0));
114 fluidMagMap.insert(std::pair<std::string,int>(
"rhovfX", 1));
115 fluidMagMap.insert(std::pair<std::string,int>(
"rhovfY", 0));
116 fluidMagMap.insert(std::pair<std::string,int>(
"rhovfZ", 0));
117 fluidMagMap.insert(std::pair<std::string,int>(
"rhoEf", 0));
118 fluidMagMap.insert(std::pair<std::string,int>(
"pf", 0));
119 fluidMagMap.insert(std::pair<std::string,int>(
"Tf", 0));
120 fluidMagMap.insert(std::pair<std::string,int>(
"af", 0));
127 ifluidUnitsMap.insert(std::pair<std::string,std::string>(
"CoordinateX",
"m"));
128 ifluidUnitsMap.insert(std::pair<std::string,std::string>(
"CoordinateY",
"m"));
129 ifluidUnitsMap.insert(std::pair<std::string,std::string>(
"CoordinateZ",
"m"));
130 ifluidUnitsMap.insert(std::pair<std::string,std::string>(
"du_alpX",
"m"));
131 ifluidUnitsMap.insert(std::pair<std::string,std::string>(
"du_alpY",
"m"));
132 ifluidUnitsMap.insert(std::pair<std::string,std::string>(
"du_alpZ",
"m"));
133 ifluidUnitsMap.insert(std::pair<std::string,std::string>(
"vmX",
"m/s"));
134 ifluidUnitsMap.insert(std::pair<std::string,std::string>(
"vmY",
"m/s"));
135 ifluidUnitsMap.insert(std::pair<std::string,std::string>(
"vmZ",
"m/s"));
136 ifluidUnitsMap.insert(std::pair<std::string,std::string>(
"mdot_alp",
"kg/(m^2s)"));
137 ifluidUnitsMap.insert(std::pair<std::string,std::string>(
"rhofvf_alpX",
"kg/(m^2s)"));
138 ifluidUnitsMap.insert(std::pair<std::string,std::string>(
"rhofvf_alpY",
"kg/(m^2s)"));
139 ifluidUnitsMap.insert(std::pair<std::string,std::string>(
"rhofvf_alpZ",
"kg/(m^2s)"));
140 ifluidUnitsMap.insert(std::pair<std::string,std::string>(
"Tflm_alp",
"K"));
141 ifluidUnitsMap.insert(std::pair<std::string,std::string>(
"Tb_alp",
"K"));
142 ifluidUnitsMap.insert(std::pair<std::string,std::string>(
"nf_alpX",
"none"));
143 ifluidUnitsMap.insert(std::pair<std::string,std::string>(
"nf_alpY",
"none"));
144 ifluidUnitsMap.insert(std::pair<std::string,std::string>(
"nf_alpZ",
"none"));
145 ifluidUnitsMap.insert(std::pair<std::string,std::string>(
"pf",
"Pa"));
146 ifluidUnitsMap.insert(std::pair<std::string,std::string>(
"tfX",
"Pa"));
147 ifluidUnitsMap.insert(std::pair<std::string,std::string>(
"tfY",
"Pa"));
148 ifluidUnitsMap.insert(std::pair<std::string,std::string>(
"tfZ",
"Pa"));
149 ifluidUnitsMap.insert(std::pair<std::string,std::string>(
"qc",
"kgK/(m^2s)"));
150 ifluidUnitsMap.insert(std::pair<std::string,std::string>(
"qr",
"kgK/(m^2s)"));
151 ifluidUnitsMap.insert(std::pair<std::string,std::string>(
"rhof_alp",
"kg/m^3"));
152 ifluidUnitsMap.insert(std::pair<std::string,std::string>(
"zoomFact",
"none"));
153 ifluidUnitsMap.insert(std::pair<std::string,std::string>(
"gs",
"m/s"));
154 ifluidUnitsMap.insert(std::pair<std::string,std::string>(
"mdot_old",
"kg/(m^2 s)"));
161 std::vector<float> dim1 = {0, 1, 0, 0, 0};
162 std::vector<float> dim2 = {0, 0, 0, 0, 0};
163 ifluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"CoordinateX", dim1));
164 ifluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"CoordinateY", dim1));
165 ifluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"CoordinateZ", dim1));
166 ifluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"du_alpX", dim2));
167 ifluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"du_alpY", dim2));
168 ifluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"du_alpZ", dim2));
169 ifluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"vmX", dim2));
170 ifluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"vmY", dim2));
171 ifluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"vmZ", dim2));
172 ifluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"mdot_alp", dim2));
173 ifluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"rhofvf_alpX", dim2));
174 ifluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"rhofvf_alpY", dim2));
175 ifluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"rhofvf_alpZ", dim2));
176 ifluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"Tflm_alp", dim2));
177 ifluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"Tb_alp", dim2));
178 ifluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"pf", dim2));
179 ifluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"tfX", dim2));
180 ifluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"tfY", dim2));
181 ifluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"tfZ", dim2));
182 ifluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"qc", dim2));
183 ifluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"qr", dim2));
184 ifluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"rhof_alp", dim2));
185 ifluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"zoomFact", dim2));
186 ifluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"gs", dim2));
187 ifluidDimMap.insert(std::pair<std::string,std::vector<float>>(
"mdot_old", dim2));
194 ifluidMagMap.insert(std::pair<std::string,int>(
"CoordinateX", 0));
195 ifluidMagMap.insert(std::pair<std::string,int>(
"CoordinateY", 0));
196 ifluidMagMap.insert(std::pair<std::string,int>(
"CoordinateZ", 0));
197 ifluidMagMap.insert(std::pair<std::string,int>(
"du_alpX", 1));
198 ifluidMagMap.insert(std::pair<std::string,int>(
"du_alpY", 0));
199 ifluidMagMap.insert(std::pair<std::string,int>(
"du_alpZ", 0));
200 ifluidMagMap.insert(std::pair<std::string,int>(
"vmX", 1));
201 ifluidMagMap.insert(std::pair<std::string,int>(
"vmY", 0));
202 ifluidMagMap.insert(std::pair<std::string,int>(
"vmZ", 0));
203 ifluidMagMap.insert(std::pair<std::string,int>(
"mdot_alp", 0));
204 ifluidMagMap.insert(std::pair<std::string,int>(
"rhofvf_alpX", 1));
205 ifluidMagMap.insert(std::pair<std::string,int>(
"rhofvf_alpY", 0));
206 ifluidMagMap.insert(std::pair<std::string,int>(
"rhofvf_alpZ", 0));
207 ifluidMagMap.insert(std::pair<std::string,int>(
"Tflm_alp", 0));
208 ifluidMagMap.insert(std::pair<std::string,int>(
"Tb_alp", 0));
209 ifluidMagMap.insert(std::pair<std::string,int>(
"nf_alpX", 1));
210 ifluidMagMap.insert(std::pair<std::string,int>(
"nf_alpY", 0));
211 ifluidMagMap.insert(std::pair<std::string,int>(
"nf_alpZ", 0));
212 ifluidMagMap.insert(std::pair<std::string,int>(
"pf", 0));
213 ifluidMagMap.insert(std::pair<std::string,int>(
"tfX", 1));
214 ifluidMagMap.insert(std::pair<std::string,int>(
"tfY", 0));
215 ifluidMagMap.insert(std::pair<std::string,int>(
"tfZ", 0));
216 ifluidMagMap.insert(std::pair<std::string,int>(
"qc", 0));
217 ifluidMagMap.insert(std::pair<std::string,int>(
"qr", 0));
218 ifluidMagMap.insert(std::pair<std::string,int>(
"rhof_alp", 0));
219 ifluidMagMap.insert(std::pair<std::string,int>(
"zoomFact", 0));
220 ifluidMagMap.insert(std::pair<std::string,int>(
"bflag", 0));
221 ifluidMagMap.insert(std::pair<std::string,int>(
"mdot_old", 0));
228 burnUnitsMap.insert(std::pair<std::string,std::string>(
"CoordinateX",
"m"));
229 burnUnitsMap.insert(std::pair<std::string,std::string>(
"CoordinateY",
"m"));
230 burnUnitsMap.insert(std::pair<std::string,std::string>(
"CoordinateZ",
"m"));
231 burnUnitsMap.insert(std::pair<std::string,std::string>(
"pf",
"Pa"));
232 burnUnitsMap.insert(std::pair<std::string,std::string>(
"centersX",
"m"));
233 burnUnitsMap.insert(std::pair<std::string,std::string>(
"centersY",
"m"));
234 burnUnitsMap.insert(std::pair<std::string,std::string>(
"centersZ",
"m"));
235 burnUnitsMap.insert(std::pair<std::string,std::string>(
"rb",
"m/s"));
236 burnUnitsMap.insert(std::pair<std::string,std::string>(
"Tflm",
"K"));
237 burnUnitsMap.insert(std::pair<std::string,std::string>(
"rb_old",
"m/s"));
238 burnUnitsMap.insert(std::pair<std::string,std::string>(
"pf_old",
"Pa"));
239 burnUnitsMap.insert(std::pair<std::string,std::string>(
"pf_alp",
"Pa"));
240 burnUnitsMap.insert(std::pair<std::string,std::string>(
"Tflm_old",
"K"));
247 std::vector<float> dim1 = {0, 1, 0, 0, 0};
248 std::vector<float> dim2 = {0, 0, 0, 0, 0};
249 burnDimMap.insert(std::pair<std::string,std::vector<float>>(
"CoordinateX", dim1));
250 burnDimMap.insert(std::pair<std::string,std::vector<float>>(
"CoordinateY", dim1));
251 burnDimMap.insert(std::pair<std::string,std::vector<float>>(
"CoordinateZ", dim1));
252 burnDimMap.insert(std::pair<std::string,std::vector<float>>(
"pf", dim2));
253 burnDimMap.insert(std::pair<std::string,std::vector<float>>(
"centersX", dim2));
254 burnDimMap.insert(std::pair<std::string,std::vector<float>>(
"centersY", dim2));
255 burnDimMap.insert(std::pair<std::string,std::vector<float>>(
"centersZ", dim2));
256 burnDimMap.insert(std::pair<std::string,std::vector<float>>(
"rb", dim2));
257 burnDimMap.insert(std::pair<std::string,std::vector<float>>(
"Tflm", dim2));
258 burnDimMap.insert(std::pair<std::string,std::vector<float>>(
"rb_old", dim2));
259 burnDimMap.insert(std::pair<std::string,std::vector<float>>(
"pf_old", dim2));
260 burnDimMap.insert(std::pair<std::string,std::vector<float>>(
"pf_alp", dim2));
261 burnDimMap.insert(std::pair<std::string,std::vector<float>>(
"Tflm_old", dim2));
268 burnMagMap.insert(std::pair<std::string,int>(
"CoordinateX", 0));
269 burnMagMap.insert(std::pair<std::string,int>(
"CoordinateY", 0));
270 burnMagMap.insert(std::pair<std::string,int>(
"CoordinateZ", 0));
271 burnMagMap.insert(std::pair<std::string,int>(
"bflag", 0));
272 burnMagMap.insert(std::pair<std::string,int>(
"pf", 0));
273 burnMagMap.insert(std::pair<std::string,int>(
"centersX", 1));
274 burnMagMap.insert(std::pair<std::string,int>(
"centersY", 0));
275 burnMagMap.insert(std::pair<std::string,int>(
"centersZ", 0));
276 burnMagMap.insert(std::pair<std::string,int>(
"rb", 0));
277 burnMagMap.insert(std::pair<std::string,int>(
"Tflm", 0));
278 burnMagMap.insert(std::pair<std::string,int>(
"rb_old", 0));
279 burnMagMap.insert(std::pair<std::string,int>(
"pf_old", 0));
280 burnMagMap.insert(std::pair<std::string,int>(
"Tflm_old", 0));
363 std::vector<int> tmp = {0};
419 xCrd.insert(
xCrd.begin(), x.begin(), x.end());
421 yCrd.insert(
yCrd.begin(), y.begin(), y.end());
423 zCrd.insert(
zCrd.begin(), z.begin(), z.end());
486 if (slnLoc == CGNS_ENUMV(Vertex))
488 else if (slnLoc == CGNS_ENUMV(CellCenter))
491 std::cerr <<
"Can not write to requested solution location.\n";
507 if (slnLoc == CGNS_ENUMV(Vertex))
509 else if (slnLoc == CGNS_ENUMV(CellCenter))
513 std::cerr <<
"Can not write to requested solution location of type " << slnLoc <<
".\n";
520 ndeName.c_str(), slnLoc, &slnIdx)) cg_error_exit();
530 if (cg_exponents_write(CGNS_ENUMV(RealSingle), exponents)) cg_error_exit();
535 if (cg_descriptor_write(
"Units", units.c_str())) cg_error_exit();
545 if (cg_exponents_write(CGNS_ENUMV(RealSingle), exponents)) cg_error_exit();
550 if (cg_descriptor_write(
"Units", units.c_str())) cg_error_exit();
560 std::vector<float> test;
562 if (cg_exponents_write(CGNS_ENUMV(RealSingle), exponents)) cg_error_exit();
567 if (cg_descriptor_write(
"Units", units.c_str())) cg_error_exit();
576 cg_gridlocation_write(slnLoc);
583 if (
coordRind && slnLoc == CGNS_ENUMV(Vertex))
587 if (
virtElmRind && slnLoc == CGNS_ENUMV(CellCenter))
594 if (cg_rind_write(rindArr)) cg_error_exit();
609 if (!strcmp((is->first).c_str(), ndeName.c_str()))
619 <<
" is not an existing solution node.\n";
624 if (is->second == CGNS_ENUMV(Vertex))
632 if (fname ==
"bflag")
635 dt, fname.c_str(),
data, &fldIdx)) cg_error_exit();
640 dt, fname.c_str(),
data, &fldIdx)) cg_error_exit();
644 fldIdxName[fldIdx] = fname;
645 std::pair<int, keyValueList> slnPair;
646 slnPair.first = slnIdx;
647 slnPair.second = fldIdxName;
655 std::ostringstream os;
656 if (fname ==
"bflag")
658 tmpIntData = (
int*) data;
659 intMin = tmpIntData[0];
660 intMax = tmpIntData[0];
661 for (
int it=0; it<
nVrtx; it++) {
662 if (intMin > tmpIntData[it])
664 intMin = (int) tmpIntData[it];
666 if (intMax < tmpIntData[it])
668 intMax = (int) tmpIntData[it];
671 os << intMin <<
", " << intMax;
675 tmpData = (
double*) data;
678 for (
int it=0; it<
nVrtx; it++)
680 min = std::min(tmpData[it], min);
681 max = std::max(tmpData[it], max);
683 os << min <<
", " << max;
696 std::string range = os.str();
698 "FlowSolution_t", currSlnIdx,
"DataArray_t", fldIdx,
"end")) cg_error_exit();
699 if (cg_descriptor_write(
"Range", range.c_str())) cg_error_exit();
705 if (is->second == CGNS_ENUMV(CellCenter))
708 "DataArray_t", fldIdx,
"end")) cg_error_exit();
716 if (cg_descriptor_write(
"Units", units.c_str())) cg_error_exit();
721 if (cg_exponents_write(CGNS_ENUMV(RealSingle), exponents)) cg_error_exit();
730 if (cg_descriptor_write(
"Units", units.c_str())) cg_error_exit();
735 if (cg_exponents_write(CGNS_ENUMV(RealSingle), exponents)) cg_error_exit();
744 if (cg_descriptor_write(
"Units", units.c_str())) cg_error_exit();
749 if (cg_exponents_write(CGNS_ENUMV(RealSingle), exponents)) cg_error_exit();
755 else if (is->second == CGNS_ENUMV(Vertex))
762 if (cg_descriptor_write(
"Units", units.c_str())) cg_error_exit();
767 if (cg_exponents_write(CGNS_ENUMV(RealSingle), exponents)) cg_error_exit();
776 std::ostringstream os;
785 if (cg_units_write(massU, lengthU, timeU, tempU, angleU)) cg_error_exit();
789 if (cg_array_write(
"TimeValues", CGNS_ENUMV(RealDouble), 1, (
const cgsize_t*)
798 cgsize_t tmpDim[1] = {1};
802 if (cg_integral_write(
intName.c_str())) cg_error_exit();
804 double zoomFact_arr[1] = {
static_cast<double>(
intVal)};
805 if (cg_array_write(
"zoomFact", CGNS_ENUMV(RealDouble), 1, tmpDim, zoomFact_arr)) cg_error_exit();
807 std::ostringstream os;
811 os << std::to_string(
intVal) <<
", " << std::to_string(
intVal);
813 if (cg_descriptor_write(
"Range", str.c_str())) cg_error_exit();
815 if (cg_exponents_write(CGNS_ENUMV(RealSingle), &
ifluidDimMap[
"zoomFact"][0])) cg_error_exit();
816 if (cg_descriptor_write(
"Units",
ifluidUnitsMap[
"zoomFact"].c_str())) cg_error_exit();
817 if (cg_descriptor_write(
"Ghost",
"0")) cg_error_exit();
823 std::string paneName(
"PaneData");
830 std::vector<double> gsArray;
834 if (cg_goto(
indexFile,
indexBase,
"Zone_t", 1, paneName.c_str(),0,
"end")) cg_error_exit();
835 if (cg_array_write(
"gs", CGNS_ENUMV(RealDouble), 1, tmpDim, &gsArray[0])) cg_error_exit();
838 if (cg_descriptor_write(
"Range",
"0, 0")) cg_error_exit();
839 if (cg_descriptor_write(
"Ghost",
"0")) cg_error_exit();
842 if (cg_exponents_write(CGNS_ENUMV(RealSingle), &
fluidDimMap[
"gs"][0])) cg_error_exit();
843 if (cg_descriptor_write(
"Units",
fluidUnitsMap[
"gs"].c_str())) cg_error_exit();
849 std::ostringstream os;
856 if (zoneType == CGNS_ENUMV(Unstructured)) {
861 std::cerr <<
"Format is not supported.\n";
877 if (cg_array_write(
"GridCoordinatesPointers", CGNS_ENUMV(Character), 2, tmpDim2,
879 if (cg_array_write(
"FlowSolutionsPointers", CGNS_ENUMV(Character), 2, tmpDim2,
891 if (cg_rind_write(rindArr)) cg_error_exit();
899 std::vector<float> test;
906 os << min <<
", " << max;
931 "CoordinateX", 0,
"end")) cg_error_exit();
932 if (cg_descriptor_write(
"Range", str.c_str())) cg_error_exit();
933 if (cg_exponents_write(CGNS_ENUMV(RealSingle), exponents)) cg_error_exit();
934 if (cg_descriptor_write(
"Units", units.c_str())) cg_error_exit();
941 os << min <<
", " << max;
963 "CoordinateY", 0,
"end")) cg_error_exit();
964 if (cg_descriptor_write(
"Range", str.c_str())) cg_error_exit();
965 if (cg_exponents_write(CGNS_ENUMV(RealSingle), exponents)) cg_error_exit();
966 if (cg_descriptor_write(
"Units", units.c_str())) cg_error_exit();
973 os << min <<
", " << max;
995 "CoordinateZ", 0,
"end")) cg_error_exit();
996 if (cg_descriptor_write(
"Range", str.c_str())) cg_error_exit();
997 if (cg_exponents_write(CGNS_ENUMV(RealSingle), exponents)) cg_error_exit();
998 if (cg_descriptor_write(
"Units", units.c_str())) cg_error_exit();
1006 if (cg_link_write(
gridCrdPntr.c_str(),
"", str.c_str())) cg_error_exit();
1012 for (
int iSec=0; iSec<
nSection; iSec++)
1014 elm_start = (iSec == 0 ? 1 : elm_start+
nCells[iSec-1]);
1015 int elm_end = elm_start +
nCells[iSec] - 1;
1019 cgsize_t tmp_arr[3] = {0, 0, 0};
1041 if (cg_rind_write(rindArr)) cg_error_exit();
1046 if (cg_rind_write(rindArr)) cg_error_exit();
1051 if (cg_rind_write(rindArr)) cg_error_exit();
1057 std::string paneName(
"PaneData");
1060 if (cg_integral_write(paneName.c_str())) cg_error_exit();
1067 tmpDim[0] = {(cgsize_t)
pConnVec.size()};
1068 if (cg_array_write(
"pconn",CGNS_ENUMV(Integer),1, tmpDim, &
pConnVec[0])) cg_error_exit();
1076 os << min <<
", " << max;
1078 if (cg_descriptor_write(
"Range", str.c_str())) cg_error_exit();
1083 if (cg_descriptor_write(
"Ghost", str.c_str())) cg_error_exit();
1087 if (cg_array_write(
"ridges#1of2", CGNS_ENUMV(Integer),1,tmpDim,ridge)) cg_error_exit();
1090 if (cg_descriptor_write(
"Range",
"EMPTY")) cg_error_exit();
1091 if (cg_descriptor_write(
"Ghost",
"0")) cg_error_exit();
1093 if (cg_array_write(
"ridges#2of2", CGNS_ENUMV(Integer),1,tmpDim,ridge)) cg_error_exit();
1096 if (cg_descriptor_write(
"Range",
"EMPTY")) cg_error_exit();
1097 if (cg_descriptor_write(
"Ghost",
"0")) cg_error_exit();
1104 int bcflag_arr[1] = {
bcflag};
1105 if (cg_array_write(
"bcflag", CGNS_ENUMV(Integer),1,tmpDim,bcflag_arr)) cg_error_exit();
1110 os << std::to_string(
bcflag) <<
", " << std::to_string(
bcflag);
1112 if (cg_descriptor_write(
"Range", str.c_str())) cg_error_exit();
1113 if (cg_descriptor_write(
"Ghost",
"0")) cg_error_exit();
1117 int patchNo_arr[1] = {
patchNo};
1118 if (cg_array_write(
"patchNo", CGNS_ENUMV(Integer),1,tmpDim,patchNo_arr)) cg_error_exit();
1123 os << std::to_string(
patchNo) <<
", " << std::to_string(
patchNo);
1125 if (cg_descriptor_write(
"Range", str.c_str())) cg_error_exit();
1126 if (cg_descriptor_write(
"Ghost",
"0")) cg_error_exit();
1131 if (cg_array_write(
"cnstr_type", CGNS_ENUMV(Integer),1,tmpDim,cnstr_type_arr)) cg_error_exit();
1138 if (cg_descriptor_write(
"Range", str.c_str())) cg_error_exit();
1139 if (cg_descriptor_write(
"Ghost",
"0")) cg_error_exit();
1152 if (cg_array_write(
"pconn", CGNS_ENUMV(Integer),1,tmpDim,ridge)) cg_error_exit();
1155 if (cg_descriptor_write(
"Range",
"EMPTY")) cg_error_exit();
1156 if (cg_descriptor_write(
"Ghost",
"0")) cg_error_exit();
1159 if (cg_array_write(
"ridges#1of2", CGNS_ENUMV(Integer),1,tmpDim,ridge)) cg_error_exit();
1162 if (cg_descriptor_write(
"Range",
"EMPTY")) cg_error_exit();
1163 if (cg_descriptor_write(
"Ghost",
"0")) cg_error_exit();
1166 if (cg_array_write(
"ridges#2of2", CGNS_ENUMV(Integer),1,tmpDim,ridge)) cg_error_exit();
1169 if (cg_descriptor_write(
"Range",
"EMPTY")) cg_error_exit();
1170 if (cg_descriptor_write(
"Ghost",
"0")) cg_error_exit();
1177 for (
int igSec=0; igSec<
gnSection; igSec++)
1182 elm_end = elm_start;
1198 if (min == 0 && max == 0)
1204 os << min <<
", " << max;
1228 os << min <<
", " << max;
1233 tmpDim[0] = {(cgsize_t)
gelmConns[igSec].size()};
1234 if (cg_array_write((
gsectionNames[igSec]).c_str(),CGNS_ENUMV(Integer),1, tmpDim, &
gelmConns[igSec][0])) cg_error_exit();
1237 if (cg_descriptor_write(
"Range", str.c_str())) cg_error_exit();
1245 if (
gnCells[igSec] == 1 && (min == 0 && max == 0))
1262 if (cg_descriptor_write(
"Ghost", str.c_str() )) cg_error_exit();
vect1d< std::string > zoneNames
vect1d< CGNS_ENUMT(ElementType_t)> gsectionTypes
vect1d< std::string > gsectionNames
void setCnstrtype(int cnstr_type)
void setPconnVec(const vect1d< int > &pConnVec)
data_type data
Edge/face with sorted point ids (a, b, c, ...) is located at some index i in data[b], with data[b][i].first == [a, c] (for edges, third point id treated as -1).
std::map< std::string, int > ifluidMagMap
void setSection(std::string sName, CGNS_ENUMT(ElementType_t) st, vect1d< cgsize_t > elmConn)
std::map< int, std::pair< int, keyValueList > > solutionMap
void writeSolutionField(std::string fname, std::string ndeName, CGNS_ENUMT(DataType_t) dt, void *data)
void writeVolCellFacesNumber()
std::string trimmed_base_t
std::map< std::string, std::vector< float > > burnDimMap
std::map< std::string, std::string > burnUnitsMap
std::map< std::string, std::vector< float > > ifluidDimMap
std::map< std::string, std::vector< float > > fluidDimMap
std::map< std::string, std::string > fluidUnitsMap
vect1d< CGNS_ENUMT(ElementType_t)> sectionTypes
void setZoneItrData(std::string zitrname, std::string grdptr, std::string slnptr)
void setSolutionNode(std::string ndeName, CGNS_ENUMT(GridLocation_t) slnLoc)
std::map< std::string, int > burnMagMap
std::map< std::string, int > fluidMagMap
void setCoordRind(int rind)
void setZone(std::string zName, CGNS_ENUMT(ZoneType_t) zt)
std::map< std::string, int > solutionNameSolIdxMap
std::map< std::string, std::string > ifluidUnitsMap
void setGridXYZ(vect1d< double > x, vect1d< double > y, vect1d< double > z)
void setPconnLimits(int pconnProcMin, int pconnProcMax)
std::map< std::string, CGNS_ENUMT(GridLocation_t)> solutionNameLocMap
vect1d< int > solutionIdx
void setPatchNo(int patchNo)
void setTimestamp(std::string trimmed_base_t)
void setPconnGhostDescriptor(int ghostDescriptor)
void setTypeFlag(int typeFlag)
vect2d< cgsize_t > elmConns
void setVolCellFacesNumber(int nVolCellFaces)
void setVirtElmRind(int rind)
void resetGlobalSections()
void setBaseItrData(std::string bsitrname, int ntstp, double tval)
std::map< std::string, int > slnNameNFld
void setBcflag(int bcflag)
void writeSolutionNode(std::string ndeName, CGNS_ENUMT(GridLocation_t) slnLoc, int emptyFlag, int virtFlag)
void setUnits(CGNS_ENUMT(MassUnits_t) mu, CGNS_ENUMT(LengthUnits_t) lu, CGNS_ENUMT(TimeUnits_t) tu, CGNS_ENUMT(TemperatureUnits_t) tpu, CGNS_ENUMT(AngleUnits_t) au)
void setGlobalNCell(int gnCl)
vect1d< std::string > sectionNames
CGNS_ENUMT(ZoneType_t) zoneType
void setIntData(std::string intname, int intval)
std::map< int, std::string > keyValueList
void setGlobalSection(std::string sName, CGNS_ENUMT(ElementType_t) st, vect1d< int > elmConn)
vect1d< CGNS_ENUMT(ZoneType_t)> zoneTypes