Go to the documentation of this file.
31 Foam::fileName Foam::surfaceWriters::ensightWriter::writeUncollated()
54 const fileName outputFile = outputDir / surfName +
".case";
58 Info<<
"Writing case file to " << outputFile <<
endl;
62 const meshedSurf& surf =
surface();
66 if (!
isDir(outputDir))
71 OFstream osCase(outputFile);
75 surfName +
".00000000.mesh",
81 <<
"type: ensight gold" <<
nl
84 <<
"model: 1 " << osGeom.name().name() <<
nl
88 printTimeset(osCase, 1, scalar(0));
90 ensightOutputSurface part
105 Foam::fileName Foam::surfaceWriters::ensightWriter::writeUncollated
107 const word& fieldName,
133 if (useTimeDir() && !
timeName().empty())
140 outputDir = outputPath_.
path();
143 const fileName baseDir = outputDir / varName;
145 const scalar timeValue = currTime_.value();
147 const fileName outputFile = baseDir / surfName +
".case";
151 Info<<
"Writing case file to " << outputFile <<
endl;
170 osCase.
setf(ios_base::left);
178 surfName +
".00000000.mesh",
184 surfName +
".00000000." + varName,
190 <<
"type: ensight gold" <<
nl
203 <<
setw(15) << varName <<
' '
204 << surfName.c_str() <<
".********." << varName <<
nl;
210 printTimeset(osCase, 1, timeValue);
211 osCase <<
"# end" <<
nl;
225 part.writeData(osField, tfield(), this->isPointData());
A class for handling words, derived from Foam::string.
A class for handling file names.
virtual const fileName & name() const
Read/write access to the name of the stream.
static std::string path(const std::string &str)
Return directory path name (part before last /)
A class for managing temporary objects.
Ensight names and component order for base types.
static std::string name(const std::string &str)
Return basename (part beyond last /), including its extension.
bool useTimeDir() const
Should a time directory be spliced into the output path?
virtual const faceList & faces() const =0
The faces used for the surface.
const meshedSurf & surface() const
Abstract definition of a meshed surface defined by faces and points.
static bool master(const label communicator=worldComm)
Am I the master process.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const word & timeName() const
The current time value/name.
virtual Ostream & writeKeyword(const keyType &key)
Specialized Ensight output with extra geometry file header.
Specification of a valid Ensight file-name.
Specification of a valid Ensight variable-name.
Generic templated field type.
messageStream Info
Information stream (stdout output on master, null elsewhere)
void write(ensightGeoFile &os) const
Write processor-local geometry (serial-only)
bool parallel_
Writing in parallel (via master)
bool checkOpen() const
Verify that the outputPath_ has been set or FatalError.
fileName outputPath_
The full output directory and file (surface) name.
virtual const pointField & points() const =0
The points used for the surface.
Ensight output with specialized write() for strings, integers and floats. Correctly handles binary wr...
Omanip< int > setw(const int i)
IOstream & scientific(IOstream &io)
Output to file stream, using an OSstream.
ios_base::fmtflags setf(const ios_base::fmtflags f)
Set flags of stream.
virtual int precision() const
Get precision of output field.
A variant of ensightFaces that holds references to contiguous points/faces with its own encapsulated ...
bool wroteGeom_
Track if geometry has been written since the last open.
bool verbose_
Additional output verbosity.
bool mkDir(const fileName &pathName, mode_t mode=0777)
Make a directory and return an error if it could not be created.
bool isDir(const fileName &name, const bool followLink=true)
Does the name exist as a DIRECTORY in the file system?