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 pointZones, faceZones and cellZones
29  from a list of zoneGenerators into a single cellZone.
30 
31  For pointZones the cells containing any of the points are included.
32  For faceZones the cells on either side of the faces are included.
33  For cellZones the cells in the cellZones are included.
34 
35 Usage
36  \table
37  Property | Description | Required | Default value
38  type | Type: cell | yes |
39  name | Name of the zone | no | zoneGenerator name
40  cellType | Cell type selection option | no | master
41  moveUpdate | Switch to update after mesh motion | no | false
42  \endtable
43 
44  Examples:
45  Given a faceZone named \c plane is generated by
46  \verbatim
47  plane
48  {
49  type plane;
50  point (0.5 0 0);
51  normal (1 0 0);
52  }
53  \endverbatim
54  a cellZone named \c planeCells containing the cells from both sides of
55  the \c plane faceZone is generated by
56  \verbatim
57  planeCells
58  {
59  type cell;
60 
61  plane; // lookup zone named 'plane'
62  }
63  \endverbatim
64  or if the faceZone is not needed after the generation of the cellZone
65  \verbatim
66  planeCells
67  {
68  type cell;
69 
70  plane
71  {
72  type plane;
73  point (0.5 0 0);
74  normal (1 0 0);
75  }
76  }
77  \endverbatim
78  To create a cellZone from two zones named \c plane1 and \c plane2
79  \verbatim
80  planeCells
81  {
82  type cell;
83 
84  plane1; // lookup 'plane1'
85  plane2; // lookup 'plane2'
86  }
87  \endverbatim
88 
89 SourceFiles
90  cell_zoneGenerator.C
91 
92 \*---------------------------------------------------------------------------*/
93 
94 #ifndef cell_zoneGenerator_H
95 #define cell_zoneGenerator_H
96 
97 #include "zoneGeneratorList.H"
98 
99 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
100 
101 namespace Foam
102 {
103 namespace zoneGenerators
104 {
105 
106 /*---------------------------------------------------------------------------*\
107  Class cell Declaration
108 \*---------------------------------------------------------------------------*/
109 
110 class cell
111 :
112  public zoneGenerator
113 {
114  // Private Data
115 
116  //- List of zoneGenerators
117  // which generate the zones to convert to the cellZone
118  zoneGeneratorList zoneGenerators_;
119 
120 
121 public:
122 
123  //- Runtime type information
124  TypeName("cell");
125 
126 
127  // Constructors
128 
129  //- Construct from dictionary
130  cell
131  (
132  const word& name,
133  const polyMesh& mesh,
135  );
136 
137 
138  //- Destructor
139  virtual ~cell();
140 
141 
142  // Member Functions
143 
144  virtual zoneSet generate() const;
145 };
146 
147 
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 
150 } // End namespace zoneGenerators
151 } // End namespace Foam
152 
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 
155 #endif
156 
157 // ************************************************************************* //
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