SizeDistribution.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) 2023 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::SizeDistribution
26 
27 Description
28  Creates graphs of a cloud's size distribution
29 
30  Example usage:
31  \verbatim
32  massFlux1
33  {
34  type sizeDistribution;
35  nPoints 40;
36  setFormat raw;
37  }
38  \endverbatim
39 
40 SourceFiles
41  SizeDistribution.C
42 
43 \*---------------------------------------------------------------------------*/
44 
45 #ifndef SizeDistribution_H
46 #define SizeDistribution_H
47 
48 #include "CloudFunctionObject.H"
49 #include "setWriter.H"
50 
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 
53 namespace Foam
54 {
55 
56 /*---------------------------------------------------------------------------*\
57  Class SizeDistribution Declaration
58 \*---------------------------------------------------------------------------*/
59 
60 template<class CloudType>
61 class SizeDistribution
62 :
63  public CloudFunctionObject<CloudType>
64 {
65  // Private Data
66 
67  //- Number of points to plot
68  const label nPoints_;
69 
70  //- Set formatter
71  autoPtr<setWriter> formatter_;
72 
73 
74 protected:
75 
76  // Protected Member Functions
77 
78  //- Write post-processing info
79  virtual void write();
80 
81 
82 public:
83 
84  //- Runtime type information
85  TypeName("sizeDistribution");
86 
87 
88  // Constructors
89 
90  //- Construct from dictionary
92  (
93  const dictionary& dict,
95  const word& modelName
96  );
97 
98  //- Construct copy
100 
101  //- Construct and return a clone
103  {
105  (
106  new SizeDistribution<CloudType>(*this)
107  );
108  }
109 
110 
111  //- Destructor
112  virtual ~SizeDistribution();
113 };
114 
115 
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 
118 } // End namespace Foam
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 #ifdef NoRepository
123  #include "SizeDistribution.C"
124 #endif
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 #endif
129 
130 // ************************************************************************* //
Templated cloud function object base class.
const CloudType & owner() const
Return const access to the owner cloud.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:79
Creates graphs of a cloud's size distribution.
TypeName("sizeDistribution")
Runtime type information.
virtual ~SizeDistribution()
Destructor.
virtual void write()
Write post-processing info.
virtual autoPtr< CloudFunctionObject< CloudType > > clone() const
Construct and return a clone.
SizeDistribution(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:110
const word & modelName() const
Return const access to the name of the sub-model.
Definition: subModelBase.C:104
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
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