45 else if (
format ==
"binary")
52 <<
"bad format specifier '" <<
format <<
"', using 'ascii'"
64 Switch sw(compression,
true);
70 else if (compression ==
"uncompressed")
74 else if (compression ==
"compressed")
81 <<
"bad compression specifier '" << compression
82 <<
"', using 'uncompressed'"
92 static const unsigned int p =
log10(1/
pow(small, 0.75));
94 return max(defaultPrecision(),
p);
100 static const unsigned int p =
log10(1/small);
102 return max(defaultPrecision(),
p);
113 <<
"error in IOstream " <<
name() <<
" for operation " << operation
126 <<
"error in IOstream " <<
name() <<
" for operation " << operation
134 std::ostringstream os;
137 os << versionNumber_;
144 os <<
"IOstream: " <<
"Version " << version_ <<
", format ";
157 os <<
", line " << lineNumber();
195 if (streamState == ios_base::goodbit)
197 os <<
"ios_base::goodbit set : the last operation on stream succeeded"
200 else if (streamState & ios_base::badbit)
202 os <<
"ios_base::badbit set : characters possibly lost"
205 else if (streamState & ios_base::failbit)
207 os <<
"ios_base::failbit set : some type of formatting error"
210 else if (streamState & ios_base::eofbit)
212 os <<
"ios_base::eofbit set : at end of stream"
237 os << vn.
str().c_str();
string str() const
Return the versionNumber as a character string.
streamFormat format() const
Return current stream format.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
void fatalCheck(const char *operation) const
Check IOstream status for given operation.
static unsigned int fullPrecision()
Return a full precision for writing data that is *very*.
streamFormat
Enumeration for the format of data in the stream.
static streamFormat formatEnum(const word &)
Return stream format of given format name.
virtual void print(Ostream &) const
Print description of IOstream to Ostream.
compressionType
Enumeration for the format of data in the stream.
static compressionType compressionEnum(const word &)
Return compression of given compression name.
static unsigned int highPrecision()
Return a high precision for writing data that is.
A helper class for outputting values to Ostream.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
bool valid() const
Return true if the Switch has a valid value.
A class for handling file names.
A class for handling character strings derived from std::string.
A class for handling words, derived from string.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
volScalarField sf(fieldObject, mesh)
#define WarningInFunction
Report a warning using Foam::Warning.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Ostream & endl(Ostream &os)
Add newline and flush stream.
IOstream & fixed(IOstream &io)
dimensionedScalar log10(const dimensionedScalar &ds)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
tmp< DimensionedField< typename powProduct< Type, r >::type, GeoMesh, Field > > pow(const DimensionedField< Type, GeoMesh, PrimitiveField > &df, typename powProduct< Type, r >::type)
Ostream & operator<<(Ostream &os, const fvConstraints &constraints)
dimensioned< Type > max(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
word format(conversionProperties.lookup("format"))