point_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::point
26 
27 Description
28  A zoneGenerator which converts the point, cell and face zones
29  from a list of zoneGenerators into a pointZone
30 
31  If a pointZone with the same name as the pointZone to be generated is
32  returned by a zoneGenerator in the list it is ignored.
33 
34 Usage
35  \table
36  Property | Description | Required | Default value
37  type | Type: point | yes |
38  name | Name of the zone | no | zoneGenerator name
39  moveUpdate | Switch to update after mesh motion | no | false
40  \endtable
41 
42  To convert cellZone named \c cone1 generated by
43  \verbatim
44  cone1
45  {
46  type truncatedCone;
47  zoneType cell;
48 
49  point1 (-0.0075 0 -1);
50  point2 (-0.003 0.0025 1);
51  radius1 0.001;
52  radius2 0.0005;
53  }
54  \endverbatim
55  into a pointZone also named \c cone1, the following zoneGenerator named \c
56  cone1Points can be used
57  \verbatim
58  cone1Points
59  {
60  type point;
61  name cone1;
62 
63  cone1;
64  }
65  \endverbatim
66  If there is also a faceZone named \c cone1 which should not be included in
67  the conversion to the pointZone the lookup of the \c cone1 can specify the
68  cellZone type:
69  \verbatim
70  cone1Points
71  {
72  type point;
73  name cone1;
74 
75  cone1
76  {
77  zoneType cell;
78  }
79  }
80  \endverbatim
81 
82 SourceFiles
83  point_zoneGenerator.C
84 
85 \*---------------------------------------------------------------------------*/
86 
87 #ifndef point_zoneGenerator_H
88 #define point_zoneGenerator_H
89 
90 #include "zoneGeneratorList.H"
91 
92 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
93 
94 namespace Foam
95 {
96 namespace zoneGenerators
97 {
98 
99 /*---------------------------------------------------------------------------*\
100  Class point Declaration
101 \*---------------------------------------------------------------------------*/
102 
103 class point
104 :
105  public zoneGenerator
106 {
107  // Private Data
108 
109  zoneGeneratorList zoneGenerators_;
110 
111 
112 public:
113 
114  //- Runtime type information
115  TypeName("point");
116 
117 
118  // Constructors
119 
120  //- Construct from dictionary
121  point
122  (
123  const word& name,
124  const polyMesh& mesh,
125  const dictionary& dict
126  );
127 
128 
129  //- Destructor
130  virtual ~point();
131 
132 
133  // Member Functions
134 
135  virtual zoneSet generate() const;
136 };
137 
138 
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 
141 } // End namespace zoneGenerators
142 } // End namespace Foam
143 
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 
146 #endif
147 
148 // ************************************************************************* //
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
friend class zoneGeneratorList
Definition: zoneGenerator.H:80
const word & name() const
virtual zoneSet generate() const
Generate and return the zoneSet.
point(const word &name, const polyMesh &mesh, const dictionary &dict)
Construct from dictionary.
TypeName("point")
Runtime type information.
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.
vector point
Point is a vector.
Definition: point.H:41
dictionary dict