cell_zoneGenerator.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) 2026 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::zoneGenerators::cell
26 
27 Description
28  A zoneGenerator which converts the cell, face and point zones
29  from a list of zoneGenerators into a cellZone.
30 
31  If a cellZone with the same name as the cellZone to be generated is
32  returned by a zoneGenerator in the list it is ignored.
33 
34  For faceZones the cells on either side of the faces are included in the
35  cellZone.
36 
37  For pointZones the cells surrounding the points are included in the
38  cellZone.
39 
40 Usage
41  \table
42  Property | Description | Required | Default value
43  type | Type: cell | yes |
44  name | Name of the zone | no | zoneGenerator name
45  cellType | Cell type selection option | no | master
46  moveUpdate | Switch to update after mesh motion | no | false
47  \endtable
48 
49  To convert faceZone named \c plane generated by
50  \verbatim
51  plane
52  {
53  type plane;
54  point (0.5 0 0);
55  normal (1 0 0);
56  }
57  \endverbatim
58  into a cellZone named \c planeCells, the following zoneGenerator can be used
59  \verbatim
60  planeCells
61  {
62  type cell;
63 
64  plane;
65  }
66  \endverbatim
67  or if the faceZone is not needed after the generation of the cellZone
68  \verbatim
69  planeCells
70  {
71  type cell;
72 
73  plane
74  {
75  type plane;
76  point (0.5 0 0);
77  normal (1 0 0);
78  }
79  }
80  \endverbatim
81 
82 SourceFiles
83  cell_zoneGenerator.C
84 
85 \*---------------------------------------------------------------------------*/
86 
87 #ifndef cell_zoneGenerator_H
88 #define cell_zoneGenerator_H
89 
90 #include "zoneGeneratorList.H"
91 
92 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
93 
94 namespace Foam
95 {
96 namespace zoneGenerators
97 {
98 
99 /*---------------------------------------------------------------------------*\
100  Class cell Declaration
101 \*---------------------------------------------------------------------------*/
102 
103 class cell
104 :
105  public zoneGenerator
106 {
107  // Private Data
108 
109  //- List of zoneGenerators
110  // which generate the zones to convert to the cellZone
111  zoneGeneratorList zoneGenerators_;
112 
113 
114 public:
115 
116  //- Runtime type information
117  TypeName("cell");
118 
119 
120  // Constructors
121 
122  //- Construct from dictionary
123  cell
124  (
125  const word& name,
126  const polyMesh& mesh,
128  );
129 
130 
131  //- Destructor
132  virtual ~cell();
133 
134 
135  // Member Functions
136 
137  virtual zoneSet generate() const;
138 };
139 
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
143 } // End namespace zoneGenerators
144 } // End namespace Foam
145 
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 
148 #endif
149 
150 // ************************************************************************* //
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
friend class zoneGeneratorList
Definition: zoneGenerator.H:80
const word & name() const
Return the zoneGenerator name.
const polyMesh & mesh() const
Return reference to the polyMesh.
virtual zoneSet generate() const
Generate and return the zoneSet.
cell(const word &name, const polyMesh &mesh, const dictionary &dict)
Construct from dictionary.
TypeName("cell")
Runtime type information.
virtual ~cell()
Destructor.
Zone container returned by zoneGenerator::generate.
Definition: zoneSet.H:94
Namespace for OpenFOAM.
dictionary dict