initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / conversion / ensight / part / ensightPartCells.H
blob84fb776cac3771091b39b5b227ba60d20bdde66b
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 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::ensightPartCells
28 Description
29     An implementation of ensightPart to hold volume mesh cells.
31 SourceFiles
32     ensightPartCells.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef ensightPartCells_H
37 #define ensightPartCells_H
39 #include "ensightPart.H"
40 #include "typeInfo.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 /*---------------------------------------------------------------------------*\
48                       Class ensightPartCells Declaration
49 \*---------------------------------------------------------------------------*/
51 class ensightPartCells
53     public ensightPart
55     // Private Member Functions
57         //- Disallow default bitwise assignment
58         void operator=(const ensightPartCells&);
60         //- classify the cell types
61         void classify(const labelList& idLabels = labelList::null());
63         //- track points used
64         virtual localPoints calcLocalPoints() const;
66         //- track the points used
67         // virtual void makeLocalPointMap();
69         //- element connectivity
70         virtual void writeConnectivity
71         (
72             ensightGeoFile& os,
73             const string& key,
74             const labelList& idList,
75             const labelList& pointMap
76         ) const;
79 protected:
81     //- addressable Ensight element types
82     enum elemType
83     {
84         tetra4Elements,
85         pyramid5Elements,
86         penta6Elements,
87         hexa8Elements,
88         nfacedElements
89     };
91     // Static data members
92     static List<word> elemTypes_;
95 public:
97     //- Runtime type information
98     TypeName("ensightCells");
100     // Constructors
102         //- Construct empty part with number and description
103         ensightPartCells(label partNumber, const string& partDescription);
105         //- Construct from polyMesh without zones
106         ensightPartCells(label partNumber, const polyMesh&);
108         //- Construct from polyMesh and list of (non-zoned) cells
109         ensightPartCells
110         (
111             label partNumber,
112             const polyMesh&,
113             const labelList&
114         );
116         //- Construct from polyMesh and cellZone
117         ensightPartCells
118         (
119             label partNumber,
120             const polyMesh&,
121             const cellZone&
122         );
124         //- Construct as copy
125         ensightPartCells(const ensightPartCells&);
127         //- Construct from Istream
128         ensightPartCells(Istream&);
130         //- Construct on freestore from Istream
131         static autoPtr<ensightPartCells> New(Istream& is)
132         {
133             return autoPtr<ensightPartCells>(new ensightPartCells(is));
134         }
137     //- Destructor
138     virtual ~ensightPartCells();
141     // Member Functions
143         //- static listing of the element types
144         virtual List<word> const& elementTypes() const
145         {
146             return elemTypes_;
147         }
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 } // End namespace Foam
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 #endif
159 // ************************************************************************* //