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())
140 int slave=Pstream::firstSlave();
141 slave<=Pstream::lastSlave();
145 IPstream fromSlave(Pstream::commsTypes::blocking, slave);
157 Pstream::commsTypes::blocking,
173 if (Pstream::master())
176 const label offsetId = procOffset.
offset(0);
178 for (
const label val :
values)
188 int slave=Pstream::firstSlave();
189 slave<=Pstream::lastSlave();
193 IPstream fromSlave(Pstream::commsTypes::blocking, slave);
197 const label offsetId = procOffset.
offset(slave);
200 for (
const label val : recv)
211 Pstream::commsTypes::blocking,
226 const std::string& title,
231 os <<
"# vtk DataFile Version 2.0" <<
nl;
235 const auto truncate = title.find(
'\n');
237 if (title.empty() || 0 == truncate)
242 else if (std::string::npos == truncate)
248 os << title.substr(0, truncate) <<
nl;
252 os << (binary ?
"BINARY" :
"ASCII") <<
nl;
259 const std::string& title,
260 const std::string& contentType
263 std::ostream& os = fmt.
os();
266 if (contentType.size())
268 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...
Input/output from file streams.
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.