zonesGenerator.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-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::zonesGenerator
26 
27 Description
28  MeshObject zoneGeneratorList instantiated by polyMesh
29 
30  to provide optional dynamic zones which may be updated following mesh motion
31  and/or topology change.
32 
33 See also
34  Foam::zoneGeneratorList
35  Foam::zoneGenerator
36  Foam::zoneSet
37 
38 SourceFiles
39  zonesGenerator.C
40 
41 \*---------------------------------------------------------------------------*/
42 #ifndef zonesGenerator_H
43 #define zonesGenerator_H
44 
45 #include "zoneGeneratorList.H"
46 #include "IOdictionary.H"
47 #include "DemandDrivenMeshObject.H"
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 
54 /*---------------------------------------------------------------------------*\
55  Class zonesGenerator Declaration
56 \*---------------------------------------------------------------------------*/
57 
58 class zonesGenerator
59 :
61  <
62  polyMesh,
63  TopoChangeableMeshObject,
64  zonesGenerator,
65  IOdictionary
66  >,
67  public zoneGeneratorList
68 {
69  // Private Member Functions
70 
71  //- Create IO object for an optional zonesGenerator
72  IOobject io(const polyMesh& mesh) const;
73 
74  void generate();
75 
76 
77 protected:
78 
79  // Protected Constructors
80 
81  friend class DemandDrivenMeshObject;
82 
83  //- Read construct from polyMesh
84  explicit zonesGenerator(const polyMesh& mesh);
85 
86 
87 public:
88 
89  //- Runtime type information
90  TypeName("zonesGenerator");
91 
92 
93  // Constructors
94 
95  //- Disallow default bitwise copy construction
96  zonesGenerator(const zonesGenerator&) = delete;
97 
99  <
100  polyMesh,
104  >::New;
105 
106 
107  //- Destructor
108  virtual ~zonesGenerator()
109  {}
110 
111 
112  // Member Functions
113 
114  //- Read the zonesGenerator dictionary if it has changed
115  // and regenerate
116  virtual bool read();
117 
118  //- Update for mesh motion
119  virtual bool movePoints();
120 
121  //- Redistribute or update using the given distribution map
122  virtual void distribute(const polyDistributionMap& map);
123 
124  //- Update topology using the given map
125  virtual void topoChange(const polyTopoChangeMap& map);
126 
127  //- Update from another mesh using the given map
128  virtual void mapMesh(const polyMeshMap& map);
129 
130 
131  // Member Operators
132 
133  //- Disallow default bitwise assignment
134  void operator=(const zonesGenerator&) = delete;
135 };
136 
137 
138 //- Trait for obtaining global status
139 template<>
141 {
142  static const bool global = true;
143 };
144 
145 
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 
148 } // End namespace Foam
149 
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 
152 #endif
153 
154 // ************************************************************************* //
Templated abstract base-class for demand-driven mesh objects used to automate their allocation to the...
static zonesGenerator & New(const word &name, const polyMesh &mesh)
Construct and return the named DemandDrivenMeshObject.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:57
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:99
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
Definition: polyMeshMap.H:51
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:78
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
List of zoneGenerators.
MeshObject zoneGeneratorList instantiated by polyMesh.
virtual bool movePoints()
Update for mesh motion.
void operator=(const zonesGenerator &)=delete
Disallow default bitwise assignment.
TypeName("zonesGenerator")
Runtime type information.
zonesGenerator(const polyMesh &mesh)
Read construct from polyMesh.
virtual void mapMesh(const polyMeshMap &map)
Update from another mesh using the given map.
virtual ~zonesGenerator()
Destructor.
virtual void distribute(const polyDistributionMap &map)
Redistribute or update using the given distribution map.
virtual void topoChange(const polyTopoChangeMap &map)
Update topology using the given map.
virtual bool read()
Read the zonesGenerator dictionary if it has changed.
Namespace for OpenFOAM.
Trait for obtaining global status.
Definition: IOobject.H:518
static const bool global
Definition: IOobject.H:519