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

ensightPartCells.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::ensightPartCells
00026 
00027 Description
00028     An implementation of ensightPart to hold volume mesh cells.
00029 
00030 SourceFiles
00031     ensightPartCells.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef ensightPartCells_H
00036 #define ensightPartCells_H
00037 
00038 #include "ensightPart.H"
00039 #include <OpenFOAM/typeInfo.H>
00040 
00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00042 
00043 namespace Foam
00044 {
00045 
00046 /*---------------------------------------------------------------------------*\
00047                       Class ensightPartCells Declaration
00048 \*---------------------------------------------------------------------------*/
00049 
00050 class ensightPartCells
00051 :
00052     public ensightPart
00053 {
00054     // Private Member Functions
00055 
00056         //- Disallow default bitwise assignment
00057         void operator=(const ensightPartCells&);
00058 
00059         //- classify the cell types
00060         void classify(const labelList& idLabels = labelList::null());
00061 
00062         //- track points used
00063         virtual localPoints calcLocalPoints() const;
00064 
00065         //- track the points used
00066         // virtual void makeLocalPointMap();
00067 
00068         //- element connectivity
00069         virtual void writeConnectivity
00070         (
00071             ensightGeoFile& os,
00072             const string& key,
00073             const labelList& idList,
00074             const labelList& pointMap
00075         ) const;
00076 
00077 
00078 protected:
00079 
00080     //- addressable Ensight element types
00081     enum elemType
00082     {
00083         tetra4Elements,
00084         pyramid5Elements,
00085         penta6Elements,
00086         hexa8Elements,
00087         nfacedElements
00088     };
00089 
00090     // Static data members
00091     static List<word> elemTypes_;
00092 
00093 
00094 public:
00095 
00096     //- Runtime type information
00097     TypeName("ensightCells");
00098 
00099     // Constructors
00100 
00101         //- Construct empty part with number and description
00102         ensightPartCells(label partNumber, const string& partDescription);
00103 
00104         //- Construct from polyMesh without zones
00105         ensightPartCells(label partNumber, const polyMesh&);
00106 
00107         //- Construct from polyMesh and list of (non-zoned) cells
00108         ensightPartCells
00109         (
00110             label partNumber,
00111             const polyMesh&,
00112             const labelList&
00113         );
00114 
00115         //- Construct from polyMesh and cellZone
00116         ensightPartCells
00117         (
00118             label partNumber,
00119             const polyMesh&,
00120             const cellZone&
00121         );
00122 
00123         //- Construct as copy
00124         ensightPartCells(const ensightPartCells&);
00125 
00126         //- Construct from Istream
00127         ensightPartCells(Istream&);
00128 
00129         //- Construct on freestore from Istream
00130         static autoPtr<ensightPartCells> New(Istream& is)
00131         {
00132             return autoPtr<ensightPartCells>(new ensightPartCells(is));
00133         }
00134 
00135 
00136     //- Destructor
00137     virtual ~ensightPartCells();
00138 
00139 
00140     // Member Functions
00141 
00142         //- static listing of the element types
00143         virtual List<word> const& elementTypes() const
00144         {
00145             return elemTypes_;
00146         }
00147 };
00148 
00149 
00150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00151 
00152 } // End namespace Foam
00153 
00154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00155 
00156 #endif
00157 
00158 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines