Go to the documentation of this file.
44 inline static int countFaces(
const Face&
f)
46 int n = (
f.size() - 2);
47 return n == 2 ? 1 :
n;
60 if (
os.format() == IOstream::BINARY)
62 if (
f.size() == 3 ||
f.size() == 4)
64 putFireLabel(
os,
f.size());
65 for (
const label verti :
f)
67 putFireLabel(
os, verti);
74 for (label fp1 = 1; fp1 <
f.size() - 1; ++fp1)
76 const label fp2 =
f.fcIndex(fp1);
79 putFireLabel(
os,
f[0]);
80 putFireLabel(
os,
f[fp1]);
81 putFireLabel(
os,
f[fp2]);
88 if (
f.size() == 3 ||
f.size() == 4)
90 os <<
' ' <<
f.size();
91 for (
const label verti :
f)
99 for (label fp1 = 1; fp1 <
f.size() - 1; ++fp1)
101 const label fp2 =
f.fcIndex(fp1);
102 os <<
' ' << 3 <<
' '
103 <<
f[0] <<
' ' <<
f[fp1] <<
' ' <<
f[fp2]
118 if (
os.format() == IOstream::BINARY)
122 putFireLabel(
os, fireQuad);
126 const label
n = countFaces(
f);
127 for (label i=0; i <
n; ++i)
129 putFireLabel(
os, fireTri);
138 os <<
' ' << fireQuad;
142 const label
n = countFaces(
f);
143 for (label i=0; i <
n; ++i)
145 os <<
' ' << fireTri;
164 <<
"bad output state "
176 ? surfaceFormatsCore::oneZone(faceLst, word::null)
180 const bool useFaceMap = (surf.
useFaceMap() && zones.size() > 1);
195 for (label nLocal =
zone.size(); nLocal--; ++faceIndex)
198 (useFaceMap ?
faceMap[faceIndex] : faceIndex);
200 const Face&
f = faceLst[facei];
202 selCount += countFaces(
f);
205 zoneCount[zonei] = selCount;
218 putFireLabel(
os, pointLst.
size());
221 for (
const point& pt : pointLst)
224 putFirePoint(
os, pt);
231 putFireLabel(
os, nFaces);
237 for (label nLocal =
zone.size(); nLocal--; ++faceIndex)
240 (useFaceMap ?
faceMap[faceIndex] : faceIndex);
242 const Face&
f = faceLst[facei];
254 putFireLabel(
os, nFaces);
260 for (label nLocal =
zone.size(); nLocal--; ++faceIndex)
263 (useFaceMap ?
faceMap[faceIndex] : faceIndex);
265 const Face&
f = faceLst[facei];
276 putFireLabel(
os, zones.size());
283 const label selCount = zoneCount[zonei];
286 putFireLabel(
os,
static_cast<int>(FIRECore::cellSelection));
289 putFireLabels(
os, selCount, faceIndex);
290 faceIndex += selCount;
316 if (comp == IOstream::COMPRESSED)
323 Foam::mv(filename +
".gz", filename);
329 <<
"Cannot write file " << filename <<
nl
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
A class for handling file names.
Base class for mesh zones.
const pointField & points() const
Ostream & endl(Ostream &os)
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats.
const labelUList & faceMap() const
The IOstreamOption is a simple container for options an IOstream can normally have.
bool good() const noexcept
Generic output stream using a standard (STL) stream.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
bool mv(const fileName &src, const fileName &dst, const bool followLink=false)
OBJstream os(runTime.globalPath()/outputName)
errorManipArg< error, int > exit(error &err, const int errNo=1)
Output to file stream, using an OSstream.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
@ ASCII
"ascii" (normal default)
#define FatalErrorInFunction
const word & name() const noexcept
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A surface zone on a MeshedSurface.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void write(vtk::formatter &fmt, const Type &val, const label n=1)
const UList< Face > & surfFaces() const
const UList< surfZone > & surfZones() const