Go to the documentation of this file.
40 const UList<point>& pts,
48 for (label fp1 = 1; fp1 <
f.size() - 1; ++fp1)
50 const label fp2 =
f.fcIndex(fp1);
52 const point& p1 = pts[
f[fp1]];
53 const point& p2 = pts[
f[fp2]];
55 os <<
p0.x() <<
' ' <<
p0.y() <<
' ' <<
p0.z() <<
' '
56 << p1.x() <<
' ' << p1.y() <<
' ' << p1.z() <<
' '
57 << p2.x() <<
' ' << p2.y() <<
' ' << p2.z() <<
' '
59 <<
"0x" <<
hex << zoneI <<
dec <<
nl;
94 const auto& readpts = reader.
points();
98 pointLst.setSize(nUniquePoints);
101 pointLst[pointMap[pointi]] = readpts[pointi];
116 const label startPt = 3*facei;
117 faceLst[facei] = Face
134 const label startPt = 3*
faceMap[facei];
135 faceLst[facei] = Face
146 this->storedFaces().transfer(faceLst);
148 this->addZones(sizes);
149 this->addZonesToFaces();
165 streamOpt.
format(IOstream::ASCII);
174 ? surfaceFormatsCore::oneZone(faceLst)
178 const bool useFaceMap = (surf.
useFaceMap() && zones.size() > 1);
184 <<
"Cannot write file " << filename <<
nl
192 for (label nLocal =
zone.size(); nLocal--; ++faceIndex)
195 (useFaceMap ?
faceMap[faceIndex] : faceIndex);
197 const Face&
f = faceLst[facei];
199 writeShell(
os, pointLst,
f, zoneIndex);
217 streamOpt.
format(IOstream::ASCII);
226 <<
"Cannot write file " << filename <<
nl
231 if (surf.
zoneToc().size() == 1)
237 writeShell(
os, pointLst, faceLst[facei], zoneIds[facei]);
250 for (label nLocal =
zone.size(); nLocal--; ++faceIndex)
252 const label facei =
faceMap[faceIndex];
254 const Face&
f = faceLst[facei];
256 writeShell(
os, pointLst,
f, zoneIndex);
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
A class for handling file names.
bool useFaceMap() const
Can/should use faceMap?
Base class for mesh zones.
streamFormat format() const noexcept
Get the current stream format.
const pointField & points() const
Return const access to the points.
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats.
const labelUList & faceMap() const
Const access to the faceMap, zero-sized when unused.
#define forAll(list, i)
Loop across all elements in list.
virtual const labelList & zoneIds() const
Return const access to the zone ids.
A surface geometry mesh, in which the surface zone information is conveyed by the 'zoneId' associated...
IOstream & dec(IOstream &io)
The IOstreamOption is a simple container for options an IOstream can normally have.
const List< surfZoneIdentifier > & zoneToc() const
Return const access to the zone table-of-contents.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
OBJstream os(runTime.globalPath()/outputName)
errorManipArg< error, int > exit(error &err, const int errNo=1)
Output to file stream, using an OSstream.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
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 clear()
Clear the list, i.e. set size to zero.
Various functions to operate on Lists.
labelList sortedOrder(const UList< T > &input)
Return the (stable) sort order for the list.
const UList< Face > & surfFaces() const
Return const access to the faces.
const volScalarField & p0
vector point
Point is a vector.
surfZoneList sortedZones(labelList &faceMap) const
Sort faces according to zoneIds.
const UList< surfZone > & surfZones() const
Const access to the surface zones.