generatedFaceZone.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2022-2025 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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.
20 
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/>.
23 
24 Class
25  Foam::generatedFaceZone
26 
27 Description
28  faceZone selection or generation class
29 
30  The faceZone is either looked-up from the mesh or generated by a
31  zoneGenerator and stored locally.
32 
33 Usage
34  Examples:
35  \verbatim
36  // Select the faces within the faceZone rotor
37  faceZone rotor;
38 
39  // Select the faces within the given box
40  faceZone
41  {
42  type box;
43  box (3.48 -0.1 -0.1) (3.5 0.1 0.1);
44  }
45 
46  // Select the faces representing the given plane
47  faceZone
48  {
49  type plane;
50  point (0.41 0 0);
51  normal (1 0 0);
52  }
53  \endverbatim
54 
55 See also
56  Foam::generatedZoneSet
57  Foam::zoneGenerator
58 
59 SourceFiles
60  generatedFaceZone.C
61  generatedFaceZoneI.H
62 
63 \*---------------------------------------------------------------------------*/
64 
65 #ifndef generatedFaceZone_H
66 #define generatedFaceZone_H
67 
68 #include "generatedZoneSet.H"
69 
70 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
71 
72 namespace Foam
73 {
74 
75 class polyMesh;
76 class polyMeshMap;
77 class polyDistributionMap;
78 
79 /*---------------------------------------------------------------------------*\
80  Class generatedFaceZone Declaration
81 \*---------------------------------------------------------------------------*/
82 
84 {
85  // Private data
86 
87  //- Reference to the mesh
88  const polyMesh& mesh_;
89 
90  generatedZoneSet faceZone_;
91 
92 
93 public:
94 
95  // Constructors
96 
97  //- Construct from mesh and dictionary
99 
100  //- Disallow default bitwise copy construction
101  generatedFaceZone(const generatedFaceZone&) = delete;
102 
103 
104  //- Destructor
106 
107 
108  // Member Functions
109 
110  // Access
111 
112  //- Return const access to the name of faceZone
113  inline const word& name() const;
114 
115  //- Return const access to the face set
116  inline const faceZone& zone() const;
117 
118  //- Return the number of faces in the set
119  inline label nFaces() const;
120 
121  //- Return the face index corresponding to the face set index
122  inline label facei(const label i) const;
123 
124 
125  // Mesh changes
126 
127  //- Update for mesh motion
128  void movePoints();
129 
130  //- Update topology using the given map
131  void topoChange(const polyTopoChangeMap&);
132 
133  //- Update from another mesh using the given map
134  void mapMesh(const polyMeshMap&);
135 
136  //- Redistribute or update using the given distribution map
137  void distribute(const polyDistributionMap&);
138 
139 
140  // IO
141 
142  //- Read coefficients dictionary
143  bool read(const dictionary& dict);
144 
145 
146  // Member Operators
147 
148  //- Disallow default bitwise assignment
149  void operator=(const generatedFaceZone&) = delete;
150 };
151 
152 
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 
155 } // End namespace Foam
156 
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 
159 #include "generatedFaceZoneI.H"
160 
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 
163 #endif
164 
165 // ************************************************************************* //
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Named list of face indices representing a sub-set of the mesh faces.
Definition: faceZone.H:66
faceZone selection or generation class
generatedFaceZone(const polyMesh &mesh, const dictionary &dict)
Construct from mesh and dictionary.
label facei(const label i) const
Return the face index corresponding to the face set index.
void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
void movePoints()
Update for mesh motion.
bool read(const dictionary &dict)
Read coefficients dictionary.
void operator=(const generatedFaceZone &)=delete
Disallow default bitwise assignment.
void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
const faceZone & zone() const
Return const access to the face set.
const word & name() const
Return const access to the name of faceZone.
label nFaces() const
Return the number of faces in the set.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
Definition: polyMeshMap.H:51
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:80
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
A class for handling words, derived from string.
Definition: word.H:62
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
Namespace for OpenFOAM.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
dictionary dict