29 #ifndef vtkPV4FoamFaceField_H 30 #define vtkPV4FoamFaceField_H 33 #include "vtkCellData.h" 34 #include "vtkFloatArray.h" 35 #include "vtkMultiBlockDataSet.h" 36 #include "vtkPolyData.h" 43 void Foam::vtkPV4Foam::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);
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
Ostream & endl(Ostream &os)
Add newline and flush stream.
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
List< label > labelList
A List of labels.