43 const string& varNames,
44 const fileName& fName,
45 INTEGER4 tecplotFileType
51 <<
" varNames:" << varNames
52 <<
" to file:" << fName
53 <<
" of type:" << tecplotFileType
56 INTEGER4 IsDouble = 0;
62 const_cast<char*>(name.c_str()),
63 const_cast<char*>(varNames.c_str()),
64 const_cast<char*>(fName.c_str()),
65 const_cast<char*>(runTime_.
path().c_str()),
83 const List<INTEGER4>& varLocArray,
88 INTEGER4 NumNodes = mesh.nPoints();
89 INTEGER4 NumElems = mesh.nCells();
90 INTEGER4 NumFaces = mesh.nFaces();
92 INTEGER4 ICellMax = 0;
93 INTEGER4 JCellMax = 0;
94 INTEGER4 KCellMax = 0;
96 double SolTime = runTime_.
value();
97 INTEGER4 ParentZone = 0;
101 INTEGER4 NFConns = 0;
107 Pout<<
"zoneName:" << zoneName
109 <<
" solTime:" << SolTime
114 INTEGER4 *PassiveVarArray =
nullptr;
115 INTEGER4 *VarShareArray =
nullptr;
116 INTEGER4 ShrConn = 0;
118 INTEGER4 NumBConns = 0;
119 INTEGER4 NumBItems = 0;
121 INTEGER4 ZoneType = ZoneType_FEPolyhedron;
127 const_cast<char*>(zoneName.c_str()),
145 const_cast<INTEGER4*>(varLocArray.begin()),
159 const word& zoneName,
162 const List<INTEGER4>& varLocArray
166 INTEGER4 NumNodes = pp.nPoints();
167 INTEGER4 NumElems = pp.size();
168 INTEGER4 NumFaces = pp.nEdges();
170 INTEGER4 ICellMax = 0;
171 INTEGER4 JCellMax = 0;
172 INTEGER4 KCellMax = 0;
174 double SolTime = runTime_.
value();
175 INTEGER4 ParentZone = 0;
177 INTEGER4 IsBlock = 1;
179 INTEGER4 NFConns = 0;
185 INTEGER4 NumFaceNodes = 2*pp.nEdges();
187 Pout<<
"zoneName:" << zoneName
188 <<
" strandID:" << strandID
190 <<
" solTime:" << SolTime
194 INTEGER4 *PassiveVarArray =
nullptr;
195 INTEGER4 *VarShareArray =
nullptr;
196 INTEGER4 ShrConn = 0;
198 INTEGER4 NumBConns = 0;
199 INTEGER4 NumBItems = 0;
201 INTEGER4 ZoneType = ZoneType_FEPolygon;
207 const_cast<char*>(zoneName.c_str()),
225 const_cast<INTEGER4*>(varLocArray.begin()),
239 const word& zoneName,
242 const List<INTEGER4>& varLocArray
250 INTEGER4 ICellMax = 0;
251 INTEGER4 JCellMax = 0;
252 INTEGER4 KCellMax = 0;
254 double SolTime = runTime_.
value();
255 INTEGER4 ParentZone = 0;
257 INTEGER4 IsBlock = 1;
259 INTEGER4 NFConns = 0;
265 INTEGER4 NumFaceNodes = 1;
266 INTEGER4 NumBConns = 1;
267 INTEGER4 NumBItems = 1;
269 Pout<<
"zoneName:" << zoneName
270 <<
" strandID:" << strandID
272 <<
" solTime:" << SolTime
276 INTEGER4 *PassiveVarArray =
nullptr;
277 INTEGER4 *VarShareArray =
nullptr;
278 INTEGER4 ShrConn = 0;
281 INTEGER4 ZoneType = ZoneType_Ordered;
287 const_cast<char*>(zoneName.c_str()),
305 const_cast<INTEGER4*>(varLocArray.begin()),
319 List<INTEGER4> FaceNodeCounts(mesh.nFaces());
321 forAll(mesh.faces(), facei)
323 const face&
f = mesh.faces()[facei];
324 FaceNodeCounts[facei] = INTEGER4(f.size());
328 INTEGER4 nFaceNodes = 0;
329 forAll(mesh.faces(), facei)
331 nFaceNodes += mesh.faces()[facei].size();
335 List<INTEGER4> FaceNodes(nFaceNodes);
337 forAll(mesh.faces(), facei)
339 const face& f = mesh.faces()[facei];
342 FaceNodes[nodeI++] = INTEGER4(f[fp]+1);
347 List<INTEGER4> FaceLeftElems(mesh.nFaces());
348 forAll(mesh.faceOwner(), facei)
350 FaceLeftElems[facei] = mesh.faceOwner()[facei]+1;
353 List<INTEGER4> FaceRightElems(mesh.nFaces());
354 forAll(mesh.faceNeighbour(), facei)
356 FaceRightElems[facei] = mesh.faceNeighbour()[facei]+1;
360 label facei = mesh.nInternalFaces();
361 facei < mesh.nFaces();
365 FaceRightElems[facei] = 0;
372 FaceNodeCounts.begin(),
374 FaceLeftElems.begin(),
375 FaceRightElems.begin(),
392 INTEGER4 NumFaces = pp.nEdges();
393 INTEGER4 NumFaceNodes = 2*pp.nEdges();
396 List<INTEGER4> FaceNodeCounts(NumFaces);
399 List<INTEGER4> FaceNodes(NumFaceNodes);
403 edge
e = pp.edges()[edgeI];
409 FaceNodes[nodeI++] = INTEGER4(e[0]+1);
410 FaceNodes[nodeI++] = INTEGER4(e[1]+1);
433 List<INTEGER4> FaceLeftElems(NumFaces);
434 List<INTEGER4> FaceRightElems(NumFaces);
439 const labelList& eFaces = edgeFaces[edgeI];
441 if (eFaces.size() == 1)
443 FaceLeftElems[edgeI] = 0;
444 FaceRightElems[edgeI] = eFaces[0]+1;
446 else if (eFaces.size() == 2)
448 edge e = pp.edges()[edgeI];
454 const face& f0 = pp.localFaces()[eFaces[0]];
460 bool f0IsLeft = (f0.nextLabel(fp) == e[1]);
464 FaceLeftElems[edgeI] = eFaces[0]+1;
465 FaceRightElems[edgeI] = eFaces[1]+1;
469 FaceLeftElems[edgeI] = eFaces[1]+1;
470 FaceRightElems[edgeI] = eFaces[0]+1;
476 FaceLeftElems[edgeI] = 0;
477 FaceRightElems[edgeI] = eFaces[0]+1;
486 FaceNodeCounts.begin(),
488 FaceLeftElems.begin(),
489 FaceRightElems.begin(),
List< labelList > labelListList
A List of labelList.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
PrimitivePatch< IndirectList< face >, const pointField & > indirectPrimitivePatch
Foam::indirectPrimitivePatch.
void writeConnectivity(const fvMesh &mesh) const
Write mesh.
const Type & value() const
Return const reference to value.
void writePolyhedralZone(const word &zoneName, const INTEGER4 strandID, const fvMesh &mesh, const List< INTEGER4 > &varLocArray, INTEGER4 nFaceNodes) const
Write mesh as polyhedral zone.
List< label > labelList
A List of labels.
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.
void writeInit(const word &name, const string &varNames, const fileName &, INTEGER4 tecplotFileType) const
void writePolygonalZone(const word &zoneName, const INTEGER4 strandID, const indirectPrimitivePatch &pp, const List< INTEGER4 > &varLocArray) const
Write surface as polygonal zone.
prefixOSstream Pout(cout, "Pout")
void writeOrderedZone(const word &zoneName, INTEGER4 strandID, const label n, const List< INTEGER4 > &varLocArray) const
Write unordered data (or rather 1D ordered)
const doubleScalar e
Elementary charge.
fileName path() const
Return path.
tecplotWriter(const Time &)
Construct from components.