1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by
13 the Free Software Foundation, either version 3 of the License, or
14 (at your option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
28 Encapsulation of VTK mesh data. Holds mesh or meshsubset and
29 polyhedral-cell decomposition on it.
34 \*---------------------------------------------------------------------------*/
39 #include "fvMeshSubset.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 // Forward declaration of classes
49 /*---------------------------------------------------------------------------*\
50 Class vtkMesh Declaration
51 \*---------------------------------------------------------------------------*/
60 //- Subsetting engine + sub-fvMesh
61 fvMeshSubset subsetter_;
63 //- Current cellSet (or empty)
66 // //- Current decomposition of topology
67 // mutable autoPtr<vtkTopo> topoPtr_;
71 // Private Member Functions
73 //- Disallow default bitwise copy construct
74 vtkMesh(const vtkMesh&);
76 //- Disallow default bitwise assignment
77 void operator=(const vtkMesh&);
84 //- Construct from components
85 vtkMesh(fvMesh& baseMesh, const word& setName = "");
93 const fvMesh& baseMesh() const
98 const fvMeshSubset& subsetter() const
103 //- Check if running subMesh
104 bool useSubMesh() const
106 return setName_.size();
110 // const vtkTopo& topo() const
112 // if (topoPtr_.empty())
114 // topoPtr_.reset(new vtkTopo(mesh()));
116 // return topoPtr_();
119 //- Access either mesh or submesh
120 const fvMesh& mesh() const
124 return subsetter_.subMesh();
132 // //- Number of field cells
133 // label nFieldCells() const
135 // return topo().vertLabels().size();
138 // //- Number of field points
139 // label nFieldPoints() const
141 // return mesh().nPoints() + topo().addPointCellLabels().size();
148 polyMesh::readUpdateState readUpdate();
151 //- Map volume field (does in fact do very little interpolation;
152 // just copied from fvMeshSubset)
153 template<class GeoField>
154 tmp<GeoField> interpolate(const GeoField& fld) const
158 tmp<GeoField> subFld = subsetter_.interpolate(fld);
159 subFld().rename(fld.name());
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 } // End namespace Foam
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178 // ************************************************************************* //