31 Foam::fileName Foam::surfaceWriters::ensightWriter::writeUncollated()
54 const fileName outputFile = outputDir / baseName +
".case";
58 Info<<
"Writing case file to " << outputFile <<
endl;
73 ensightOutputSurface part
84 baseName +
".00000000.mesh",
88 osGeom.beginGeometry();
102 <<
"type: ensight gold" <<
nl 105 <<
"model: 1 " << osGeom.name().name() <<
nl 118 Foam::fileName Foam::surfaceWriters::ensightWriter::writeUncollated
120 const word& fieldName,
146 if (useTimeDir() && !
timeName().empty())
153 outputDir = outputPath_.
path();
156 const fileName baseDir = outputDir / varName;
158 const scalar timeValue = currTime_.value();
160 const fileName outputFile = baseDir / baseName +
".case";
164 Info<<
"Writing case file to " << outputFile <<
nl;
168 tmp<Field<Type>> tfield = adjustField(fieldName, mergeField(localValues));
176 const meshedSurfRef& surf = adjustSurface();
186 ensightOutputSurface part
194 ensightGeoFile osGeom
197 baseName +
".00000000.mesh",
203 baseName +
".00000000." + varName,
207 osGeom.beginGeometry();
213 part.writeData(osField, tfield(), this->isPointData());
228 <<
"type: ensight gold" <<
nl 231 <<
"model: 1 " << osGeom.name().name() <<
nl 241 <<
setw(15) << varName <<
' ' 242 << baseName.c_str() <<
".********." 243 << ensight::FileName(varName).c_str() <<
nl;
250 osCase <<
"# end" <<
nl;
static void printTimeset(OSstream &os, const label ts, const scalar timeValue)
Print time-set for ensight case file with a single time.
A class for handling file names.
static void setTimeFormat(OSstream &os, IOstreamOption::floatFormat timeFmt, const int timePrec)
Set output time format for ensight case file.
IOstreamOption::streamFormat format() const noexcept
The output file format (ascii/binary)
Specification of a valid Ensight file-name.
void checkOpen() const
Verify that the outputPath_ has been set or FatalError.
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
const meshedSurfRef & adjustSurface() const
Merge surfaces (if not upToDate) and return merged (parallel) or regular surface (non-parallel) and a...
static std::string path(const std::string &str)
Return directory path name (part before last /)
bool parallel_
Writing in parallel (via master)
bool wroteGeom_
Track if geometry has been written since the last open.
const word & timeName() const
The current time value/name.
bool isDir(const fileName &name, const bool followLink=true)
Does the name exist as a DIRECTORY in the file system?
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.
const char *const typeName
static std::string name(const std::string &str)
Return basename (part beyond last /), including its extension.
Specification of a valid Ensight variable-name.
bool useTimeDir() const noexcept
Should a time directory be spliced into the output path?
fileName outputPath_
The full output directory and file (surface) name.
static bool master(const label communicator=worldComm)
True if process corresponds to the master rank in the communicator.
messageStream Info
Information stream (stdout output on master, null elsewhere)
bool verbose_
Additional output verbosity.
Omanip< int > setw(const int i)