BUG: PointEdgeWave : n cyclics bool instead of label
[OpenFOAM-1.6.x.git] / src / meshTools / sets / topoSets / pointZoneSet.H
blob8bd43c33390895ada85711e11280ac3ef2760329
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::pointZoneSet
28 Description
29     Like pointSet but updates pointZone when writing.
31 SourceFiles
32     pointZone.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef pointZoneSet_H
37 #define pointZoneSet_H
39 #include "pointSet.H"
40 #include "boolList.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 /*---------------------------------------------------------------------------*\
48                            Class pointZoneSet Declaration
49 \*---------------------------------------------------------------------------*/
51 class pointZoneSet
53     public pointSet
55     // Private data
57         const polyMesh& mesh_;
59         labelList addressing_;
61    // Private Member Functions
64 public:
66     //- Runtime type information
67     TypeName("pointZoneSet");
70     // Constructors
72         //- Construct from objectRegistry and name
73         pointZoneSet
74         (
75             const polyMesh& mesh,
76             const word& name,
77             readOption r=MUST_READ,
78             writeOption w=NO_WRITE
79         );
81         //- Construct from additional size of labelHashSet
82         pointZoneSet
83         (
84             const polyMesh& mesh,
85             const word& name,
86             const label,
87             writeOption w=NO_WRITE
88         );
90         //- Construct from existing set
91         pointZoneSet
92         (
93             const polyMesh& mesh,
94             const word& name,
95             const topoSet&,
96             writeOption w=NO_WRITE
97         );
101     // Destructor
103         virtual ~pointZoneSet();
106     // Member functions
108         const labelList& addressing() const
109         {
110             return addressing_;
111         }
113         labelList& addressing()
114         {
115             return addressing_;
116         }
118         //- Sort addressing and make pointSet part consistent with addressing
119         void updateSet();
121         //- Invert contents. (insert all members 0..maxLen-1 which were not in
122         //  set)
123         virtual void invert(const label maxLen);
125         //- Subset contents. Only elements present in both sets remain.
126         virtual void subset(const topoSet& set);
128         //- Add elements present in set.
129         virtual void addSet(const topoSet& set);
131         //- Delete elements present in set.
132         virtual void deleteSet(const topoSet& set);
134         //- Sync pointZoneSet across coupled patches.
135         virtual void sync(const polyMesh& mesh);
137         //- Write maxLen items with label and coordinates.
138         virtual void writeDebug
139         (
140             Ostream& os,
141             const primitiveMesh&,
142             const label maxLen
143         ) const;
145         //- Write pointZone
146         virtual bool writeObject
147         (
148             IOstream::streamFormat,
149             IOstream::versionNumber,
150             IOstream::compressionType
151         ) const;
153         //- Update any stored data for new labels
154         virtual void updateMesh(const mapPolyMesh& morphMap);
156         //- Return max index+1.
157         virtual label maxSize(const polyMesh& mesh) const;
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 } // End namespace Foam
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 #endif
173 // ************************************************************************* //