FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

vtkTopo.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software: you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::vtkTopo
00026 
00027 Description
00028     Polyhedral cell decomposition for VTK.
00029 
00030 SourceFiles
00031     vtkTopo.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef vtkTopo_H
00036 #define vtkTopo_H
00037 
00038 #include <OpenFOAM/labelList.H>
00039 
00040 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00041 
00042 namespace Foam
00043 {
00044 
00045 // Forward declaration of classes
00046 class polyMesh;
00047 
00048 /*---------------------------------------------------------------------------*\
00049                            Class vtkTopo Declaration
00050 \*---------------------------------------------------------------------------*/
00051 
00052 class vtkTopo
00053 {
00054     // Private data
00055 
00056         const polyMesh& mesh_;
00057 
00058         //- Vertices per cell (including added cells) in vtk ordering
00059         labelListList vertLabels_;
00060 
00061         //- Cell types (including added cells) in vtk numbering
00062         labelList cellTypes_;
00063 
00064         labelList addPointCellLabels_;
00065 
00066         labelList superCells_;
00067 
00068 
00069     // Private Member Functions
00070 
00071         //- Disallow default bitwise copy construct
00072         vtkTopo(const vtkTopo&);
00073 
00074         //- Disallow default bitwise assignment
00075         void operator=(const vtkTopo&);
00076 
00077 
00078 public:
00079 
00080    // Public static data
00081 
00082         // this must be consistent with the enumeration in "vtkCell.H"
00083         enum vtkTypes
00084         {
00085             VTK_TRIANGLE   = 5,
00086             VTK_POLYGON    = 7,
00087             VTK_QUAD       = 9,
00088 
00089             VTK_TETRA      = 10,
00090             VTK_PYRAMID    = 14,
00091             VTK_WEDGE      = 13,
00092             VTK_HEXAHEDRON = 12,
00093         };
00094 
00095     // Constructors
00096 
00097         //- Construct from components
00098         vtkTopo(const polyMesh& mesh);
00099 
00100 
00101     // Member Functions
00102 
00103         // Access
00104 
00105             const labelListList& vertLabels() const
00106             {
00107                 return vertLabels_;
00108             }
00109 
00110             const labelList& cellTypes() const
00111             {
00112                 return cellTypes_;
00113             }
00114 
00115             const labelList& addPointCellLabels() const
00116             {
00117                 return addPointCellLabels_;
00118             }
00119 
00120             const labelList& superCells() const
00121             {
00122                 return superCells_;
00123             }
00124 };
00125 
00126 
00127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00128 
00129 } // End namespace Foam
00130 
00131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00132 
00133 #endif
00134 
00135 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines