28 #include <type_traits> 36 const word& fieldName,
46 "Label and Floating-point vector space only" 57 legacy::intField<nCmpt>(
format(), fieldName, nValues);
61 const uint64_t payLoad =
62 vtk::sizeofData<label, nCmpt>(nValues);
72 legacy::floatField<nCmpt>(
format(), fieldName, nValues);
76 const uint64_t payLoad =
77 vtk::sizeofData<float, nCmpt>(nValues);
90 const word& fieldName,
92 const label nLocalValues
95 label nTotal = nLocalValues;
99 reduce(nTotal, sumOp<label>());
102 this->beginDataArray<Type>(fieldName, nTotal);
113 this->endDataArray();
120 const word& fieldName,
124 label nValues =
field.size();
131 this->beginDataArray<Type>(fieldName, nValues);
142 this->endDataArray();
autoPtr< vtk::formatter > format_
The VTK formatter in use (only valid on master process)
vtk::formatter & format()
The VTK formatter in use. FatalError for off-processor.
void writeBasicField(const word &fieldName, const UList< Type > &field)
Write basic (primitive) field content.
A traits class, which is primarily used for primitives and vector-space.
bool legacy() const noexcept
Commonly used query.
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
A class for handling words, derived from Foam::string.
void writeList(vtk::formatter &fmt, const UList< uint8_t > &values)
Write a list of uint8_t values.
word format(conversionProperties.get< word >("format"))
void writeUniform(const word &fieldName, const Type &val, const label nValues)
Write uniform field content.
void writeListParallel(vtk::formatter &fmt, const UList< Type > &values)
Write a list of values.
void writeValueParallel(vtk::formatter &fmt, const Type &val, const label count=1)
Component-wise write of a value (N times) in parallel.
void beginDataArray(const word &fieldName, const label nValues)
Start of a field or DataArray output (legacy or non-legacy).
void reduce(T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Reduce inplace (cf. MPI Allreduce) using linear/tree communication schedule.