patchCells_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) 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::zoneGenerators::patchCells
26 
27 Description
28  A zoneGenerator which constructs a cellZone of the cells adjacent to a set
29  of patches
30 
31 Usage
32  \table
33  Property | Description | Required | Default value
34  type | Type: patchCells | yes |
35  name | Name of the zone | no | zoneGenerator name
36  patch | Name of patch | no |
37  patches | List of patch names | no | ()
38  moveUpdate | Switch to update after mesh motion | no | false
39  \endtable
40 
41  To convert patch named \c freeSurface into a cellZone of the same name:
42  \verbatim
43  freeSurface
44  {
45  type patchCells;
46  patch freeSurface;
47  }
48  \endverbatim
49 
50 SourceFiles
51  patchCells_zoneGenerator.C
52 
53 \*---------------------------------------------------------------------------*/
54 
55 #ifndef patchCells_zoneGenerator_H
56 #define patchCells_zoneGenerator_H
57 
58 #include "zoneGeneratorList.H"
59 
60 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
61 
62 namespace Foam
63 {
64 namespace zoneGenerators
65 {
66 
67 /*---------------------------------------------------------------------------*\
68  Class patchCells Declaration
69 \*---------------------------------------------------------------------------*/
70 
71 class patchCells
72 :
73  public zoneGenerator
74 {
75  // Private Data
76 
77  //- Set of patches to convert into cellZone
78  labelHashSet patchSet_;
79 
80 
81 public:
82 
83  //- Runtime type information
84  TypeName("patchCells");
85 
86 
87  // Constructors
88 
89  //- Construct from dictionary
91  (
92  const word& name,
93  const polyMesh& mesh,
94  const dictionary& dict
95  );
96 
97 
98  //- Destructor
99  virtual ~patchCells();
100 
101 
102  // Member Functions
103 
104  virtual zoneSet generate() const;
105 };
106 
107 
108 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
109 
110 } // End namespace zoneGenerators
111 } // End namespace Foam
112 
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 
115 #endif
116 
117 // ************************************************************************* //
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.
patchCells(const word &name, const polyMesh &mesh, const dictionary &dict)
Construct from dictionary.
TypeName("patchCells")
Runtime type information.
Zone container returned by zoneGenerator::generate.
Definition: zoneSet.H:94
Namespace for OpenFOAM.
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys.
Definition: HashSet.H:213
dictionary dict