BUG: PointEdgeWave : n cyclics bool instead of label
[OpenFOAM-1.6.x.git] / src / meshTools / sets / topoSets / faceZoneSet.H
blobfd800a44aa2511f393ff20d25fdfa07f40871e63
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::faceZoneSet
28 Description
29     Like faceSet but updates faceZone when writing.
31 SourceFiles
32     faceZone.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef faceZoneSet_H
37 #define faceZoneSet_H
39 #include "faceSet.H"
40 #include "boolList.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 /*---------------------------------------------------------------------------*\
48                            Class faceZoneSet Declaration
49 \*---------------------------------------------------------------------------*/
51 class faceZoneSet
53     public faceSet
55     // Private data
57         const polyMesh& mesh_;
59         labelList addressing_;
61         boolList flipMap_;
63    // Private Member Functions
66 public:
68     //- Runtime type information
69     TypeName("faceZoneSet");
72     // Constructors
74         //- Construct from objectRegistry and name
75         faceZoneSet
76         (
77             const polyMesh& mesh,
78             const word& name,
79             readOption r=MUST_READ,
80             writeOption w=NO_WRITE
81         );
83         //- Construct from additional size of labelHashSet
84         faceZoneSet
85         (
86             const polyMesh& mesh,
87             const word& name,
88             const label,
89             writeOption w=NO_WRITE
90         );
92         //- Construct from existing set
93         faceZoneSet
94         (
95             const polyMesh& mesh,
96             const word& name,
97             const topoSet&,
98             writeOption w=NO_WRITE
99         );
103     // Destructor
105         virtual ~faceZoneSet();
108     // Member functions
110         const labelList& addressing() const
111         {
112             return addressing_;
113         }
115         labelList& addressing()
116         {
117             return addressing_;
118         }
121         const boolList& flipMap() const
122         {
123             return flipMap_;
124         }
126         boolList& flipMap()
127         {
128             return flipMap_;
129         }
132         //- Sort addressing and make faceSet part consistent with addressing
133         void updateSet();
135         //- Invert contents. (insert all members 0..maxLen-1 which were not in
136         //  set)
137         virtual void invert(const label maxLen);
139         //- Subset contents. Only elements present in both sets remain.
140         virtual void subset(const topoSet& set);
142         //- Add elements present in set.
143         virtual void addSet(const topoSet& set);
145         //- Delete elements present in set.
146         virtual void deleteSet(const topoSet& set);
148         //- Sync faceZoneSet across coupled patches.
149         virtual void sync(const polyMesh& mesh);
151         //- Write maxLen items with label and coordinates.
152         virtual void writeDebug
153         (
154             Ostream& os,
155             const primitiveMesh&,
156             const label maxLen
157         ) const;
159         //- Write faceZone
160         virtual bool writeObject
161         (
162             IOstream::streamFormat,
163             IOstream::versionNumber,
164             IOstream::compressionType
165         ) const;
167         //- Update any stored data for new labels
168         virtual void updateMesh(const mapPolyMesh& morphMap);
170         //- Return max index+1.
171         virtual label maxSize(const polyMesh& mesh) const;
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 } // End namespace Foam
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 #endif
187 // ************************************************************************* //