flip_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::flip
26 
27 Description
28  A zoneGenerator which flips the flipMap of the faceZone returned by the
29  given zoneGenerator.
30 
31  The returned faceZone is oriented and provides the corresponding flipMap.
32 
33 Usage
34  \table
35  Property | Description | Required | Default value
36  type | Type: face | yes |
37  name | Name of the zone | no | zoneGenerator name
38  \endtable
39 
40  To create the faceZone floatingObject containing the faces of the
41  \c floatingObject patch but flipped to point inwards:
42  \verbatim
43  floatingObjectBottom
44  {
45  type flip;
46 
47  floatingObject
48  {
49  type patch;
50  patch floatingObject;
51  }
52  }
53  \endverbatim
54 
55 SourceFiles
56  flip_zoneGenerator.C
57 
58 \*---------------------------------------------------------------------------*/
59 
60 #ifndef flip_zoneGenerator_H
61 #define flip_zoneGenerator_H
62 
63 #include "zoneGeneratorList.H"
64 
65 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
66 
67 namespace Foam
68 {
69 namespace zoneGenerators
70 {
71 
72 /*---------------------------------------------------------------------------*\
73  Class flip Declaration
74 \*---------------------------------------------------------------------------*/
75 
76 class flip
77 :
78  public zoneGenerator
79 {
80  // Private Data
81 
82  //- Zone generator supplying the faces
83  autoPtr<zoneGenerator> zoneGenerator_;
84 
85 
86 public:
87 
88  //- Runtime type information
89  TypeName("flip");
90 
91 
92  // Constructors
93 
94  //- Construct from dictionary
95  flip
96  (
97  const word& name,
98  const polyMesh& mesh,
99  const dictionary& dict
100  );
101 
102 
103  //- Destructor
104  virtual ~flip();
105 
106 
107  // Member Functions
108 
109  virtual zoneSet generate() const;
110 };
111 
112 
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 
115 } // End namespace zoneGenerators
116 } // End namespace Foam
117 
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 
120 #endif
121 
122 // ************************************************************************* //
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:80
A class for handling words, derived from string.
Definition: word.H:62
const word & name() const
virtual zoneSet generate() const
Generate and return the zoneSet.
virtual ~flip()
Destructor.
TypeName("flip")
Runtime type information.
flip(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.
dictionary dict