remove.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::remove
26 
27 Description
28  A zoneGenerator which removes pointZones and/or cellZone and/or faceZones
29  from the mesh
30 
31 Usage
32  \table
33  Property | Description | Required | Default value
34  type | Type: clear | yes |
35  pointZone | pointZone name | no |
36  pointZones | List of pointZone names | no |
37  cellZone | cellZone name | no |
38  cellZones | List of cellZone names | no |
39  faceZone | faceZone name | no |
40  faceZones | List of faceZone names | no |
41  \endtable
42  Either a single name or list of names of each zone type can be specified
43  and all the named zones are removed from the zone lists held by the mesh.
44 
45  Example:
46  \verbatim
47  removeCellZones
48  {
49  type remove;
50  cellZones (cone1 coneAnnulus);
51  }
52  \endverbatim
53  When called from the top-level of the createZonesDict or zonesGenerator
54  files which is the most likely use the simpler syntax to remove zones
55  can be used:
56  \verbatim
57  remove
58  {
59  cellZones (cone1 coneAnnulus);
60  }
61  \endverbatim
62 
63 
64 See also
65  zoneGenerators::clear
66 
67 SourceFiles
68  remove.C
69 
70 \*---------------------------------------------------------------------------*/
71 
72 #ifndef remove_zoneGenerator_H
73 #define remove_zoneGenerator_H
74 
75 #include "zoneGeneratorList.H"
76 
77 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
78 
79 namespace Foam
80 {
81 namespace zoneGenerators
82 {
83 
84 /*---------------------------------------------------------------------------*\
85  Class remove Declaration
86 \*---------------------------------------------------------------------------*/
87 
88 class remove
89 :
90  public zoneGenerator
91 {
92  // Private Data
93 
94  //- List of pointZone names to remove
95  wordList pointZoneNames_;
96 
97  //- List of cellZone names to remove
98  wordList cellZoneNames_;
99 
100  //- List of faceZone names to remove
101  wordList faceZoneNames_;
102 
103 
104 public:
105 
106  //- Runtime type information
107  TypeName("remove");
108 
109 
110  // Constructors
111 
112  //- Construct from dictionary
113  remove
114  (
115  const word& name,
116  const polyMesh& mesh,
117  const dictionary& dict
118  );
119 
120 
121  //- Destructor
122  virtual ~remove();
123 
124 
125  // Member Functions
126 
127  virtual zoneSet generate() const;
128 };
129 
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 } // End namespace zoneGenerators
134 } // End namespace Foam
135 
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 
138 #endif
139 
140 // ************************************************************************* //
const word & name() const
virtual ~remove()
Destructor.
Definition: remove.C:75
TypeName("remove")
Runtime type information.
virtual zoneSet generate() const
Generate and return the zoneSet.
Definition: remove.C:81
remove(const word &name, const polyMesh &mesh, const dictionary &dict)
Construct from dictionary.
Definition: remove.C:45
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.
List< word > wordList
A List of words.
Definition: fileName.H:54
dictionary dict