29 #ifndef vtkPVFoamVolFields_H
30 #define vtkPVFoamVolFields_H
45 void Foam::vtkPVFoam::convertVolFields
48 const PtrList<PrimitivePatchInterpolation<primitivePatch>>& ppInterpList,
50 const bool interpFields,
51 vtkMultiBlockDataSet* output
54 const polyBoundaryMesh&
patches = mesh.boundaryMesh();
61 iter()->headerClassName()
76 autoPtr<PointField<Type>> ptfPtr;
107 arrayRangeCellZones_,
125 int partId = arrayRangePatches_.start();
126 partId < arrayRangePatches_.end();
130 const word patchName = getPartName(partId);
131 const label datasetNo = partDataset_[partId];
134 if (!partStatus_[partId] || datasetNo < 0 ||
patchId < 0)
139 const fvPatchField<Type>& ptf =
tf.boundaryField()[
patchId];
143 isType<emptyFvPatchField<Type>>(ptf)
146 reader_->GetExtrapolatePatches()
151 fvPatch
p(ptf.patch().patch(),
tf.mesh().boundary());
153 tmp<Field<Type>> tpptf
155 fvPatchField<Type>(
p,
tf).patchInternalField()
169 convertPatchPointField
172 ppInterpList[
patchId].faceToPointInterpolate(tpptf)(),
192 convertPatchPointField
195 ppInterpList[
patchId].faceToPointInterpolate(ptf)(),
207 int partId = arrayRangeFaceZones_.start();
208 partId < arrayRangeFaceZones_.end();
212 const word zoneName = getPartName(partId);
213 const label datasetNo = partDataset_[partId];
215 if (!partStatus_[partId] || datasetNo < 0)
220 const faceZoneList& zMesh = mesh.faceZones();
221 const label zoneId = zMesh.findIndex(zoneName);
232 arrayRangeFaceZones_,
242 int partId = arrayRangeFaceSets_.start();
243 partId < arrayRangeFaceSets_.end();
247 const word selectName = getPartName(partId);
248 const label datasetNo = partDataset_[partId];
250 if (!partStatus_[partId] || datasetNo < 0)
255 const faceSet fSet(mesh, selectName);
272 void Foam::vtkPVFoam::convertVolInternalFields
276 vtkMultiBlockDataSet* output
284 iter()->headerClassName()
285 != VolInternalField<Type>::typeName
292 VolInternalField<Type>
tf
299 convertVolInternalFieldBlock<Type>
308 convertVolInternalFieldBlock<Type>
312 arrayRangeCellZones_,
317 convertVolInternalFieldBlock<Type>
329 void Foam::vtkPVFoam::convertVolFieldBlock
331 const VolField<Type>&
tf,
332 autoPtr<PointField<Type>>& ptfPtr,
333 vtkMultiBlockDataSet* output,
334 const arrayRange&
range,
335 const List<polyDecomp>& decompLst
338 for (
int partId =
range.start(); partId <
range.end(); ++partId)
340 const label datasetNo = partDataset_[partId];
342 if (datasetNo >= 0 && partStatus_[partId])
344 convertVolInternalField<Type>
371 void Foam::vtkPVFoam::convertVolInternalFieldBlock
374 vtkMultiBlockDataSet* output,
375 const arrayRange&
range,
379 for (
int partId =
range.start(); partId <
range.end(); ++partId)
381 const label datasetNo = partDataset_[partId];
383 if (datasetNo >= 0 && partStatus_[partId])
385 convertVolInternalField<Type>
399 void Foam::vtkPVFoam::convertVolInternalField
402 vtkMultiBlockDataSet* output,
403 const arrayRange&
range,
404 const label datasetNo,
405 const polyDecomp& decompInfo
409 const labelList& superCells = decompInfo.superCells();
412 celldata->SetNumberOfTuples(superCells.
size());
413 celldata->SetNumberOfComponents(nComp);
414 celldata->Allocate(nComp*superCells.
size());
415 celldata->SetName(
tf.name().c_str());
420 <<
"converting volField::Internal: " <<
tf.name()
421 <<
" size = " <<
tf.
size()
422 <<
" nComp=" << nComp
423 <<
" nTuples = " << superCells.
size() <<
endl;
429 const Type& t =
tf[superCells[i]];
434 vtkOpenFOAMTupleRemap<Type>(vec);
436 celldata->InsertTuple(i, vec);
439 vtkUnstructuredGrid::SafeDownCast
441 GetDataSetFromBlock(output,
range, datasetNo)
443 ->AddArray(celldata);
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
static volPointInterpolation & New(const word &name, const fvMesh &mesh)
Construct and return the named DemandDrivenMeshObject.
static const char *const typeName
void size(const label)
Override size to be inconsistent with allocated storage.
Traits class for primitives.
static bool constraintType(const word &pt)
Return true if the given type is a constraint type.
tmp< PointField< Type > > interpolate(const VolField< Type > &) const
Interpolate volField using inverse distance weighting.
const fvPatchList & patches
#define InfoInFunction
Report an information message using Foam::Info.
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
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.
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
bool isType(const Type &t)
Check the typeid.
typename VolField< Type >::Internal VolInternalField