36 const DimensionedField<Type, volMesh>& df,
40 const fvMesh& mesh = vMesh.mesh();
42 const labelList& superCells = vMesh.topo().superCells();
44 label nValues = mesh.nCells() + superCells.size();
46 os << df.name() <<
' ' << pTraits<Type>::nComponents <<
' '
49 DynamicList<floatScalar> fField(pTraits<Type>::nComponents*nValues);
53 forAll(superCells, superCelli)
55 label origCelli = superCells[superCelli];
57 insert(df[origCelli], fField);
59 write(os, binary, fField);
68 const PointField<Type>& pvf,
72 const fvMesh& mesh = vMesh.mesh();
73 const vtkTopo& topo = vMesh.topo();
75 const labelList& addPointCellLabels = topo.addPointCellLabels();
76 const label nTotPoints = mesh.nPoints() + addPointCellLabels.size();
78 os << pvf.name() <<
' ' << pTraits<Type>::nComponents <<
' '
81 DynamicList<floatScalar> fField(pTraits<Type>::nComponents*nTotPoints);
85 forAll(addPointCellLabels, api)
87 label origCelli = addPointCellLabels[api];
91 write(os, binary, fField);
100 const VolField<Type>& vvf,
101 const PointField<Type>& pvf,
105 const fvMesh& mesh = vMesh.mesh();
106 const vtkTopo& topo = vMesh.topo();
108 const labelList& addPointCellLabels = topo.addPointCellLabels();
109 const label nTotPoints = mesh.nPoints() + addPointCellLabels.size();
111 os << vvf.name() <<
' ' << pTraits<Type>::nComponents <<
' '
114 DynamicList<floatScalar> fField(pTraits<Type>::nComponents*nTotPoints);
118 forAll(addPointCellLabels, api)
120 label origCelli = addPointCellLabels[api];
122 insert(vvf[origCelli], fField);
124 write(os, binary, fField);
128 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
133 const PtrList<GeometricField<Type, PatchField, GeoMesh>>& flds,
139 write(os, binary, flds[i], vMesh);
149 const volPointInterpolation& pInterp,
150 const PtrList<VolField<Type>>& flds,
156 write(os, binary, flds[i], pInterp.interpolate(flds[i])(), vMesh);
#define forAll(list, i)
Loop across all elements in list.
Interpolates (averages) the vertex values to the cell center.
void insert(const scalar, DynamicList< floatScalar > &)
Append scalar to given DynamicList.
void write(std::ostream &os, const bool binary, List< floatScalar > &fField)
Write floats ascii or binary.
List< label > labelList
A List of labels.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Type interpolatePointToCell(const PointField< Type > &ptf, const label celli)