33 const label nCellValues,
34 const word& fieldName,
43 nValues = nCellValues;
58 <<
" for uniform field " << fieldName <<
nl <<
endl
64 vtk::fileWriter::writeUniform<Type>(fieldName, val, nValues);
73 const word& fieldName,
82 if (isState(outputState::CELL_DATA))
86 else if (isState(outputState::POINT_DATA))
95 outputState::CELL_DATA,
96 outputState::POINT_DATA
98 <<
" for field " << fieldName <<
nl <<
endl
103 vtk::fileWriter::writeBasicField<Type>(fieldName,
field);
110 const word& fieldName,
118 if (isState(outputState::CELL_DATA))
125 <<
" for field " << fieldName <<
nl <<
endl
130 vtk::fileWriter::writeBasicField<Type>(fieldName,
field);
137 const word& fieldName,
145 if (isState(outputState::POINT_DATA))
152 <<
" for field " << fieldName <<
nl <<
endl
157 vtk::fileWriter::writeBasicField<Type>(fieldName,
field);
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
virtual bool write()
Write the output fields.
bool isState(outputState test) const noexcept
True if output state corresponds to the test state.
label nCellData_
The number of CellData written for the Piece thus far.
label nPointData_
The number of PointData written for the Piece thus far.
@ POINT_DATA
Inside PointData.
@ CELL_DATA
Inside CellData.
Ostream & reportBadState(Ostream &, outputState expected) const
Generate message reporting bad writer state.
void writePointData(const word &fieldName, const UList< Type > &field)
Write primitive field of PointData.
label nLocalPoints_
Local number of points.
void writeCellData(const word &fieldName, const UList< Type > &field)
Write primitive field of CellData.
void writeUniformValue(const label nCellValues, const word &fieldName, const Type &val)
Write a uniform field of Cell (Poly or Line) or Point values.
A class for handling words, derived from Foam::string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)