initial commit for version 1.5.x patch release
[OpenFOAM-1.5.x.git] / applications / utilities / postProcessing / dataConversion / foamToFieldview9 / fieldviewTopology.H
blob1d0f43b86c3f2b3ef116b4425d961300e23e9669
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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 the
13     Free Software Foundation; either version 2 of the License, or (at your
14     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
19     for more details.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     Foam::fieldviewTopology
28 Description
30 SourceFiles
31     fieldviewTopology.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef fieldviewTopology_H
36 #define fieldviewTopology_H
38 #include "labelList.H"
39 #include "faceList.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 namespace Foam
46 // Forward declaration of classes
47 class polyMesh;
48 class cellShape;
50 /*---------------------------------------------------------------------------*\
51                            Class fieldviewTopology Declaration
52 \*---------------------------------------------------------------------------*/
54 class fieldviewTopology
56     // Private data
58         //- Hexes in fieldview format
59         labelList hexLabels_;
61         labelList prismLabels_;
63         labelList pyrLabels_;
65         labelList tetLabels_;
67         //- Number of non-hex/prism/pyr/tet labels
68         label nPoly_;
71         //
72         // Patches
73         //
75         //- Quad and tri patch faces in fv format
76         labelListList quadFaceLabels_;
78         //- Number of polyhedral faces per patch
79         labelList nPolyFaces_;
82     // Private Member Functions
84         static labelList calcFaceAddressing
85         (
86             const faceList& allFaces,   // faces given faceLabels
87             const cellShape& shape,
88             const labelList& faces,     // faceLabels for given cell
89             const label cellI
90         );
93         //- Disallow default bitwise copy construct
94         fieldviewTopology(const fieldviewTopology&);
96         //- Disallow default bitwise assignment
97         void operator=(const fieldviewTopology&);
100 public:
102     // Constructors
104         //- Construct from components
105         fieldviewTopology(const polyMesh& mesh, const bool setWallInfo);
108     // Member Functions
110         // Access
112             const labelList& hexLabels() const
113             {
114                 return hexLabels_;
115             }
117             const labelList& prismLabels() const
118             {
119                 return prismLabels_;
120             }
122             const labelList& pyrLabels() const
123             {
124                 return pyrLabels_;
125             }
127             const labelList& tetLabels() const
128             {
129                 return tetLabels_;
130             }
132             label nHex() const
133             {
134                 return hexLabels().size()/9;
135             }
137             label nPrism() const
138             {
139                 return prismLabels().size()/7;
140             }
142             label nPyr() const
143             {
144                 return pyrLabels().size()/6;
145             }
147             label nTet() const
148             {
149                 return tetLabels().size()/5;
150             }
152             label nPoly() const
153             {
154                 return nPoly_;
155             }
157             const labelListList& quadFaceLabels() const
158             {
159                 return quadFaceLabels_;
160             }
162             const labelList& nPolyFaces() const
163             {
164                 return nPolyFaces_;
165             }
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 } // End namespace Foam
173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 #endif
177 // ************************************************************************* //