29 #ifndef vtkPVFoamFaceField_H 30 #define vtkPVFoamFaceField_H 33 #include "vtkCellData.h" 34 #include "vtkFloatArray.h" 35 #include "vtkMultiBlockDataSet.h" 36 #include "vtkPolyData.h" 43 void Foam::vtkPVFoam::convertFaceField
45 const GeometricField<Type, fvPatchField, volMesh>& tf,
46 vtkMultiBlockDataSet* output,
47 const arrayRange& range,
48 const label datasetNo,
53 const label nComp = pTraits<Type>::nComponents;
54 const label nInternalFaces = mesh.nInternalFaces();
55 const labelList& faceOwner = mesh.faceOwner();
56 const labelList& faceNeigh = mesh.faceNeighbour();
59 cellData->SetNumberOfTuples(faceLabels.size());
60 cellData->SetNumberOfComponents(nComp);
61 cellData->Allocate(nComp*faceLabels.size());
62 cellData->SetName(tf.name().c_str());
66 Info<<
"convert convertFaceField: " 68 <<
" size = " << tf.size()
70 <<
" nTuples = " << faceLabels.size() <<
endl;
79 const label faceNo = faceLabels[facei];
80 if (faceNo < nInternalFaces)
82 Type t = 0.5*(tf[faceOwner[faceNo]] + tf[faceNeigh[faceNo]]);
91 const Type& t = tf[faceOwner[faceNo]];
97 vtkOpenFOAMTupleRemap<Type>(vec);
99 cellData->InsertTuple(facei, vec);
103 vtkPolyData::SafeDownCast
105 GetDataSetFromBlock(output, range, datasetNo)
107 ->AddArray(cellData);
#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.
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
List< label > labelList
A List of labels.
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)