Go to the documentation of this file.
38 bool Foam::ensightFile::allowUndef_ =
false;
59 sprintf(buf, dirFmt_.c_str(),
n);
73 std::ostringstream oss;
74 oss <<
"%0" <<
n <<
"d";
90 void Foam::ensightFile::initialize()
104 Foam::ensightFile::ensightFile
116 Foam::ensightFile::ensightFile
139 bool old = allowUndef_;
140 allowUndef_ = enabled;
150 scalar old = undefValue_;
159 std::streamsize
count
177 (strncpy(buf, value, 80));
181 write(buf,
sizeof(buf));
195 return write(value.c_str());
203 unsigned int ivalue(value);
207 reinterpret_cast<const char *
>(&ivalue),
213 stdStream().width(10);
214 stdStream() << value;
224 const label fieldWidth
229 unsigned int ivalue(value);
233 reinterpret_cast<const char *
>(&ivalue),
239 stdStream().width(fieldWidth);
240 stdStream() << value;
255 reinterpret_cast<const char *
>(&fvalue),
261 stdStream().width(12);
262 stdStream() << fvalue;
289 write(
string(
static_cast<const string&
>(key) +
" undef"));
297 write(
static_cast<const string&
>(key));
330 write(
"particle coordinates");
332 write(nparticles, 8);
372 for (
const label id : addr)
374 if (id < 0 || id >=
field.size() || std::isnan(
field[
id]))
Smanip< ios_base::fmtflags > setf(const ios_base::fmtflags flags)
label ListType::const_reference val
A class for handling file names.
static string mask()
The '*' mask appropriate for subDir.
Ostream & writeBinaryHeader()
Write "C Binary" for binary files (eg, geometry/measured)
A class for handling character strings derived from std::string.
virtual Ostream & writeKeyword(const keyType &key)
Write element keyword with trailing newline, optionally with undef.
A class for handling keywords in dictionaries.
word format(conversionProperties.get< word >("format"))
Specification of a valid Ensight file-name.
void beginParticleCoordinates(const label nparticles)
Begin a "particle coordinates" block (measured data)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
word name(const complex &c)
Return string representation of complex.
void newline()
Add carriage return to ascii stream.
Ostream & writeUndef()
Write undef value.
static label subDirWidth()
Return current width of subDir and mask.
virtual Ostream & write(const char *buf, std::streamsize count)
Binary write.
static string subDir(const label)
Consistent zero-padded numbers for subdirectories.
static bool allowUndef()
Return setting for whether 'undef' values are allowed in results.
streamFormat
Data format (ascii | binary)
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
IOstream & scientific(IOstream &io)
Output to file stream, using an OSstream.
static scalar undefValue(const scalar value)
Assign the value to represent undef in the results.
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
fileName path(UMean.rootPath()/UMean.caseName()/"graphs"/UMean.instance())
void beginPart(const label index)
Begin a part (0-based index internally).
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
void writeList(const UList< label > &field)
Write a list of integers as float values.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
constexpr floatScalar floatScalarVGREAT