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

cellSet.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::cellSet
00026 
00027 Description
00028     A collection of cell labels.
00029 
00030 SourceFiles
00031     cellSet.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef cellSet_H
00036 #define cellSet_H
00037 
00038 #include <meshTools/topoSet.H>
00039 
00040 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00041 
00042 namespace Foam
00043 {
00044 
00045 /*---------------------------------------------------------------------------*\
00046                            Class cellSet Declaration
00047 \*---------------------------------------------------------------------------*/
00048 
00049 class cellSet
00050 :
00051     public topoSet
00052 {
00053 
00054 
00055     // Private Member Functions
00056 
00057         //- Disallow default bitwise copy construct
00058         cellSet(const cellSet&);
00059 
00060 public:
00061 
00062     //- Runtime type information
00063     TypeName("cellSet");
00064 
00065 
00066     // Constructors
00067 
00068 
00069         //- Construct from IOobject. No checking.
00070         cellSet(const IOobject& obj);
00071 
00072         //- Construct from polyMesh and name. Checks for valid cell ids.
00073         cellSet
00074         (
00075             const polyMesh& mesh,
00076             const word& name,
00077             readOption r=MUST_READ,
00078             writeOption w=NO_WRITE
00079         );
00080 
00081         //- Construct empty from size of labelHashSet
00082         cellSet
00083         (
00084             const polyMesh& mesh,
00085             const word& name,
00086             const label sizes,
00087             writeOption w=NO_WRITE
00088         );
00089 
00090         //- Construct from existing set
00091         cellSet
00092         (
00093             const polyMesh& mesh,
00094             const word& name,
00095             const topoSet&,
00096             writeOption w=NO_WRITE
00097         );
00098 
00099         //- Construct from labelHashSet
00100         cellSet
00101         (
00102             const polyMesh& mesh,
00103             const word& name,
00104             const labelHashSet&,
00105             writeOption w=NO_WRITE
00106         );
00107 
00108 
00109         // Used for tetMesh cellSet only.
00110 
00111             //- Construct from objectRegistry and name.
00112             cellSet
00113             (
00114                 const Time&,
00115                 const word& name,
00116                 readOption r=MUST_READ,
00117                 writeOption w=NO_WRITE
00118             );
00119 
00120             //- Construct empty from objectRegistry.
00121             cellSet
00122             (
00123                 const Time&,
00124                 const word& name,
00125                 const label size,
00126                 writeOption w=NO_WRITE
00127             );
00128 
00129             //- Construct from labelHashSet
00130             cellSet
00131             (
00132                 const Time&,
00133                 const word& name,
00134                 const labelHashSet&,
00135                 writeOption w=NO_WRITE
00136             );
00137 
00138 
00139     // Destructor
00140 
00141         virtual ~cellSet();
00142 
00143 
00144     // Member functions
00145 
00146         //- Sync cellSet across coupled patches.
00147         virtual void sync(const polyMesh& mesh)
00148         {}
00149 
00150         //- Return max index+1.
00151         virtual label maxSize(const polyMesh& mesh) const;
00152 
00153         //- Update any stored data for new labels
00154         virtual void updateMesh(const mapPolyMesh& morphMap);
00155 
00156         //- Write maxLen items with label and coordinates.
00157         virtual void writeDebug
00158         (
00159             Ostream& os,
00160             const primitiveMesh&,
00161             const label maxLen
00162         ) const;
00163 
00164 };
00165 
00166 
00167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00168 
00169 } // End namespace Foam
00170 
00171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00172 
00173 #endif
00174 
00175 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines