40 const UList<point>&
pts,
48 for (label fp1 = 1; fp1 <
f.size() - 1; ++fp1)
50 const label fp2 =
f.fcIndex(fp1);
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(IOstreamOption::ASCII);
174 ? surfaceFormatsCore::oneZone(faceLst)
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(IOstreamOption::ASCII);
226 <<
"Cannot write file " << filename <<
nl 231 if (surf.
zoneToc().size() == 1)
233 const UList<label>& zoneIds = surf.
zoneIds();
237 writeShell(
os, pointLst, faceLst[facei], zoneIds[facei]);
248 for (
const surfZone& zone : zoneLst)
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);
A surface geometry mesh, in which the surface zone information is conveyed by the 'zoneId' associated...
void size(const label n)
Older name for setAddressableSize.
A class for handling file names.
errorManipArg< error, int > exit(error &err, const int errNo=1)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
IOstream & hex(IOstream &io)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
labelList sortedOrder(const UList< T > &input)
Return the (stable) sort order for the list.
Output to file stream as an OSstream, normally using std::ofstream for the actual output...
A surface zone on a MeshedSurface.
constexpr char nl
The newline '\n' character (0x0a)
A simple container for options an IOstream can normally have.
const pointField & points() const noexcept
Return const access to the points.
const labelUList & faceMap() const noexcept
Const access to the faceMap, zero-sized when unused.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
Various functions to operate on Lists.
#define forAll(list, i)
Loop across all elements in list.
void setSize(const label n)
Alias for resize()
bool useFaceMap() const noexcept
Can/should use faceMap?
Base class for mesh zones.
void clear()
Clear the list, i.e. set size to zero.
const UList< surfZone > & surfZones() const noexcept
Const access to the surface zones.
const Field< point_type > & points() const noexcept
Return reference to global points.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
const List< Face > & surfFaces() const
Return const access to the faces.
virtual const labelList & zoneIds() const
Return const access to the zone ids.
OBJstream os(runTime.globalPath()/outputName)
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats...
const List< surfZoneIdentifier > & zoneToc() const
Return const access to the zone table-of-contents.
surfZoneList sortedZones(labelList &faceMap) const
Sort faces according to zoneIds.
vector point
Point is a vector.
IOstream & dec(IOstream &io)
List< label > labelList
A List of labels.
const UList< Face > & surfFaces() const noexcept
Return const access to the faces.
streamFormat format() const noexcept
Get the current stream format.
const volScalarField & p0