1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
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
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/>.
28 Like cellSet but updates cellZone when writing.
33 \*---------------------------------------------------------------------------*/
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 /*---------------------------------------------------------------------------*\
47 Class cellZoneSet Declaration
48 \*---------------------------------------------------------------------------*/
56 const polyMesh& mesh_;
58 labelList addressing_;
62 //- Runtime type information
63 TypeName("cellZoneSet");
68 //- Construct from objectRegistry and name
73 readOption r=MUST_READ,
74 writeOption w=NO_WRITE
77 //- Construct from additional size of labelHashSet
83 writeOption w=NO_WRITE
86 //- Construct from existing set
92 writeOption w=NO_WRITE
98 virtual ~cellZoneSet();
103 const labelList& addressing() const
108 labelList& addressing()
113 //- Sort addressing and make cellSet part consistent with addressing
116 //- Invert contents. (insert all members 0..maxLen-1 which were not in
118 virtual void invert(const label maxLen);
120 //- Subset contents. Only elements present in both sets remain.
121 virtual void subset(const topoSet& set);
123 //- Add elements present in set.
124 virtual void addSet(const topoSet& set);
126 //- Delete elements present in set.
127 virtual void deleteSet(const topoSet& set);
129 //- Sync cellZoneSet across coupled patches.
130 virtual void sync(const polyMesh& mesh);
132 //- Write maxLen items with label and coordinates.
133 virtual void writeDebug
136 const primitiveMesh&,
141 virtual bool writeObject
143 IOstream::streamFormat,
144 IOstream::versionNumber,
145 IOstream::compressionType
148 //- Update any stored data for new labels
149 virtual void updateMesh(const mapPolyMesh& morphMap);
151 //- Return max index+1.
152 virtual label maxSize(const polyMesh& mesh) const;
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 } // End namespace Foam
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 // ************************************************************************* //