36 #ifndef Foam_ensightFile_H 37 #define Foam_ensightFile_H 60 static bool allowUndef_;
63 static float undefValue_;
97 return NullObjectRef<ensightFile>();
198 Ostream&
write(
const label value,
const label fieldWidth);
Ostream & writeUndef()
Write undef value.
static const ensightFile & null()
Return a null ensightFile.
Ensight output with specialized write() for strings, integers and floats. Correctly handles binary wr...
virtual const fileName & name() const
Get the name of the output serial stream. (eg, the name of the Fstream file name) ...
A class for handling keywords in dictionaries.
A class for handling file names.
Output to file stream, using an OSstream.
A token holds an item read from Istream.
Base for lists with indirect addressing, templated on the list contents type and the addressing type...
static const char *const coordinates
The keyword "coordinates".
void beginPart(const label index)
Begin a part (0-based index internally).
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
void writeLabels(const UList< label > &list)
Write a list of integers.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
fileName path(UMean.rootPath()/UMean.caseName()/"graphs"/UMean.instance())
void beginParticleCoordinates(const label nparticles)
Begin a "particle coordinates" block (measured data)
float floatType
Ensight uses float not double for floating-point.
Ostream & writeBinaryHeader()
Write "C Binary" string for binary files (eg, geometry/measured)
void newline()
Add carriage return to ascii stream.
auto key(const Type &t) -> typename std::enable_if< std::is_enum< Type >::value, typename std::underlying_type< Type >::type >::type
void writeList(const UList< label > &field)
Write a list of integers as float values.
streamFormat
Data format (ascii | binary)
virtual Ostream & writeKeyword(const keyType &key)
Write element keyword with trailing newline, optionally with undef and the value for undefined...
virtual bool write(const token &)
Writing token does not make sense.
static float undefValue(float value) noexcept
Assign the value to represent undef in the results.
static bool hasUndef(const UList< float > &field)
Check for any NaN in the field.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
~ensightFile()=default
Destructor.
static bool allowUndef() noexcept
Return setting for whether 'undef' values are allowed in results.
Ostream(const Ostream &)=default
Copy construct.
Ostream & writeString(const char *str)
Write C-string as "%79s" or as binary (max 80 chars)