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