Go to the documentation of this file.
46 const Time& time =
mesh.returnTime();
48 const word postProcDir =
"FPMA";
58 const fileName fpmaFileName = fName +
".fpma";
60 Info <<
"Writting mesh into " << fpmaFileName <<
endl;
71 OFstream fpmaGeometryFile(postProcPath/fpmaFileName);
75 Mesh.
write(fpmaGeometryFile);
85 mesh.procBoundaries();
88 forAll(procBoundaries, patchI)
90 word sName =
"InterFacesToProc";
92 const label sID =
mesh.addFaceSubset(sName);
94 label faceI = procBoundaries[patchI].patchStart();
95 const label end = faceI + procBoundaries[patchI].patchSize();
96 for(;faceI<end;++faceI)
97 mesh.addFaceToSubset(sID, faceI);
102 mesh.faceSubsetIndices(subsets);
105 const word sName =
mesh.faceSubsetName(subsets[subsetI]);
107 if( sName.substr(0, 10) ==
"processor_" )
109 const word newName =
"Proc" + sName.substr(10, sName.size()-10);
112 mesh.cellsInSubset(subsets[subsetI], cellsInSubset);
113 const label subsetID =
mesh.addCellSubset(newName);
115 mesh.addCellToSubset(subsetID, cellsInSubset[i]);
123 label faceI =
mesh.boundaries()[patchI].patchStart();
124 const label end = faceI +
mesh.boundaries()[patchI].patchSize();
125 for(;faceI<end;++faceI)
130 bndVertex[
f[pI]] =
true;
134 forAll(procBoundaries, patchI)
136 word sName =
"InterSurfaceEdgesToProc";
138 const label subsetID =
mesh.addPointSubset(sName);
140 label faceI = procBoundaries[patchI].patchStart();
141 const label end = faceI + procBoundaries[patchI].patchSize();
142 for(;faceI<end;++faceI)
144 const face&
f = faces[faceI];
148 if( bndVertex[
f[pI]] )
149 mesh.addPointToSubset(subsetID,
f[pI]);
virtual const pointField & points() const
Return raw points.
void writeMeshFPMA(const polyMeshGen &mesh, const word &fName)
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from string.
A class for handling file names.
#define forAll(list, i)
Loop across all elements in list.
word scalarToText(const scalar s)
convert the scalar value into text
static bool & parRun()
Is this a parallel run?
void createFIRESelections(polyMeshGen &mesh)
void write(OFstream &fpmaGeometryFile) const
Ostream & endl(Ostream &os)
Add newline and flush stream.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Istream and Ostream manipulators taking arguments.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
bool isDir(const fileName &)
Does the name exist as a DIRECTORY in the file system?
virtual const faceList & faces() const
Return raw faces.
fileName path() const
Return path.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A face is a list of labels corresponding to mesh vertices.
bool mkDir(const fileName &, mode_t=0777)
Make a directory and return an error if it could not be created.