30Foam::fileName Foam::coordSetWriters::ensightWriter::writeUncollated
32 const bool writeTracks
40Foam::fileName Foam::coordSetWriters::ensightWriter::writeUncollated
42 const word& fieldName,
44 elemOutputType elemOutput
70 if (useTimeDir() && !
timeName().empty())
77 outputDir = outputPath_.
path();
80 const fileName baseDir = outputDir / varName;
82 const scalar timeValue = currTime_.value();
84 const fileName outputFile = baseDir / baseName +
".case";
88 Info<<
"Writing case file to " << outputFile <<
endl;
100 ensightGeoFile osGeom
103 baseName +
".00000000.mesh",
109 baseName +
".00000000." + varName,
113 osGeom.beginGeometry();
132 <<
"type: ensight gold" <<
nl
135 <<
"model: 1 " << osGeom.name().name() <<
nl
145 <<
setw(15) << varName <<
' '
146 << baseName.c_str() <<
".********."
147 << ensight::FileName(varName).c_str() <<
nl;
154 osCase <<
"# end" <<
nl;
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
@ ASCII
"ascii" (normal default)
Output to file stream as an OSstream, normally using std::ofstream for the actual output.
virtual const fileName & name() const override
Read/write access to the name of the stream.
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.
bool useTimeDir() const noexcept
Should a time directory be spliced into the output path?
void checkOpen() const
Verify that the outputPath_ has been set or FatalError.
bool empty() const
Writer is not associated with content.
virtual bool merge() const
Perform any merging if not already upToDate (parallel) or simply mark as being up-to-date.
bool verbose_
Additional output verbosity.
instant currTime_
The current time value/name.
scalar timeValue() const
The current time value/name.
fileName outputPath_
The full output directory and file (coords) name.
static void setTimeFormat(OSstream &os, IOstreamOption::floatFormat timeFmt, const int timePrec)
Set output time format for ensight case file.
static void printTimeset(OSstream &os, const label ts, const scalar timeValue)
Print time-set for ensight case file with a single time.
A variant of OFstream with specialised handling for Ensight writing of strings, integers and floats (...
A variant of ensightFile (Ensight writing) that includes the extra geometry file header information.
void beginGeometry()
Start of geometry information.
Specification of a valid Ensight file-name.
Specification of a valid Ensight variable-name.
A class for handling file names.
static const fileName null
An empty fileName.
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.
A class for handling words, derived from Foam::string.
static void writeTrackField(ensightFile &os, const UPtrList< const Field< Type > > &fieldPtrs)
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).
Omanip< int > setw(const int i)
Ostream & endl(Ostream &os)
Add newline and flush stream.
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).
static const char *const typeName
The type name used in ensight case files.