print.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) 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::zoneGenerators::print
26 
27 Description
28  A zoneGenerator which prints 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: print | yes |
35  zoneType | Type of zone | no | all
36  zone | Name of the zone to print | no |
37  zones | List of zone names to print | no |
38  geometry | Print the geometry? | no | true
39  \endtable
40  If no zone or zones are specified then all the zones will be printed
41 
42  Example:
43  \verbatim
44  printCellZones
45  {
46  type print;
47  }
48  \endverbatim
49 
50 SourceFiles
51  print.C
52 
53 \*---------------------------------------------------------------------------*/
54 
55 #ifndef print_zoneGenerator_H
56 #define print_zoneGenerator_H
57 
58 #include "zoneGeneratorList.H"
59 
60 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
61 
62 namespace Foam
63 {
64 namespace zoneGenerators
65 {
66 
67 /*---------------------------------------------------------------------------*\
68  Class print Declaration
69 \*---------------------------------------------------------------------------*/
70 
71 class print
72 :
73  public zoneGenerator
74 {
75  // Private Data
76 
77  //- Type of zone to print
78  zoneTypesAll zoneType_;
79 
80  //- List of zone names to print
81  autoPtr<wordList> zoneNames_;
82 
83  //- Print the geometry
84  bool geometry_;
85 
86 
87 public:
88 
89  //- Runtime type information
90  TypeName("print");
91 
92 
93  // Constructors
94 
95  //- Construct from dictionary
96  print
97  (
98  const word& name,
99  const polyMesh& mesh,
101  );
102 
103 
104  //- Destructor
105  virtual ~print();
106 
107 
108  // Member Functions
109 
110  virtual zoneSet generate() const;
111 };
112 
113 
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 
116 } // End namespace zoneGenerators
117 } // End namespace Foam
118 
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 
121 #endif
122 
123 // ************************************************************************* //
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
const word & name() const
Return the zoneGenerator name.
const polyMesh & mesh() const
Return reference to the polyMesh.
virtual zoneSet generate() const
Generate and return the zoneSet.
Definition: print.C:82
virtual ~print()
Destructor.
Definition: print.C:76
print(const word &name, const polyMesh &mesh, const dictionary &dict)
Construct from dictionary.
Definition: print.C:46
TypeName("print")
Runtime type information.
Zone container returned by zoneGenerator::generate.
Definition: zoneSet.H:94
Namespace for OpenFOAM.
zoneTypesAll
Enumeration defining the zone types with an option for all the types.
Definition: zoneSet.H:77
dictionary dict