clear.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::clear
26 
27 Description
28  A zoneGenerator which clears all existing zones from the mesh
29 
30 Usage
31  \table
32  Property | Description | Required | Default value
33  type | Type: clear | yes |
34  \endtable
35 
36  Example:
37  \verbatim
38  clearAllZones
39  {
40  type clear;
41  }
42  \endverbatim
43  When called from the top-level of the createZonesDict or zonesGenerator
44  files which is the most likely use the simpler syntax to clear all the zones
45  can be used:
46  \verbatim
47  clear;
48  \endverbatim
49 
50 See also
51  zoneGenerators::remove
52 
53 SourceFiles
54  clear.C
55 
56 \*---------------------------------------------------------------------------*/
57 
58 #ifndef clear_zoneGenerator_H
59 #define clear_zoneGenerator_H
60 
61 #include "zoneGeneratorList.H"
62 
63 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
64 
65 namespace Foam
66 {
67 namespace zoneGenerators
68 {
69 
70 /*---------------------------------------------------------------------------*\
71  Class clear Declaration
72 \*---------------------------------------------------------------------------*/
73 
74 class clear
75 :
76  public zoneGenerator
77 {
78 
79 public:
80 
81  //- Runtime type information
82  TypeName("clear");
83 
84 
85  // Constructors
86 
87  //- Construct from dictionary
88  clear
89  (
90  const word& name,
91  const polyMesh& mesh,
92  const dictionary& dict
93  );
94 
95 
96  //- Destructor
97  virtual ~clear();
98 
99 
100  // Member Functions
101 
102  virtual zoneSet generate() const;
103 };
104 
105 
106 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
107 
108 } // End namespace zoneGenerators
109 } // End namespace Foam
110 
111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112 
113 #endif
114 
115 // ************************************************************************* //
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.
Definition: clear.C:63
clear(const word &name, const polyMesh &mesh, const dictionary &dict)
Construct from dictionary.
Definition: clear.C:45
TypeName("clear")
Runtime type information.
virtual ~clear()
Destructor.
Definition: clear.C:57
Zone container returned by zoneGenerator::generate.
Definition: zoneSet.H:94
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
tUEqn clear()
Namespace for OpenFOAM.
dictionary dict