29 #ifndef vtkPVFoamPatchField_H 30 #define vtkPVFoamPatchField_H 33 #include "vtkCellData.h" 34 #include "vtkFloatArray.h" 35 #include "vtkMultiBlockDataSet.h" 36 #include "vtkPointData.h" 37 #include "vtkPolyData.h" 44 void Foam::vtkPVFoam::convertPatchField
47 const Field<Type>& ptf,
48 vtkMultiBlockDataSet* output,
49 const arrayRange& range,
53 const label nComp = pTraits<Type>::nComponents;
56 cellData->SetNumberOfTuples(ptf.size());
57 cellData->SetNumberOfComponents(nComp);
58 cellData->Allocate(nComp*ptf.size());
59 cellData->SetName(name.c_str());
64 const Type& t = ptf[i];
69 vtkOpenFOAMTupleRemap<Type>(vec);
71 cellData->InsertTuple(i, vec);
74 vtkPolyData::SafeDownCast
76 GetDataSetFromBlock(output, range, datasetNo)
86 void Foam::vtkPVFoam::convertPatchPointField
89 const Field<Type>& pptf,
90 vtkMultiBlockDataSet* output,
91 const arrayRange& range,
95 const label nComp = pTraits<Type>::nComponents;
98 pointData->SetNumberOfTuples(pptf.size());
99 pointData->SetNumberOfComponents(nComp);
100 pointData->Allocate(nComp*pptf.size());
101 pointData->SetName(name.c_str());
106 const Type& t = pptf[i];
111 vtkOpenFOAMTupleRemap<Type>(vec);
113 pointData->InsertTuple(i, vec);
116 vtkPolyData::SafeDownCast
118 GetDataSetFromBlock(output, range, datasetNo)
120 ->AddArray(pointData);
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)