35template<
class Type,
template<
class>
class PatchField>
62 for (
const label
cellId : addPointCellLabels)
73 for (
const label
cellId : addPointCellLabels)
94template<
class Type,
template<
class>
class PatchField>
100 writeCellData(
field.name(),
field.primitiveField());
111 if (isState(outputState::POINT_DATA))
118 <<
" for field " << vfield.
name() <<
nl <<
endl
126 const auto& pfield = tfield();
128 const labelList& addPointCellLabels = vtuCells_.addPointCellLabels();
131 this->beginDataArray<Type>(vfield.
name(), numberOfPoints_);
148 this->endDataArray();
159 if (isState(outputState::POINT_DATA))
166 <<
" for field " << vfield.
name() <<
nl <<
endl
174 const auto& pfield = tfield();
176 const labelList& addPointCellLabels = vtuCells_.addPointCellLabels();
179 this->beginDataArray<Type>(vfield.
name(), numberOfPoints_);
196 this->endDataArray();
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic GeometricField class.
const word & name() const noexcept
Return the object name.
void size(const label n)
Older name for setAddressableSize.
virtual bool write()
Write the output fields.
A class for managing temporary objects.
Interpolate from cell centres to points (vertices) using inverse distance weighting.
bool isState(outputState test) const noexcept
True if output state corresponds to the test state.
autoPtr< vtk::formatter > format_
The VTK formatter in use (only valid on master process)
bool parallel_
Parallel writing (via master)
void endDataArray()
Flush formatter and end of DataArray output (non-legacy)
label nPointData_
The number of PointData written for the Piece thus far.
@ POINT_DATA
Inside PointData.
Ostream & reportBadState(Ostream &, outputState expected) const
Generate message reporting bad writer state.
vtk::formatter & format()
The VTK formatter in use. FatalError for off-processor.
label numberOfPoints_
The number of field points for the current Piece.
const vtuCells & vtuCells_
The volume cells (internalMesh)
void addPointCellLabels(const labelUList &cellIds)
Define which additional cell-centres are to be used (ADVANCED!)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
autoPtr< volPointInterpolation > pInterp
Interpolates (averages) the vertex values to the cell center.
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
void writeListsParallel(vtk::formatter &fmt, const UList< Type > &values1, const UList< Type > &values2)
Write a list of values and another list of values.
void writeLists(vtk::formatter &fmt, const UList< Type > &values1, const UList< Type > &values2, const labelUList &addressing)
Write a list of values and a list of values via indirect addressing.
void writeList(vtk::formatter &fmt, const UList< uint8_t > &values)
Write a list of uint8_t values.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Type interpolatePointToCell(const GeometricField< Type, pointPatchField, pointMesh > &ptf, const label celli)
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)
word format(conversionProperties.get< word >("format"))