29 #ifndef vtkPVFoamVolFields_H 30 #define vtkPVFoamVolFields_H 45 void Foam::vtkPVFoam::convertVolFields
48 const PtrList<PrimitivePatchInterpolation<primitivePatch>>& ppInterpList,
49 const IOobjectList& objects,
50 const bool interpFields,
51 vtkMultiBlockDataSet* output
54 const polyBoundaryMesh& patches = mesh.boundaryMesh();
61 iter()->headerClassName()
69 GeometricField<Type, fvPatchField, volMesh>
tf 76 autoPtr<GeometricField<Type, pointPatchField, pointMesh>> ptfPtr;
107 arrayRangeCellZones_,
125 int partId = arrayRangePatches_.start();
126 partId < arrayRangePatches_.end();
130 const word patchName = getPartName(partId);
131 const label datasetNo = partDataset_[partId];
132 const label patchId = patches.findPatchID(patchName);
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)
221 const label zoneId = zMesh.findZoneID(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
275 const IOobjectList& objects,
276 vtkMultiBlockDataSet* output
284 iter()->headerClassName()
299 convertVolInternalFieldBlock<Type>
308 convertVolInternalFieldBlock<Type>
312 arrayRangeCellZones_,
317 convertVolInternalFieldBlock<Type>
329 void Foam::vtkPVFoam::convertVolFieldBlock
331 const GeometricField<Type, fvPatchField, volMesh>& tf,
332 autoPtr<GeometricField<Type, pointPatchField, pointMesh>>& 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.
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const word & name() const
Return name.
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
static const char *const typeName
bool interpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Traits class for primitives.
DimensionedField< Type, GeoMesh > Internal
Type of the internal field from which this GeometricField is derived.
static bool constraintType(const word &pt)
Return true if the given type is a constraint type.
bool isType(const Type &t)
Check the typeid.
const Mesh & mesh() const
Return mesh.
static volPointInterpolation & New(fvMesh &mesh)
MeshZones< faceZone, polyMesh > meshFaceZones
A MeshZones with the type faceZone.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
#define InfoInFunction
Report an information message using Foam::Info.