68 os <<
',' << fieldName
74 os <<
',' << fieldName;
86 const word& fieldName,
90 if (
coords_.size() != fieldPtrs.size())
93 <<
"Attempted to write field: " << fieldName
94 <<
" (" << fieldPtrs.size() <<
" entries) for "
112 Info<<
"Writing field " << fieldName;
113 Info<<
" to " << outputFile <<
endl;
118 if (!
isDir(outputFile.path()))
120 mkDir(outputFile.path());
123 OFstream
os(outputFile, streamOpt_);
124 os.precision(precision_);
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 that is much like a Foam::List except that it is expected to hold numeri...
Output to file stream as an OSstream, normally using std::ofstream for the actual output.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
bool wroteGeom_
Track if geometry has been written since the last open.
static void writeTable(Ostream &os, const coordSet &coords, const UList< Type > &values, const char *sep)
Write coordinates and values.
bool verbose_
Additional output verbosity.
UPtrList< const coordSet > coords_
Reference to coordinate set(s).
fileName getFieldPrefixedPath(const word &fieldName, const word &fileExt=word::null) const
Get field-prefixed output file name.
Holds list of sampling positions.
const word & axis() const
The sort axis name.
bool hasVectorAxis() const noexcept
True if axis specification is a vector.
A class for handling file names.
static std::string path(const std::string &str)
Return directory path name (part before last /).
A traits class, which is primarily used for primitives and vector-space.
A class for handling words, derived from Foam::string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
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 writeHeader(Ostream &os, const word &fieldName)
messageStream Info
Information stream (stdout output on master, null elsewhere).
Ostream & endl(Ostream &os)
Add newline and flush stream.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
errorManipArg< error, int > exit(error &err, const int errNo=1)
static void writeCoordHeader(Ostream &os, const coordSet &coords, const label count)
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.