42 const std::string& elsetName,
46 const label
n =
f.size();
52 os <<
"*ELEMENT, TYPE=S4";
54 if (!elsetName.empty())
56 os <<
", ELSET=" << elsetName;
72 os <<
"*ELEMENT, TYPE=S3";
74 if (!elsetName.empty())
76 os <<
", ELSET=" << elsetName;
94 for (label fp1 = 1; fp1 <
f.size() - 1; ++fp1)
96 const label fp2 =
f.fcIndex(fp1);
101 << (
f[fp1] + 1) <<
','
102 << (
f[fp2] + 1) <<
nl;
138 <<
"Cannot read file " << filename <<
nl
166 dynFaces.
append(Face(std::move(conn)));
178 if (newToOldZone.
empty())
180 newToOldZone.
resize(1, Zero);
185 forAll(newToOldZone, zonei)
187 oldToNewZone.
set(newToOldZone[zonei], zonei);
195 const label zonei = oldToNewZone.
lookup(iter.val(), -1);
199 zoneNames[zonei] = word::validate(iter.key());
206 if (zoneNames[zonei].empty())
208 zoneNames[zonei] = surfZoneIdentifier::defaultName(zonei);
216 for (label& zonei : dynZones)
218 zonei = oldToNewZone.
lookup(zonei, 0);
227 this->sortFacesAndStore
236 this->addZones(zoneSizes, zoneNames);
237 this->addZonesToFaces();
253 streamOpt.
format(IOstream::ASCII);
264 ? surfaceFormatsCore::oneZone(faceLst,
"")
272 bool useOrigFaceIds =
282 for (
const auto&
f : faceLst)
286 useOrigFaceIds =
false;
297 <<
"Cannot write file " << filename <<
nl
302 os <<
"*HEADING" <<
nl;
309 writePoints(
os, pointLst);
326 for (label nLocal =
zone.
size(); nLocal--; ++faceIndex)
329 (useFaceMap ?
faceMap[faceIndex] : faceIndex);
331 const Face&
f = faceLst[facei];
335 elemId = elemIds[facei];
338 const label
n =
f.size();
341 (prevOutput.
first() !=
n || prevOutput.
second() != zoneIndex);
347 prevOutput.
second() = zoneIndex;
350 elemId = writeShell(
os,
f, elemId,
zone.
name(), header);
Istream and Ostream manipulators taking arguments.
Various functions to operate on Lists.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
void append(const T &val)
Copy append an element to the end of this list.
T & first() noexcept
The first element of the list, position [0].
List< Key > sortedToc() const
The table of contents (the keys) in sorted order.
bool set(const Key &key, const T &obj)
Copy assign a new entry, overwriting existing entries.
const T & lookup(const Key &key, const T &deflt) const
Return hashed entry if it exists, or return the given default.
Input from file stream, using an ISstream.
The IOstreamOption is a simple container for options an IOstream can normally have.
streamFormat format() const noexcept
Get the current stream format.
bool good() const noexcept
True if next operation might succeed.
void transfer(List< T > &list)
void resize(const label len)
Adjust allocated size of list.
A HashTable to objects of type <T> with a label key.
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 labelUList & faceIds() const
Const access to the faceIds, zero-sized when unused.
const pointField & points() const
Return const access to the points.
const labelUList & faceMap() const
Const access to the faceMap, zero-sized when unused.
Output to file stream, using an OSstream.
const T & second() const noexcept
Return second element, which is also the last element.
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 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.
const word & name() const noexcept
The zone name.
Base class for mesh zones.
#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)
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.
#define forAllConstIters(container, iter)
Iterate across all elements of the container object with const access.