faceBoolSet.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2018 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::faceBoolSet
28 
29 Description
30  A special purpose topoSet with the face labels stored as a boolList.
31  It does not correspond to a faceSet either (no associated IOobject).
32 
33 SourceFiles
34  faceBoolSet.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef Foam_faceBoolSet_H
39 #define Foam_faceBoolSet_H
40 
41 #include "topoBoolSet.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class faceBoolSet Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 class faceBoolSet
53 :
54  public topoBoolSet
55 {
56 public:
57 
58  //- Runtime type information
59  TypeName("faceBoolSet");
60 
61 
62  // Constructors
63 
64  //- Construct with nFaces elements, all elements unset
65  explicit faceBoolSet(const polyMesh& mesh);
66 
67  //- Construct with nFaces elements, using initial val
68  faceBoolSet(const polyMesh& mesh, const bool val);
69 
70  //- Copy construct from list, resizing to nFaces elements as required
71  faceBoolSet(const polyMesh& mesh, const boolList& bools);
72 
73  //- Move construct from list, resizing to nFaces elements as required
75 
76 
77  //- Destructor
78  virtual ~faceBoolSet() = default;
79 
80 
81  // Member Functions
82 
83  //- Sync faceBoolSet across coupled patches.
84  virtual void sync(const polyMesh& mesh);
85 
86  //- Return max index+1.
87  virtual label maxSize(const polyMesh& mesh) const;
88 
89  //- Update any stored data for new labels.
90  virtual void updateMesh(const mapPolyMesh& morphMap);
91 
92  //- Update any stored data for mesh redistribution.
93  virtual void distribute(const mapDistributePolyMesh& map);
94 
95  //- Write maxLen items with label and coordinates.
96  virtual void writeDebug
97  (
98  Ostream& os,
99  const primitiveMesh& mesh,
100  const label maxLen
101  ) const;
102 };
103 
104 
105 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
106 
107 } // End namespace Foam
108 
109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110 
111 #endif
112 
113 // ************************************************************************* //
virtual void sync(const polyMesh &mesh)
Sync faceBoolSet across coupled patches.
Definition: faceBoolSet.C:71
A special purpose topoSet with the face labels stored as a boolList. It does not correspond to a face...
Definition: faceBoolSet.H:47
Cell-face mesh analysis engine.
Definition: primitiveMesh.H:75
faceBoolSet(const polyMesh &mesh)
Construct with nFaces elements, all elements unset.
Definition: faceBoolSet.C:37
virtual void writeDebug(Ostream &os, const primitiveMesh &mesh, const label maxLen) const
Write maxLen items with label and coordinates.
Definition: faceBoolSet.C:96
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
virtual void updateMesh(const mapPolyMesh &morphMap)
Update any stored data for new labels.
Definition: faceBoolSet.C:83
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:157
dynamicFvMesh & mesh
Base for a special purpose topoSet using labels stored as a boolList.
Definition: topoBoolSet.H:47
TypeName("faceBoolSet")
Runtime type information.
virtual label maxSize(const polyMesh &mesh) const
Return max index+1.
Definition: faceBoolSet.C:77
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
List< bool > bools(const labelHashSet &locations)
Transform the on locations to a boolList, with true for each non-negative location and false for all ...
Definition: HashOps.C:72
OBJstream os(runTime.globalPath()/outputName)
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
virtual ~faceBoolSet()=default
Destructor.
Namespace for OpenFOAM.
virtual void distribute(const mapDistributePolyMesh &map)
Update any stored data for mesh redistribution.
Definition: faceBoolSet.C:89