Go to the documentation of this file.
66 case formatType::INLINE_ASCII:
70 case formatType::INLINE_BASE64:
74 case formatType::APPEND_BASE64:
78 case formatType::APPEND_BINARY:
82 case formatType::LEGACY_ASCII:
86 case formatType::LEGACY_BINARY:
103 for (label i=0; i < len; ++i)
118 for (
const uint8_t val :
values)
131 if (Pstream::master())
138 for (
const int slave : Pstream::subProcs())
140 IPstream fromSlave(Pstream::commsTypes::blocking, slave);
152 Pstream::commsTypes::blocking,
168 if (Pstream::master())
171 const label offsetId = procOffset.
offset(0);
173 for (
const label val :
values)
181 for (
const int slave : Pstream::subProcs())
183 IPstream fromSlave(Pstream::commsTypes::blocking, slave);
187 const label offsetId = procOffset.
offset(slave);
190 for (
const label val : recv)
201 Pstream::commsTypes::blocking,
215 const std::string& title,
220 os <<
"# vtk DataFile Version 2.0" <<
nl;
224 const auto truncate = title.find(
'\n');
226 if (title.empty() || 0 == truncate)
231 else if (std::string::npos == truncate)
237 os << title.substr(0, truncate) <<
nl;
241 os << (binary ?
"BINARY" :
"ASCII") <<
nl;
248 const std::string& title,
249 const std::string& contentType
252 std::ostream& os = fmt.
os();
255 if (contentType.size())
257 os <<
"DATASET " << contentType.c_str() <<
nl;
void writeListParallel(vtk::formatter &fmt, const UList< uint8_t > &values)
Write a list of uint8_t values.
void reset(T *p=nullptr) noexcept
Delete managed object and set to new given pointer.
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
Output inter-processor communications stream.
void writeIdentity(vtk::formatter &fmt, const label len, label start=0)
Write an identity list of labels.
formatType
The output format type for file contents.
void writeList(vtk::formatter &fmt, const UList< uint8_t > &values)
Write a list of uint8_t values.
void fileHeader(std::ostream &os, const std::string &title, bool binary)
Emit header for legacy file.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
label offset(const label proci) const
Start of proci data.
autoPtr< vtk::formatter > newFormatter(std::ostream &os, unsigned prec=IOstream::defaultPrecision())
Return a default asciiFormatter.
Input inter-processor communications stream.