cloudInfo.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) 2012-2021 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::functionObjects::cloudInfo
26 
27 Description
28  Outputs Lagrangian cloud information to a file.
29 
30  The current outputs include:
31  - total current number of parcels
32  - total current mass of parcels
33 
34  Example of function object specification:
35  \verbatim
36  cloudInfo1
37  {
38  type cloudInfo;
39  libs ("liblagrangianFunctionObjects.so");
40  ...
41  clouds
42  (
43  cloud1
44  thermoCloud1
45  );
46  }
47  \endverbatim
48 
49 
50 Usage
51  \table
52  Property | Description | Required | Default value
53  type | type name: cloudInfo | yes |
54  clouds | list of clouds names to process |yes |
55  \endtable
56 
57  The output data of each cloud is written to a file named <cloudName>.dat
58 
59 See also
60  Foam::functionObject
61  Foam::functionObjects::regionFunctionObject
62  Foam::functionObjects::logFiles
63 
64 SourceFiles
65  cloudInfo.C
66 
67 \*---------------------------------------------------------------------------*/
68 
69 #ifndef functionObjects_cloudInfo_H
70 #define functionObjects_cloudInfo_H
71 
72 #include "regionFunctionObject.H"
73 #include "logFiles.H"
74 
75 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
76 
77 namespace Foam
78 {
79 namespace functionObjects
80 {
81 
82 /*---------------------------------------------------------------------------*\
83  Class cloudInfo Declaration
84 \*---------------------------------------------------------------------------*/
85 
86 class cloudInfo
87 :
88  public regionFunctionObject,
89  public logFiles
90 {
91 protected:
92 
93  // Protected Member Functions
94 
95  //- File header information
96  virtual void writeFileHeader(const label i);
97 
98 
99 public:
101  //- Runtime type information
102  TypeName("cloudInfo");
103 
104 
105  // Constructors
106 
107  //- Construct from Time and dictionary
108  cloudInfo
109  (
110  const word& name,
111  const Time& runTime,
112  const dictionary&
113  );
114 
115  //- Disallow default bitwise copy construction
116  cloudInfo(const cloudInfo&) = delete;
117 
118 
119  //- Destructor
120  virtual ~cloudInfo();
121 
122 
123  // Member Functions
124 
125  //- Read the controls
126  virtual bool read(const dictionary&);
127 
128  //- Return the list of fields required
129  virtual wordList fields() const
130  {
131  return wordList::null();
132  }
133 
134  //- Execute, currently does nothing
135  virtual bool execute();
136 
137  //- Write
138  virtual bool write();
139 
140 
141  // Member Operators
142 
143  //- Disallow default bitwise assignment
144  void operator=(const cloudInfo&) = delete;
145 };
146 
147 
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 
150 } // End namespace functionObjects
151 } // End namespace Foam
152 
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 
155 #endif
156 
157 // ************************************************************************* //
virtual bool execute()
Execute, currently does nothing.
Definition: cloudInfo.C:111
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const word & name() const
Return the name of this functionObject.
TypeName("cloudInfo")
Runtime type information.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
void operator=(const cloudInfo &)=delete
Disallow default bitwise assignment.
virtual ~cloudInfo()
Destructor.
Definition: cloudInfo.C:80
Outputs Lagrangian cloud information to a file.
Definition: cloudInfo.H:100
static const List< T > & null()
Return a null List.
Definition: ListI.H:118
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:69
virtual bool read(const dictionary &)
Read the controls.
Definition: cloudInfo.C:86
virtual wordList fields() const
Return the list of fields required.
Definition: cloudInfo.H:143
A class for handling words, derived from string.
Definition: word.H:59
virtual bool write()
Write.
Definition: cloudInfo.C:117
cloudInfo(const word &name, const Time &runTime, const dictionary &)
Construct from Time and dictionary.
Definition: cloudInfo.C:65
virtual void writeFileHeader(const label i)
File header information.
Definition: cloudInfo.C:52
Namespace for OpenFOAM.