Go to the documentation of this file.
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
165 dynFaces.
append(Face(std::move(conn)));
177 if (newToOldZone.empty())
182 Map<label> oldToNewZone(2*newToOldZone.size());
184 forAll(newToOldZone, zonei)
186 oldToNewZone.set(newToOldZone[zonei], zonei);
189 wordList zoneNames(newToOldZone.size());
194 const label zonei = oldToNewZone.lookup(iter.val(), -1);
205 if (zoneNames[zonei].empty())
215 for (label& zonei : dynZones)
217 zonei = oldToNewZone.lookup(zonei, 0);
224 this->storedPoints().transfer(reader.
points_);
226 this->sortFacesAndStore
235 this->addZones(zoneSizes, zoneNames);
236 this->addZonesToFaces();
252 streamOpt.
format(IOstream::ASCII);
263 ? surfaceFormatsCore::oneZone(faceLst,
"")
267 const bool useFaceMap = (surf.
useFaceMap() && zones.size() > 1);
270 bool useOrigFaceIds =
271 (!useFaceMap && elemIds.
size() == faceLst.
size());
277 for (
const auto&
f : faceLst)
281 useOrigFaceIds =
false;
292 <<
"Cannot write file " << filename <<
nl
297 os <<
"*HEADING" <<
nl;
304 writePoints(os, pointLst);
321 for (label nLocal =
zone.size(); nLocal--; ++faceIndex)
324 (useFaceMap ?
faceMap[faceIndex] : faceIndex);
326 const Face&
f = faceLst[facei];
330 elemId = elemIds[facei];
333 const label
n =
f.size();
336 (prevOutput.first() !=
n || prevOutput.
second() != zoneIndex);
341 prevOutput.first() =
n;
342 prevOutput.
second() = zoneIndex;
345 elemId = writeShell(os,
f, elemId,
zone.
name(), header);
const T & second() const noexcept
Return second element, which is also the last element.
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?
static constexpr const zero Zero
Global zero (0)
Input from file stream, using an ISstream.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
thermo validate(args.executable(), "h")
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.
DynamicList< T, SizeMin > & append(const T &val)
Append an element to the end of this list.
The IOstreamOption is a simple container for options an IOstream can normally have.
Istream and Ostream manipulators taking arguments.
static const word defaultName("coeffs")
void resize(const label newSize)
Adjust allocated size of list.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const word & name() const
Return name.
List< Key > sortedToc() const
The table of contents (the keys) in sorted order.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Output to file stream, using an OSstream.
const labelUList & faceIds() const
Const access to the faceIds, zero-sized when unused.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
forAllConstIters(mixture.phases(), phase)
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 size(const label n) noexcept
Override size to be inconsistent with allocated storage.
const UList< Face > & surfFaces() const
Return const access to the faces.
bool good() const
Return true if next operation might succeed.
const UList< surfZone > & surfZones() const
Const access to the surface zones.