52 os << (solidId + 1) <<
", P" << sideNum;
57 os << (elemId + 1) <<
", P";
78 const word& fieldName,
90 switch (outputLayout_)
92 case outputLayoutType::BY_TIME:
94 outputFile = outputPath_;
95 if (useTimeDir() && !
timeName().empty())
103 outputFile /= fieldName +
'_' + outputPath_.name();
106 case outputLayoutType::BY_FIELD:
108 outputFile = outputPath_ / fieldName / outputPath_.name();
117 outputFile.
ext(
"inp");
121 tmp<Field<Type>> tfield = adjustField(fieldName, mergeField(localValues));
125 Info<<
" to " << outputFile <<
endl;
134 const auto& values = tfield();
151 if (noGeometry_ || wroteGeom_)
178 <<
"** field = " << fieldName <<
nl
181 if (useTimeDir() && !
timeName().empty())
195 const bool useOrigFaceIds =
198 && decompFaces.
empty()
204 if (this->isPointData())
211 elemId = elemIds[facei];
214 const label beginElemId = elemId;
219 label decompi = decompOffsets[facei];
220 decompi < decompOffsets[facei+1];
224 const face&
f = decompFaces[decompi];
227 for (
const label verti :
f)
233 writeFaceValue(
os, v, elemId);
239 if (beginElemId == elemId)
241 const face&
f = faces[facei];
244 for (
const label verti :
f)
250 writeFaceValue(
os, v, elemId);
257 auto valIter = values.cbegin();
264 elemId = elemIds[facei];
267 const Type v(*valIter);
274 (decompOffsets[facei+1] - decompOffsets[facei])
279 writeFaceValue(
os, v, elemId);
Istream and Ostream manipulators taking arguments.
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Generic templated field type.
Output to file stream, using an OSstream.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
bool empty() const noexcept
True if the UList is empty (ie, size() is zero)
void size(const label n)
Older name for setAddressableSize.
A face is a list of labels corresponding to mesh vertices.
A class for handling file names.
fileName lessExt() const
Return file name without extension (part before last .)
word ext() const
Return file name extension (part after last .)
static std::string path(const std::string &str)
Return directory path name (part before last /)
Implements a meshed surface by referencing another meshed surface or faces/points components.
virtual const pointField & points() const
The points used for the surface.
virtual const labelList & faceIds() const
Per-face identifier (eg, element Id)
virtual const faceList & faces() const
The faces used for the surface.
A traits class, which is primarily used for primitives.
splitCell * master() const
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
bool mkDir(const fileName &pathName, mode_t mode=0777)
Make a directory and return an error if it could not be created.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
static constexpr const zero Zero
Global zero (0)
bool isDir(const fileName &name, const bool followLink=true)
Does the name exist as a DIRECTORY in the file system?
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.