/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | foam-extend: Open Source CFD \\ / O peration | Version: 4.1 \\ / A nd | Web: http://www.foam-extend.org \\/ M anipulation | For copyright notice see file Copyright ------------------------------------------------------------------------------- License This file is part of foam-extend. foam-extend is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. foam-extend is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with foam-extend. If not, see . Class Foam::vtkPVFoam Description Provides a reader interface for FOAM to VTK interaction. SourceFiles vtkPVFoam.C vtkPVFoam.H vtkPVFoamI.H vtkPVFoamFields.C vtkPVFoamMesh.C vtkPVFoamMeshLagrangian.C vtkPVFoamMeshPatch.C vtkPVFoamMeshSet.C vtkPVFoamMeshVolume.C vtkPVFoamMeshZone.C vtkPVFoamFaceField.H vtkPVFoamLagrangianFields.H vtkPVFoamPatchField.H vtkPVFoamPointFields.H vtkPVFoamPoints.H vtkPVFoamUpdateInfo.C vtkPVFoamUpdateInfoFields.H vtkPVFoamUtilities.C vtkPVFoamVolFields.H vtkPVFoamAddToSelection.H // Needed by VTK: vtkDataArrayTemplateImplicit.txx \*---------------------------------------------------------------------------*/ #ifndef vtkPVFoam_H #define vtkPVFoam_H // do not include legacy strstream headers #ifndef VTK_EXCLUDE_STRSTREAM_HEADERS # define VTK_EXCLUDE_STRSTREAM_HEADERS #endif #include "className.H" #include "fileName.H" #include "stringList.H" #include "wordList.H" #include "primitivePatch.H" #include "PrimitivePatchInterpolationTemplate.H" #include "volPointInterpolation.H" #undef VTKPVFOAM_DUALPORT // * * * * * * * * * * * * * Forward Declarations * * * * * * * * * * * * * // class vtkDataArraySelection; class vtkDataSet; class vtkPoints; class vtkPVFoamReader; class vtkRenderer; class vtkTextActor; class vtkMultiBlockDataSet; class vtkPolyData; class vtkUnstructuredGrid; class vtkIndent; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { // Foam class forward declarations class argList; class Time; class fvMesh; class IOobjectList; class polyPatch; class faceSet; class pointSet; template class IOField; template class List; /*---------------------------------------------------------------------------*\ Class vtkPVFoam Declaration \*---------------------------------------------------------------------------*/ class vtkPVFoam { // Private classes //- Bookkeeping for GUI checklists and the multi-block organization class partInfo { const char *name_; int block_; int start_; int size_; public: partInfo(const char *name, const int blockNo=0) : name_(name), block_(blockNo), start_(-1), size_(0) {} //- Return the block holding these datasets int block() const { return block_; } //- Assign block number, return previous value int block(int blockNo) { int prev = block_; block_ = blockNo; return prev; } const char* name() const { return name_; } int start() const { return start_; } int end() const { return start_ + size_; } int size() const { return size_; } bool empty() const { return !size_; } void reset() { start_ = -1; size_ = 0; } //- Assign new start and reset the size void operator=(const int i) { start_ = i; size_ = 0; } //- Increment the size void operator+=(const int n) { size_ += n; } }; //- bookkeeping for polyhedral cell decomposition // hide in extra pointMap (cellSet/cellZone) for now class polyDecomp { labelList superCells_; labelList addPointCellLabels_; labelList pointMap_; public: polyDecomp() {} //- Label of original cell for decomposed cells labelList& superCells() { return superCells_; } //- Label of original cell for decomposed cells const labelList& superCells() const { return superCells_; } //- Cell-centre labels for additional points of decomposed cells labelList& addPointCellLabels() { return addPointCellLabels_; } //- Cell-centre labels for additional points of decomposed cells const labelList& addPointCellLabels() const { return addPointCellLabels_; } //- Point labels for subsetted meshes labelList& pointMap() { return pointMap_; } //- Point labels for subsetted meshes const labelList& pointMap() const { return pointMap_; } //- Clear void clear() { superCells_.clear(); addPointCellLabels_.clear(); pointMap_.clear(); } }; // Private Data //- Access to the controlling vtkPVFoamReader vtkPVFoamReader* reader_; //- Foam time control autoPtr