IsotropyModel.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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2013-2016 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::IsotropyModel
28 
29 Group
30  grpLagrangianIntermediateMPPICIsotropySubModels
31 
32 Description
33  Base class for collisional return-to-isotropy models.
34 
35 SourceFiles
36  IsotropyModel.C
37  IsotropyModelNew.C
38 
39 \*---------------------------------------------------------------------------*/
40 
41 #ifndef IsotropyModel_H
42 #define IsotropyModel_H
43 
44 #include "IOdictionary.H"
45 #include "autoPtr.H"
46 #include "runTimeSelectionTables.H"
47 #include "CloudSubModelBase.H"
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 
54 // Forward declaration of classes
55 
56 class TimeScaleModel;
57 
58 /*---------------------------------------------------------------------------*\
59  Class IsotropyModel Declaration
60 \*---------------------------------------------------------------------------*/
61 
62 template<class CloudType>
63 class IsotropyModel
64 :
65  public CloudSubModelBase<CloudType>
66 {
67 protected:
68 
69  //- Time scale model
71 
72 
73 public:
74 
75  //- Runtime type information
76  TypeName("isotropyModel");
77 
78  //- Declare runtime constructor selection table
80  (
81  autoPtr,
83  dictionary,
84  (
85  const dictionary& dict,
86  CloudType& owner
87  ),
88  (dict, owner)
89  );
90 
91 
92  // Constructors
93 
94  //- Construct null from owner
95  IsotropyModel(CloudType& owner);
96 
97  //- Construct from components
99  (
100  const dictionary& dict,
101  CloudType& owner,
102  const word& type
103  );
104 
105  //- Construct a copy
107 
108  //- Construct and return a clone
109  virtual autoPtr<IsotropyModel<CloudType>> clone() const = 0;
110 
111 
112  //- Destructor
113  virtual ~IsotropyModel();
114 
115 
116  //- Selector
118  (
119  const dictionary& dict,
120  CloudType& owner
121  );
122 
123 
124  //- Member Functions
125 
126  //- Calculate velocities
127  virtual void calculate() = 0;
128 };
129 
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 } // End namespace Foam
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 #define makeIsotropyModel(CloudType) \
138  \
139  typedef Foam::CloudType::MPPICCloudType MPPICCloudType; \
140  defineNamedTemplateTypeNameAndDebug \
141  ( \
142  Foam::IsotropyModel<MPPICCloudType>, \
143  0 \
144  ); \
145  \
146  namespace Foam \
147  { \
148  defineTemplateRunTimeSelectionTable \
149  ( \
150  IsotropyModel<MPPICCloudType>, \
151  dictionary \
152  ); \
153  }
154 
155 
156 #define makeIsotropyModelType(SS, CloudType) \
157  \
158  typedef Foam::CloudType::MPPICCloudType MPPICCloudType; \
159  defineNamedTemplateTypeNameAndDebug \
160  (Foam::IsotropyModels::SS<MPPICCloudType>, 0); \
161  \
162  Foam::IsotropyModel<MPPICCloudType>:: \
163  adddictionaryConstructorToTable \
164  <Foam::IsotropyModels::SS<MPPICCloudType>> \
165  add##SS##CloudType##MPPICCloudType##ConstructorToTable_;
166 
167 
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 
170 #ifdef NoRepository
171  #include "IsotropyModel.C"
172 #endif
173 
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 
176 #endif
177 
178 // ************************************************************************* //
Foam::IsotropyModel::IsotropyModel
IsotropyModel(CloudType &owner)
Construct null from owner.
Definition: IsotropyModel.C:35
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::IsotropyModel::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, IsotropyModel, dictionary,(const dictionary &dict, CloudType &owner),(dict, owner))
Declare runtime constructor selection table.
CloudSubModelBase.H
Foam::IsotropyModel::timeScaleModel_
autoPtr< TimeScaleModel > timeScaleModel_
Time scale model.
Definition: IsotropyModel.H:69
Foam::IsotropyModel::clone
virtual autoPtr< IsotropyModel< CloudType > > clone() const =0
Construct and return a clone.
Foam::DSMCCloud
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:71
dict
dictionary dict
Definition: searchingEngine.H:14
IsotropyModel.C
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
IOdictionary.H
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::IsotropyModel::~IsotropyModel
virtual ~IsotropyModel()
Destructor.
Definition: IsotropyModel.C:75
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::type
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:590
Foam::IsotropyModel
Base class for collisional return-to-isotropy models.
Definition: MPPICCloud.H:64
Foam::IsotropyModel::calculate
virtual void calculate()=0
Member Functions.
Foam::IsotropyModel::New
static autoPtr< IsotropyModel< CloudType > > New(const dictionary &dict, CloudType &owner)
Selector.
Definition: IsotropyModel.C:84
Foam::IsotropyModel::TypeName
TypeName("isotropyModel")
Runtime type information.
autoPtr.H