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