37 const word& fieldName,
41 if (
coords_.size() != fieldPtrs.size())
44 <<
"Attempted to write field: " << fieldName
45 <<
" (" << fieldPtrs.size() <<
" entries) for " 59 Info<<
"Writing field " << fieldName;
71 os.precision(precision_);
73 os <<
"set term pngcairo" <<
nl 74 <<
"set output \"" << outputFile.
stem() <<
".png\"" <<
nl;
78 os <<
"plot \\" <<
nl;
79 os <<
" '-' title \"" << fieldName <<
"\" with lines";
87 os <<
"end_data" <<
nl <<
nl;
88 os <<
"# end plot" <<
nl;
A class for handling file names.
errorManipArg< error, int > exit(error &err, const int errNo=1)
bool wroteGeom_
Track if geometry has been written since the last open.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Output to file stream, using an OSstream.
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static std::string path(const std::string &str)
Return directory path name (part before last /)
static std::string stem(const std::string &str)
Return the basename, without extension.
#define forAll(list, i)
Loop across all elements in list.
bool isDir(const fileName &name, const bool followLink=true)
Does the name exist as a DIRECTORY in the file system?
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
bool mkDir(const fileName &pathName, mode_t mode=0777)
Make a directory and return an error if it could not be created.
Generic templated field type.
A class for handling words, derived from Foam::string.
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
Istream and Ostream manipulators taking arguments.
OBJstream os(runTime.globalPath()/outputName)
static void writeTable(Ostream &os, const coordSet &coords, const UList< Type > &values, const char *sep)
Write coordinates and values.
fileName getFieldPrefixedPath(const word &fieldName, const word &fileExt=word::null) const
Get field-prefixed output file name.
UPtrList< const coordSet > coords_
Reference to coordinate set(s)
bool verbose_
Additional output verbosity.
messageStream Info
Information stream (stdout output on master, null elsewhere)