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)
135 UPstream::listGatherValues<label>(
values.size()),
140 if (Pstream::master())
143 const label offsetId = procOffset.
offset(0);
144 for (
const label val :
values)
152 for (
const label proci : procAddr.
subProcs())
157 UPstream::commsTypes::scheduled,
159 recvData.data_bytes(),
160 recvData.size_bytes()
164 const label offsetId = procOffset.
offset(proci);
165 for (
const label val : recvData)
176 UPstream::commsTypes::scheduled,
190 const std::string& title,
195 os <<
"# vtk DataFile Version 2.0" <<
nl;
202 const auto truncate = title.find(
'\n');
204 if (title.empty() || 0 == truncate)
209 else if (std::string::npos == truncate)
215 os << title.substr(0, truncate) <<
nl;
219 os << (binary ?
"BINARY" :
"ASCII") <<
nl;
226 const std::string& title,
227 const std::string& contentType
230 std::ostream&
os = fmt.
os();
233 if (contentType.size())
235 os <<
"DATASET " << contentType.c_str() <<
nl;
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.
void writeIdentity(vtk::formatter &fmt, const label len, label start=0)
Write an identity list of labels.
label localSize() const
My local size.
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 (vtk DataFile Version 2.0)
OBJstream os(runTime.globalPath()/outputName)
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
labelRange subProcs() const noexcept
Range of process indices for addressed sub-offsets (processes)
void reset(autoPtr< T > &&other) noexcept
Delete managed object and set to new given pointer.
label maxNonLocalSize() const
The max of localSizes, excluding current processor.
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)
void resize_nocopy(const label len)
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.
void writeListParallel(vtk::formatter &fmt, const UList< Type > &values)
Write a list of values.