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