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  This function object outputs Lagrangian cloud information to a file. The
32  current outputs include:
33  - total current number of parcels
34  - total current mass of parcels
35 
36  Example of function object specification:
37  \verbatim
38  cloudInfo1
39  {
40  type cloudInfo;
41  libs ("libcloudFunctionObjects.so");
42  ...
43  clouds
44  (
45  kinematicCloud1
46  thermoCloud1
47  );
48  }
49  \endverbatim
50 
51 
52 Usage
53  \table
54  Property | Description | Required | Default value
55  type | type name: cloudInfo | yes |
56  clouds | list of clouds names to process |yes |
57  \endtable
58 
59  The output data of each cloud is written to a file named <cloudName>.dat
60 
61 See also
62  Foam::functionObject
63  Foam::functionObjects::writeFiles
64 
65 SourceFiles
66  cloudInfo.C
67 
68 \*---------------------------------------------------------------------------*/
69 
70 #ifndef functionObjects_cloudInfo_H
71 #define functionObjects_cloudInfo_H
72 
73 #include "writeFiles.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 writeFiles
89 {
90 protected:
91 
92  // Protected Member Functions
93 
94  //- File header information
95  virtual void writeFileHeader(const label i);
96 
97 
98 private:
99 
100  // Private member functions
101 
102  //- Disallow default bitwise copy construct
103  cloudInfo(const cloudInfo&);
104 
105  //- Disallow default bitwise assignment
106  void operator=(const cloudInfo&);
107 
108 
109 public:
110 
111  //- Runtime type information
112  TypeName("cloudInfo");
113 
114 
115  // Constructors
116 
117  //- Construct from Time and dictionary
118  cloudInfo
119  (
120  const word& name,
121  const Time& runTime,
122  const dictionary&
123  );
124 
125 
126  //- Destructor
127  virtual ~cloudInfo();
128 
129 
130  // Member Functions
131 
132  //- Read the controls
133  virtual bool read(const dictionary&);
134 
135  //- Execute, currently does nothing
136  virtual bool execute();
137 
138  //- Write
139  virtual bool write();
140 };
141 
142 
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 
145 } // End namespace functionObjects
146 } // End namespace Foam
147 
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 
150 #endif
151 
152 // ************************************************************************* //
virtual bool execute()
Execute, currently does nothing.
Definition: cloudInfo.C:106
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
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:77
This function object outputs Lagrangian cloud information to a file. The current outputs include: ...
Definition: cloudInfo.H:100
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:83
const word & name() const
Return the name of this functionObject.
A class for handling words, derived from string.
Definition: word.H:59
virtual bool write()
Write.
Definition: cloudInfo.C:112
virtual void writeFileHeader(const label i)
File header information.
Definition: cloudInfo.C:50
Namespace for OpenFOAM.