BUG: pointHitSort: define operator<
[OpenFOAM-1.7.x.git] / src / meshTools / sets / topoSets / cellSet.H
blobdad6aa255330c3e1337d40b3ba268a34ec8ec6b6
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2010 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
13     the Free Software Foundation, either version 3 of the License, or
14     (at your 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, see <http://www.gnu.org/licenses/>.
24 Class
25     Foam::cellSet
27 Description
28     A collection of cell labels.
30 SourceFiles
31     cellSet.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef cellSet_H
36 #define cellSet_H
38 #include "topoSet.H"
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 namespace Foam
45 /*---------------------------------------------------------------------------*\
46                            Class cellSet Declaration
47 \*---------------------------------------------------------------------------*/
49 class cellSet
51     public topoSet
55     // Private Member Functions
57         //- Disallow default bitwise copy construct
58         cellSet(const cellSet&);
60 public:
62     //- Runtime type information
63     TypeName("cellSet");
66     // Constructors
69         //- Construct from IOobject. No checking.
70         cellSet(const IOobject& obj);
72         //- Construct from polyMesh and name. Checks for valid cell ids.
73         cellSet
74         (
75             const polyMesh& mesh,
76             const word& name,
77             readOption r=MUST_READ,
78             writeOption w=NO_WRITE
79         );
81         //- Construct empty from size of labelHashSet
82         cellSet
83         (
84             const polyMesh& mesh,
85             const word& name,
86             const label sizes,
87             writeOption w=NO_WRITE
88         );
90         //- Construct from existing set
91         cellSet
92         (
93             const polyMesh& mesh,
94             const word& name,
95             const topoSet&,
96             writeOption w=NO_WRITE
97         );
99         //- Construct from labelHashSet
100         cellSet
101         (
102             const polyMesh& mesh,
103             const word& name,
104             const labelHashSet&,
105             writeOption w=NO_WRITE
106         );
109         // Used for tetMesh cellSet only.
111             //- Construct from objectRegistry and name.
112             cellSet
113             (
114                 const Time&,
115                 const word& name,
116                 readOption r=MUST_READ,
117                 writeOption w=NO_WRITE
118             );
120             //- Construct empty from objectRegistry.
121             cellSet
122             (
123                 const Time&,
124                 const word& name,
125                 const label size,
126                 writeOption w=NO_WRITE
127             );
129             //- Construct from labelHashSet
130             cellSet
131             (
132                 const Time&,
133                 const word& name,
134                 const labelHashSet&,
135                 writeOption w=NO_WRITE
136             );
139     // Destructor
141         virtual ~cellSet();
144     // Member functions
146         //- Sync cellSet across coupled patches.
147         virtual void sync(const polyMesh& mesh)
148         {}
150         //- Return max index+1.
151         virtual label maxSize(const polyMesh& mesh) const;
153         //- Update any stored data for new labels
154         virtual void updateMesh(const mapPolyMesh& morphMap);
156         //- Write maxLen items with label and coordinates.
157         virtual void writeDebug
158         (
159             Ostream& os,
160             const primitiveMesh&,
161             const label maxLen
162         ) const;
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 } // End namespace Foam
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 #endif
175 // ************************************************************************* //