29 #ifndef vtkPVFoamVolFields_H 30 #define vtkPVFoamVolFields_H 46 void Foam::vtkPVFoam::convertVolFields
49 const PtrList<PrimitivePatchInterpolation<primitivePatch>>& ppInterpList,
50 const IOobjectList& objects,
51 const bool interpFields,
52 vtkMultiBlockDataSet* output
55 const polyBoundaryMesh& patches = mesh.boundaryMesh();
62 iter()->headerClassName()
70 GeometricField<Type, fvPatchField, volMesh>
tf 77 autoPtr<GeometricField<Type, pointPatchField, pointMesh>> ptfPtr;
82 Info<<
"convertVolFieldBlock interpolating:" << tf.name()
109 arrayRangeCellZones_,
129 int partId = arrayRangePatches_.start();
130 partId < arrayRangePatches_.end();
134 const word patchName = getPartName(partId);
135 const label datasetNo = partDataset_[partId];
136 const label patchId = patches.findPatchID(patchName);
138 if (!partStatus_[partId] || datasetNo < 0 || patchId < 0)
143 const fvPatchField<Type>& ptf = tf.boundaryField()[
patchId];
147 isType<emptyFvPatchField<Type>>(ptf)
150 reader_->GetExtrapolatePatches()
155 fvPatch
p(ptf.patch().patch(), tf.mesh().boundary());
157 tmp<Field<Type>> tpptf
159 fvPatchField<Type>(
p, tf).patchInternalField()
173 convertPatchPointField
176 ppInterpList[
patchId].faceToPointInterpolate(tpptf)(),
196 convertPatchPointField
199 ppInterpList[
patchId].faceToPointInterpolate(ptf)(),
213 int partId = arrayRangeFaceZones_.start();
214 partId < arrayRangeFaceZones_.end();
218 const word zoneName = getPartName(partId);
219 const label datasetNo = partDataset_[partId];
221 if (!partStatus_[partId] || datasetNo < 0)
227 const label zoneId = zMesh.findZoneID(zoneName);
238 arrayRangeFaceZones_,
252 int partId = arrayRangeFaceSets_.start();
253 partId < arrayRangeFaceSets_.end();
257 const word selectName = getPartName(partId);
258 const label datasetNo = partDataset_[partId];
260 if (!partStatus_[partId] || datasetNo < 0)
265 const faceSet fSet(mesh, selectName);
284 void Foam::vtkPVFoam::convertVolFieldBlock
286 const GeometricField<Type, fvPatchField, volMesh>& tf,
287 autoPtr<GeometricField<Type, pointPatchField, pointMesh>>& ptfPtr,
288 vtkMultiBlockDataSet* output,
289 const arrayRange& range,
290 const List<polyDecomp>& decompLst
293 for (
int partId = range.start(); partId < range.end(); ++partId)
295 const label datasetNo = partDataset_[partId];
297 if (datasetNo >= 0 && partStatus_[partId])
326 void Foam::vtkPVFoam::convertVolField
328 const GeometricField<Type, fvPatchField, volMesh>& tf,
329 vtkMultiBlockDataSet* output,
330 const arrayRange& range,
331 const label datasetNo,
332 const polyDecomp& decompInfo
335 const label nComp = pTraits<Type>::nComponents;
336 const labelList& superCells = decompInfo.superCells();
339 celldata->SetNumberOfTuples(superCells.size());
340 celldata->SetNumberOfComponents(nComp);
341 celldata->Allocate(nComp*superCells.size());
342 celldata->SetName(tf.name().c_str());
346 Info<<
"convert volField: " 348 <<
" size = " << tf.size()
349 <<
" nComp=" << nComp
350 <<
" nTuples = " << superCells.size() <<
endl;
356 const Type& t = tf[superCells[i]];
361 vtkOpenFOAMTupleRemap<Type>(vec);
363 celldata->InsertTuple(i, vec);
366 vtkUnstructuredGrid::SafeDownCast
368 GetDataSetFromBlock(output, range, datasetNo)
370 ->AddArray(celldata);
ZoneMesh< faceZone, polyMesh > faceZoneMesh
A ZoneMesh with the type faceZone.
#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.
static const char *const typeName
bool interpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)
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)
static const volPointInterpolation & New(const fvMesh &mesh)
static bool constraintType(const word &pt)
Return true if the given type is a constraint type.
bool isType(const Type &t)
Check the typeid.
List< label > labelList
A List of labels.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)