Provides a reader interface for OpenFOAM to VTK interaction. More...
Data Structures | |
class | arrayRange |
Bookkeeping for GUI checklists and the multi-block organization. More... | |
class | polyDecomp |
Bookkeeping for polyhedral cell decomposition. More... | |
Public Member Functions | |
ClassName ("vtkPV4Foam") | |
Static data members. More... | |
vtkPV4Foam (const char *const FileName, vtkPV4FoamReader *reader) | |
Construct from components. More... | |
~vtkPV4Foam () | |
Destructor. More... | |
void | updateInfo () |
Update. More... | |
void | Update (vtkMultiBlockDataSet *output, vtkMultiBlockDataSet *lagrangianOutput) |
void | CleanUp () |
Clean any storage. More... | |
double * | findTimes (int &nTimeSteps) |
Allocate and return a list of selected times. More... | |
void | renderPatchNames (vtkRenderer *, const bool show) |
Add/remove patch names to/from the view. More... | |
int | setTime (int count, const double requestTimes[]) |
Set the runTime to the first plausible request time,. More... | |
int | timeIndex () const |
The current time index. More... | |
void | PrintSelf (ostream &, vtkIndent) const |
Debug information. More... | |
template<class Type > | |
Foam::label | addToSelection (vtkDataArraySelection *select, const IOobjectList &objectLst, const string &suffix) |
Static Public Member Functions | |
static void | printMemory () |
Simple memory used debugging information. More... | |
Private Member Functions | |
void | resetCounters () |
Reset data counters. More... | |
void | updateMeshPartsStatus () |
Update the mesh parts selected in the GUI. More... | |
void | updateInfoInternalMesh (vtkDataArraySelection *) |
Internal mesh info. More... | |
void | updateInfoLagrangian (vtkDataArraySelection *) |
Lagrangian info. More... | |
void | updateInfoPatches (vtkDataArraySelection *, stringList &) |
Patch info. More... | |
void | updateInfoSets (vtkDataArraySelection *) |
Set info. More... | |
void | updateInfoZones (vtkDataArraySelection *) |
Zone info. More... | |
wordList | getZoneNames (const word &zoneType) const |
Get non-empty zone names for zoneType from file. More... | |
template<class ZoneType > | |
wordList | getZoneNames (const ZoneMesh< ZoneType, polyMesh > &) const |
Get non-empty zone names from mesh info. More... | |
template<class Type > | |
label | addToSelection (vtkDataArraySelection *, const IOobjectList &, const string &suffix=string::null) |
Add objects of Type to paraview array selection. More... | |
template<template< class > class patchType, class meshType > | |
void | updateInfoFields (vtkDataArraySelection *) |
Field info. More... | |
void | updateInfoLagrangianFields () |
Lagrangian field info. More... | |
void | updateFoamMesh () |
OpenFOAM mesh. More... | |
void | reduceMemory () |
Reduce memory footprint after conversion. More... | |
void | convertMeshVolume (vtkMultiBlockDataSet *, int &blockNo) |
Volume mesh. More... | |
void | convertMeshLagrangian (vtkMultiBlockDataSet *, int &blockNo) |
Lagrangian mesh. More... | |
void | convertMeshPatches (vtkMultiBlockDataSet *, int &blockNo) |
Patch meshes. More... | |
void | convertMeshCellZones (vtkMultiBlockDataSet *, int &blockNo) |
Cell zone meshes. More... | |
void | convertMeshFaceZones (vtkMultiBlockDataSet *, int &blockNo) |
Face zone meshes. More... | |
void | convertMeshPointZones (vtkMultiBlockDataSet *, int &blockNo) |
Point zone meshes. More... | |
void | convertMeshCellSets (vtkMultiBlockDataSet *, int &blockNo) |
Cell set meshes. More... | |
void | convertMeshFaceSets (vtkMultiBlockDataSet *, int &blockNo) |
Face set meshes. More... | |
void | convertMeshPointSets (vtkMultiBlockDataSet *, int &blockNo) |
Point set meshes. More... | |
vtkUnstructuredGrid * | volumeVTKMesh (const fvMesh &, polyDecomp &) |
Add internal mesh/cell set meshes. More... | |
vtkPolyData * | lagrangianVTKMesh (const fvMesh &, const word &cloudName) |
Add Lagrangian mesh. More... | |
template<class PatchType > | |
vtkPolyData * | patchVTKMesh (const word &name, const PatchType &) |
Add patch mesh. More... | |
vtkPolyData * | pointZoneVTKMesh (const fvMesh &, const labelList &pointLabels) |
Add point zone. More... | |
vtkPolyData * | faceSetVTKMesh (const fvMesh &, const faceSet &) |
Add face set mesh. More... | |
vtkPolyData * | pointSetVTKMesh (const fvMesh &, const pointSet &) |
Add point mesh. More... | |
void | convertVolFields (vtkMultiBlockDataSet *) |
Convert volume fields. More... | |
void | convertPointFields (vtkMultiBlockDataSet *) |
Convert point fields. More... | |
void | convertLagrangianFields (vtkMultiBlockDataSet *) |
Convert Lagrangian fields. More... | |
template<class GeoField > | |
label | addObjectsToSelection (vtkDataArraySelection *, const IOobjectList &, const string &suffix=string::null) |
Add the fields in the selected time directory to the selection. More... | |
template<class Type > | |
void | convertVolField (const PtrList< PrimitivePatchInterpolation< primitivePatch > > &, const GeometricField< Type, fvPatchField, volMesh > &, const bool interpFields, vtkMultiBlockDataSet *output) |
Volume field - all types. More... | |
template<class Type > | |
void | convertVolFields (const fvMesh &, const PtrList< PrimitivePatchInterpolation< primitivePatch > > &, const IOobjectList &, const bool interpFields, vtkMultiBlockDataSet *output) |
Volume fields - all types. More... | |
template<class Type > | |
void | convertDimFields (const fvMesh &, const PtrList< PrimitivePatchInterpolation< primitivePatch > > &, const IOobjectList &, const bool interpFields, vtkMultiBlockDataSet *output) |
Volume internal fields (DimensionedField)- all types. More... | |
template<class Type > | |
void | convertVolFieldBlock (const GeometricField< Type, fvPatchField, volMesh > &, autoPtr< GeometricField< Type, pointPatchField, pointMesh > > &, vtkMultiBlockDataSet *output, const arrayRange &, const List< polyDecomp > &decompLst) |
Volume field - all selected parts. More... | |
template<class Type > | |
void | convertVolField (const GeometricField< Type, fvPatchField, volMesh > &, vtkMultiBlockDataSet *output, const arrayRange &, const label datasetNo, const polyDecomp &) |
Volume field. More... | |
template<class Type > | |
void | convertPatchField (const word &name, const Field< Type > &, vtkMultiBlockDataSet *output, const arrayRange &, const label datasetNo) |
Patch field. More... | |
template<class Type > | |
void | convertFaceField (const GeometricField< Type, fvPatchField, volMesh > &, vtkMultiBlockDataSet *output, const arrayRange &, const label datasetNo, const fvMesh &, const labelList &faceLabels) |
Face set/zone field. More... | |
template<class Type > | |
void | convertLagrangianFields (const IOobjectList &, vtkMultiBlockDataSet *output, const label datasetNo) |
Lagrangian fields - all types. More... | |
template<class Type > | |
void | convertLagrangianField (const IOField< Type > &, vtkMultiBlockDataSet *output, const arrayRange &, const label datasetNo) |
Lagrangian field. More... | |
template<class Type > | |
void | convertPointFields (const fvMesh &, const pointMesh &, const IOobjectList &, vtkMultiBlockDataSet *output) |
Point fields - all types. More... | |
template<class Type > | |
void | convertPointFieldBlock (const GeometricField< Type, pointPatchField, pointMesh > &, vtkMultiBlockDataSet *output, const arrayRange &, const List< polyDecomp > &) |
Point field - all selected parts. More... | |
template<class Type > | |
void | convertPointField (const GeometricField< Type, pointPatchField, pointMesh > &, const GeometricField< Type, fvPatchField, volMesh > &, vtkMultiBlockDataSet *output, const arrayRange &, const label datasetNo, const polyDecomp &) |
Point fields. More... | |
template<class Type > | |
void | convertPatchPointField (const word &name, const Field< Type > &, vtkMultiBlockDataSet *output, const arrayRange &, const label datasetNo) |
Patch point field. More... | |
word | getPartName (const int) |
Get the first word from the mesh parts selection. More... | |
vtkPV4Foam (const vtkPV4Foam &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const vtkPV4Foam &) |
Disallow default bitwise assignment. More... | |
Static Private Member Functions | |
static void | AddToBlock (vtkMultiBlockDataSet *output, vtkDataSet *dataset, const arrayRange &, const label datasetNo, const std::string &datasetName) |
static vtkDataSet * | GetDataSetFromBlock (vtkMultiBlockDataSet *output, const arrayRange &, const label datasetNo) |
static label | GetNumberOfDataSets (vtkMultiBlockDataSet *output, const arrayRange &) |
static void | pruneObjectList (IOobjectList &, const wordHashSet &) |
Only keep what is listed in hashSet. More... | |
static wordHashSet | getSelected (vtkDataArraySelection *) |
Retrieve the current selections. More... | |
static wordHashSet | getSelected (vtkDataArraySelection *, const arrayRange &) |
Retrieve a sub-list of the current selections. More... | |
static stringList | getSelectedArrayEntries (vtkDataArraySelection *) |
Retrieve the current selections. More... | |
static stringList | getSelectedArrayEntries (vtkDataArraySelection *, const arrayRange &) |
Retrieve a sub-list of the current selections. More... | |
static void | setSelectedArrayEntries (vtkDataArraySelection *, const stringList &) |
Set selection(s) More... | |
Private Attributes | |
vtkPV4FoamReader * | reader_ |
Access to the controlling vtkPV4FoamReader. More... | |
autoPtr< Time > | dbPtr_ |
OpenFOAM time control. More... | |
fvMesh * | meshPtr_ |
OpenFOAM mesh. More... | |
word | meshRegion_ |
The mesh region. More... | |
fileName | meshDir_ |
The mesh directory for the region. More... | |
int | timeIndex_ |
The time index. More... | |
bool | meshChanged_ |
Track changes in mesh geometry. More... | |
bool | fieldsChanged_ |
Track changes in fields. More... | |
boolList | partStatus_ |
Selected geometrical parts (internalMesh, patches, ...) More... | |
labelList | partDataset_ |
Datasets corresponding to selected geometrical pieces. More... | |
arrayRange | arrayRangeVolume_ |
First instance and size of various mesh parts. More... | |
arrayRange | arrayRangePatches_ |
arrayRange | arrayRangeLagrangian_ |
arrayRange | arrayRangeCellZones_ |
arrayRange | arrayRangeFaceZones_ |
arrayRange | arrayRangePointZones_ |
arrayRange | arrayRangeCellSets_ |
arrayRange | arrayRangeFaceSets_ |
arrayRange | arrayRangePointSets_ |
List< polyDecomp > | regionPolyDecomp_ |
Decomposed cells information (mesh regions) More... | |
List< polyDecomp > | zonePolyDecomp_ |
Decomposed cells information (cellZone meshes) More... | |
List< polyDecomp > | csetPolyDecomp_ |
Decomposed cells information (cellSet meshes) More... | |
List< vtkTextActor * > | patchTextActorsPtrs_ |
List of patch names for rendering to window. More... | |
Provides a reader interface for OpenFOAM to VTK interaction.
Definition at line 107 of file vtkPV4Foam.H.
|
private |
Disallow default bitwise copy construct.
vtkPV4Foam | ( | const char *const | FileName, |
vtkPV4FoamReader * | reader | ||
) |
Construct from components.
~vtkPV4Foam | ( | ) |
Destructor.
|
staticprivate |
Definition at line 77 of file vtkPV4FoamUtils.C.
References Foam::endl(), FatalErrorInFunction, Foam::Info, Foam::compressible::New(), and range.
|
staticprivate |
Definition at line 137 of file vtkPV4FoamUtils.C.
References range.
|
staticprivate |
Definition at line 159 of file vtkPV4FoamUtils.C.
References range.
|
private |
Reset data counters.
|
private |
Update the mesh parts selected in the GUI.
|
private |
Internal mesh info.
|
private |
Lagrangian info.
|
private |
Patch info.
|
private |
Set info.
|
private |
Zone info.
Get non-empty zone names for zoneType from file.
Get non-empty zone names from mesh info.
|
private |
Add objects of Type to paraview array selection.
|
private |
Field info.
Add volume fields to GUI
Add dimensioned fields to GUI
Definition at line 36 of file vtkPV4FoamUpdateInfoFields.H.
References Foam::endl(), Foam::vtkPV3Readers::getSelectedArrayEntries(), Foam::Info, Foam::vtkPV3Readers::setSelectedArrayEntries(), List::setSize(), and timeName.
|
private |
Lagrangian field info.
|
private |
OpenFOAM mesh.
|
private |
Reduce memory footprint after conversion.
|
private |
Volume mesh.
|
private |
Lagrangian mesh.
|
private |
Patch meshes.
|
private |
Cell zone meshes.
|
private |
Face zone meshes.
|
private |
Point zone meshes.
|
private |
Cell set meshes.
|
private |
Face set meshes.
|
private |
Point set meshes.
|
private |
Add internal mesh/cell set meshes.
Add Lagrangian mesh.
|
private |
Add patch mesh.
Add point zone.
|
private |
Convert volume fields.
|
private |
Convert point fields.
|
private |
Convert Lagrangian fields.
|
private |
Add the fields in the selected time directory to the selection.
lists
|
private |
Volume field - all types.
Definition at line 48 of file vtkPV4FoamVolFields.H.
References Foam::endl(), ZoneMesh::findZoneID(), Foam::Info, Foam::MULES::interpolate(), Foam::isType(), mesh, Foam::compressible::New(), p, fvPatch::patch(), fvPatchField::patch(), patches, patchId(), autoPtr::reset(), tf, and HashTable::toc().
|
private |
Volume fields - all types.
Definition at line 266 of file vtkPV4FoamVolFields.H.
References forAllConstIter(), mesh, and tf.
|
private |
Volume internal fields (DimensionedField)- all types.
Definition at line 301 of file vtkPV4FoamVolFields.H.
References GeometricField::correctBoundaryConditions(), DimensionedField::dimensions(), forAll, forAllConstIter(), mesh, DimensionedField::mesh(), IOobject::readOpt(), and PtrList::set().
|
private |
Volume field - all selected parts.
Definition at line 362 of file vtkPV4FoamVolFields.H.
|
private |
Volume field.
Definition at line 404 of file vtkPV4FoamVolFields.H.
References Foam::component(), Foam::endl(), forAll, Foam::vtkPV3Readers::GetDataSetFromBlock(), Foam::Info, Foam::compressible::New(), range, List::size(), vtkPV4Foam::polyDecomp::superCells(), and tf.
|
private |
Patch field.
Definition at line 45 of file vtkPV4FoamPatchField.H.
References Foam::component(), forAll, Foam::vtkPV3Readers::GetDataSetFromBlock(), Foam::name(), Foam::compressible::New(), and range.
|
private |
Face set/zone field.
Definition at line 44 of file vtkPV4FoamFaceField.H.
References Foam::component(), Foam::endl(), forAll, Foam::vtkPV3Readers::GetDataSetFromBlock(), Foam::Info, mesh, Foam::compressible::New(), range, List::size(), and tf.
|
private |
Lagrangian fields - all types.
Definition at line 40 of file vtkPV4FoamLagrangianFields.H.
References forAllConstIter(), range, and tf.
|
private |
Lagrangian field.
Definition at line 62 of file vtkPV4FoamLagrangianFields.H.
References Foam::component(), Foam::endl(), forAll, Foam::vtkPV3Readers::GetDataSetFromBlock(), Foam::Info, Foam::compressible::New(), range, and tf.
|
private |
Point fields - all types.
Definition at line 41 of file vtkPV4FoamPointFields.H.
References GeometricField::boundaryField(), Foam::endl(), fld(), forAllConstIter(), Foam::Info, GeometricField::internalField(), mesh, patches, and patchId().
|
private |
Point field - all selected parts.
Definition at line 174 of file vtkPV4FoamPointFields.H.
References range.
|
private |
Point fields.
Definition at line 203 of file vtkPV4FoamPointFields.H.
References vtkPV4Foam::polyDecomp::addPointCellLabels(), Foam::component(), Foam::endl(), forAll, Foam::vtkPV3Readers::GetDataSetFromBlock(), Foam::Info, Foam::interpolatePointToCell(), Foam::compressible::New(), nPoints, vtkPV4Foam::polyDecomp::pointMap(), range, List::size(), and tf.
|
private |
Patch point field.
Definition at line 87 of file vtkPV4FoamPatchField.H.
References Foam::component(), forAll, Foam::vtkPV3Readers::GetDataSetFromBlock(), Foam::name(), Foam::compressible::New(), and range.
|
staticprivate |
Only keep what is listed in hashSet.
|
staticprivate |
Retrieve the current selections.
Definition at line 184 of file vtkPV4FoamUtils.C.
References HashSet< Key, Hash >::insert().
|
staticprivate |
Retrieve a sub-list of the current selections.
Definition at line 204 of file vtkPV4FoamUtils.C.
References HashSet< Key, Hash >::insert(), and range.
|
staticprivate |
Retrieve the current selections.
Definition at line 225 of file vtkPV4FoamUtils.C.
References forAll, Foam::Info, and List::setSize().
|
staticprivate |
Retrieve a sub-list of the current selections.
Definition at line 264 of file vtkPV4FoamUtils.C.
References forAll, Foam::Info, range, and List::setSize().
|
staticprivate |
|
private |
Get the first word from the mesh parts selection.
Definition at line 177 of file vtkPV4FoamUtils.C.
References vtkPV4Foam::reader_.
|
private |
Disallow default bitwise assignment.
ClassName | ( | "vtkPV4Foam" | ) |
Static data members.
void updateInfo | ( | ) |
Update.
void Update | ( | vtkMultiBlockDataSet * | output, |
vtkMultiBlockDataSet * | lagrangianOutput | ||
) |
void CleanUp | ( | ) |
Clean any storage.
double* findTimes | ( | int & | nTimeSteps | ) |
Allocate and return a list of selected times.
returns the count via the parameter
void renderPatchNames | ( | vtkRenderer * | , |
const bool | show | ||
) |
Add/remove patch names to/from the view.
int setTime | ( | int | count, |
const double | requestTimes[] | ||
) |
Set the runTime to the first plausible request time,.
returns the timeIndex sets to "constant" on error
|
inline |
The current time index.
Definition at line 721 of file vtkPV4Foam.H.
References vtkPV4Foam::timeIndex_.
void PrintSelf | ( | ostream & | , |
vtkIndent | |||
) | const |
Debug information.
|
static |
Simple memory used debugging information.
Definition at line 330 of file vtkPV4FoamUtils.C.
References Foam::Info, and memInfo::valid().
Foam::label addToSelection | ( | vtkDataArraySelection * | select, |
const IOobjectList & | objectLst, | ||
const string & | suffix | ||
) |
Definition at line 40 of file vtkPV4FoamAddToSelection.H.
References forAll, and IOobjectList::names().
|
private |
Access to the controlling vtkPV4FoamReader.
Definition at line 249 of file vtkPV4Foam.H.
Referenced by vtkPV4Foam::getPartName().
OpenFOAM time control.
Definition at line 252 of file vtkPV4Foam.H.
|
private |
OpenFOAM mesh.
Definition at line 255 of file vtkPV4Foam.H.
|
private |
The mesh region.
Definition at line 258 of file vtkPV4Foam.H.
|
private |
The mesh directory for the region.
Definition at line 261 of file vtkPV4Foam.H.
|
private |
|
private |
Track changes in mesh geometry.
Definition at line 267 of file vtkPV4Foam.H.
|
private |
Track changes in fields.
Definition at line 270 of file vtkPV4Foam.H.
|
private |
Selected geometrical parts (internalMesh, patches, ...)
Definition at line 273 of file vtkPV4Foam.H.
|
private |
Datasets corresponding to selected geometrical pieces.
a negative number indicates that no vtkmesh exists for this piece
Definition at line 277 of file vtkPV4Foam.H.
|
private |
First instance and size of various mesh parts.
used to index into partStatus_ and partDataset_
Definition at line 281 of file vtkPV4Foam.H.
|
private |
Definition at line 282 of file vtkPV4Foam.H.
|
private |
Definition at line 283 of file vtkPV4Foam.H.
|
private |
Definition at line 284 of file vtkPV4Foam.H.
|
private |
Definition at line 285 of file vtkPV4Foam.H.
|
private |
Definition at line 286 of file vtkPV4Foam.H.
|
private |
Definition at line 287 of file vtkPV4Foam.H.
|
private |
Definition at line 288 of file vtkPV4Foam.H.
|
private |
Definition at line 289 of file vtkPV4Foam.H.
|
private |
Decomposed cells information (mesh regions)
TODO: regions
Definition at line 293 of file vtkPV4Foam.H.
|
private |
Decomposed cells information (cellZone meshes)
Definition at line 296 of file vtkPV4Foam.H.
|
private |
Decomposed cells information (cellSet meshes)
Definition at line 299 of file vtkPV4Foam.H.
|
private |
List of patch names for rendering to window.
Definition at line 302 of file vtkPV4Foam.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.