40 os <<
p.x() <<
' ' <<
p.y() <<
' ' <<
p.z();
47 for (
direction d = 0; d < pTraits<Type>::nComponents; ++d)
56 os <<
" area_x area_y area_z";
71 os <<
' ' << fieldName
77 os <<
' ' << fieldName;
89 const word& fieldName,
106 outputFile.
ext(
"raw");
114 Info<<
" to " << outputFile <<
endl;
122 const auto& values = tfield();
125 const bool withFaceNormal = (writeNormal_ && !this->
isPointData());
137 os <<
"# " << fieldName;
140 os <<
" POINT_DATA ";
146 os << values.size() <<
nl;
149 writeHeader<Type>(
os, fieldName);
173 const face&
f = faces[elemi];
Istream and Ostream manipulators taking arguments.
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
Generic templated field type.
Output to file stream, using an OSstream.
virtual int precision() const
Get precision of output field.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A face is a list of labels corresponding to mesh vertices.
A class for handling file names.
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 /)
static std::string name(const std::string &str)
Return basename (part beyond last /), including its extension.
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 faceList & faces() const
The faces used for the surface.
A traits class, which is primarily used for primitives.
splitCell * master() const
bool wroteGeom_
Track if geometry has been written since the last open.
bool useTimeDir() const noexcept
Should a time directory be spliced into the output path?
bool isPointData() const noexcept
Are the field data to be treated as point data?
const word & timeName() const
The current time value/name.
void checkOpen() const
Verify that the outputPath_ has been set or FatalError.
bool parallel_
Writing in parallel (via master)
bool empty() const
The surface to write is empty if the global number of faces is zero.
tmp< Field< label > > adjustField(const word &fieldName, const tmp< Field< label > > &tfield) const
bool verbose_
Additional output verbosity.
const meshedSurfRef & adjustSurface() const
tmp< Field< label > > mergeField(const Field< label > &fld) const
fileName outputPath_
The full output directory and file (surface) name.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
bool mkDir(const fileName &pathName, mode_t mode=0777)
Make a directory and return an error if it could not be created.
static void writePoint(Ostream &os, const point &p)
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
static void writeHeader(Ostream &os, const word &fieldName)
messageStream Info
Information stream (stdout output on master, null elsewhere)
static void writeHeaderArea(Ostream &os)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static void writeData(Ostream &os, const Type &val)
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.