41 #ifndef Foam_ensightCase_H 42 #define Foam_ensightCase_H 89 const std::unique_ptr<options> options_;
92 mutable std::unique_ptr<OFstream> os_;
101 mutable bool changed_;
150 scalar writeTimeset()
const;
157 const scalar timeCorrection = 0
162 void noteGeometry(
const bool moving)
const;
172 const char* ensightType
179 const char* ensightType
213 const word& caseName,
221 const word& caseName,
236 static word padded(
const int nwidth,
const label index);
239 template<
class StringType>
242 const StringType&
input,
288 void setTime(const scalar t, const label index);
315 const
bool isPointData = false
341 inline
Ostream& operator()() const;
369 const scalar timeValue
387 const
UList<scalar>& times
404 const
UList<scalar>& times,
463 const word& formatKeyword,
483 int timePrecision() const
noexcept {
return timePrecision_; }
489 word
padded(
const label i)
const;
492 int width() const
noexcept {
return width_; }
495 bool overwrite() const
noexcept {
return overwrite_; }
505 void width(
const int i);
514 void timePrecision(
int prec)
noexcept { timePrecision_ = prec; }
523 void overwrite(
bool on)
noexcept { overwrite_ = on; }
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 (...
Generic output stream using a standard (STL) stream.
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.
static void writeHeader(Ostream &os, const word &fieldName)
autoPtr< ensightFile > newCloudData(const word &cloudName, const word &varName) const
Open stream for new cloud data file (on master), with current index.
Supports writing of ensight cases as well as providing common factory methods to open new files...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
static StringType expand_mask(const StringType &input, const label index)
Replace the '*' mask chars with zero-padded integer value.
ensightCase(const ensightCase &)=delete
No copy construct.
floatFormat
Float formats (eg, time directory name formats)
A variant of ensightFile (Ensight writing) that includes the extra geometry file header information...
void nextTime(const scalar t)
Set time for time-set 1, using next available index.
void rewind() const
Rewind the output stream (master only).
A simple container for options an IOstream can normally have.
Lookup type of boundary radiation properties.
Configuration options for the ensightCase.
void operator=(const ensightCase &)=delete
No copy assignment.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
const word cloudName(propsDict.get< word >("cloud"))
autoPtr< ensightFile > newData(const word &varName, const bool isPointData=false) const
Open stream for new data file (on master), with current index.
A class for handling words, derived from Foam::string.
static const char * geometryName
The name for geometry files: "geometry".
static Istream & input(Istream &is, IntRange< T > &range)
IOstreamOption::streamFormat format() const
The output file format (ascii/binary)
A HashTable similar to std::unordered_map.
const fileName & path() const noexcept
The nominal path to the case file.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
bool separateCloud() const
Write clouds into their own directory instead in "data" directory.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
const ensightCase::options & option() const
Reference to the case options.
autoPtr< ensightGeoFile > newGeometry(bool moving=false) const
Open stream for new geometry file (on master). Does not include beginGeometry() marker.
OBJstream os(runTime.globalPath()/outputName)
bool nodeValues() const
Force use of values per node instead of per element.
An instant of time. Contains the time value and name. Uses Foam::Time when formatting the name...
void write() const
Write the case file.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
auto key(const Type &t) -> typename std::enable_if< std::is_enum< Type >::value, typename std::underlying_type< Type >::type >::type
~ensightCase()=default
Destructor.
static word padded(const int nwidth, const label index)
Stringified zero-padded integer value of specified width.
streamFormat
Data format (ascii | binary)
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
static const char * dataDirName
The name for data subdirectory: "data".
const word & mask() const
The output '*' mask.
Ostream & printInfo(Ostream &os) const
Print some general information.
autoPtr< ensightFile > newCloud(const word &cloudName) const
Open stream for new cloud positions (on master).
autoPtr< ensightFile > newPointData(const word &varName) const
Open stream for new data file (on master), with current index and marking as containing POINT_DATA...
void setTime(const scalar t, const label index)
Set current index and time for time-set 1.