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)
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);
Various functions to operate on Lists.
The IOstreamOption is a simple container for options an IOstream can normally have.
streamFormat format() const noexcept
Get the current stream format.
void setSize(const label n)
Alias for resize()
void clear()
Clear the list, i.e. set size to zero.
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats.
const UList< surfZone > & surfZones() const
Const access to the surface zones.
const UList< Face > & surfFaces() const
Return const access to the faces.
bool useFaceMap() const
Can/should use faceMap?
const pointField & points() const
Return const access to the points.
const labelUList & faceMap() const
Const access to the faceMap, zero-sized when unused.
const List< Face > & surfFaces() const
Return const access to the faces.
Output to file stream, using an OSstream.
const Field< point_type > & points() const noexcept
Return reference to global points.
virtual bool read()
Re-read model coefficients if they have changed.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
bool empty() const noexcept
True if the UList is empty (ie, size() is zero)
void size(const label n)
Older name for setAddressableSize.
A surface geometry mesh, in which the surface zone information is conveyed by the 'zoneId' associated...
surfZoneList sortedZones(labelList &faceMap) const
Sort faces according to zoneIds.
virtual const labelList & zoneIds() const
Return const access to the zone ids.
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,...
A class for handling file names.
virtual bool write()
Write the output fields.
A surface zone on a MeshedSurface.
Base class for mesh zones.
const volScalarField & p0
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
vector point
Point is a vector.
labelList sortedOrder(const UList< T > &input)
Return the (stable) sort order for the list.
IOstream & dec(IOstream &io)
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.