zoneGeneratorList.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::zoneGeneratorList
26 
27 Description
28  List of zoneGenerators
29 
30  Used by Foam::zonesGenerator to generate and store the zones and also by the
31  zoneGenerators::Union, zoneGenerators::difference and
32  zoneGenerators::intersection zoneGenerators to construct the list of zones
33  they combine.
34 
35 See also
36  zonesGenerator
37  zoneGenerator
38  zoneSet
39 
40 SourceFiles
41  zoneGeneratorList.C
42 
43 \*---------------------------------------------------------------------------*/
44 
45 #ifndef zoneGeneratorList_H
46 #define zoneGeneratorList_H
47 
48 #include "zoneGenerator.H"
49 #include "PtrListDictionary.H"
50 
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 
53 namespace Foam
54 {
55 
56 /*---------------------------------------------------------------------------*\
57  Class zoneGeneratorList Declaration
58 \*---------------------------------------------------------------------------*/
59 
61 :
62  public PtrListDictionary<zoneGenerator>
63 {
64 protected:
65 
66  // Protected Data
67 
68  //- Reference to the polyMesh
69  const polyMesh& mesh_;
70 
71 
72  // Protected Member Functions
73 
74  void read
75  (
76  const dictionary& dict,
77  const bool topLevel = false
78  );
79 
80 
81 public:
82 
83  // Constructors
84 
85  //- Construct from mesh
87 
88  //- Construct from mesh and dictionary
90  (
91  const polyMesh& mesh,
92  const dictionary& dict,
93  const bool topLevel = false
94  );
95 
96  //- Construct from mesh and dictionary and sub-dictionary names
98  (
99  const polyMesh& mesh,
100  const dictionary& dict,
101  const word& zoneName,
102  const word& zonesName
103  );
104 
105  //- Disallow default bitwise copy construction
106  zoneGeneratorList(const zoneGeneratorList&) = delete;
107 
108 
109  // Member Functions
110 
111  //- Return true if any of the zoneGenerators updates any of the zones
112  // following mesh point motion
113  bool moveUpdate() const;
114 
115  //- Generate and register the zones
116  void generate();
117 
118  //- Update the zones following mesh point movement
119  void movePoints();
120 
121 
122  // Member Operators
123 
124  //- Disallow default bitwise assignment
125  void operator=(const zoneGeneratorList&) = delete;
126 };
127 
128 
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 
131 } // End namespace Foam
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 #endif
136 
137 // ************************************************************************* //
Template dictionary class which manages the storage associated with it.
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
List of zoneGenerators.
void read(const dictionary &dict, const bool topLevel=false)
void generate()
Generate and register the zones.
void movePoints()
Update the zones following mesh point movement.
void operator=(const zoneGeneratorList &)=delete
Disallow default bitwise assignment.
zoneGeneratorList(const polyMesh &mesh)
Construct from mesh.
const polyMesh & mesh_
Reference to the polyMesh.
bool moveUpdate() const
Return true if any of the zoneGenerators updates any of the zones.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
Namespace for OpenFOAM.
dictionary dict