relaxationModel.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-2015 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::relaxationModel
26 
27 Description
28  Abstract base class for providing relaxation values to the cell motion
29  controller
30 
31 SourceFiles
32  relaxationModel.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef relaxationModel_H
37 #define relaxationModel_H
38 
39 #include "point.H"
40 #include "Time.H"
41 #include "dictionary.H"
42 #include "autoPtr.H"
43 #include "runTimeSelectionTables.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class relaxationModel Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 class relaxationModel
55 :
56  public dictionary
57 {
58 
59 protected:
60 
61  // Protected data
62 
63  //- Reference to the conformalVoronoiMesh holding this cvControls object
64  const Time& runTime_;
65 
66  //- Method coeffs dictionary
68 
69 private:
70 
71  // Private Member Functions
72 
73  //- Disallow default bitwise copy construct
75 
76  //- Disallow default bitwise assignment
77  void operator=(const relaxationModel&);
78 
79 
80 public:
81 
82  //- Runtime type information
83  TypeName("relaxationModel");
84 
85 
86  // Declare run-time constructor selection table
87 
89  (
90  autoPtr,
92  dictionary,
93  (
94  const dictionary& relaxationDict,
95  const Time& runTime
96  ),
97  (relaxationDict, runTime)
98  );
99 
100 
101  // Constructors
102 
103  //- Construct from components
105  (
106  const word& type,
107  const dictionary& relaxationDict,
108  const Time& runTime
109  );
110 
111 
112  // Selectors
113 
114  //- Return a reference to the selected relaxationModel
116  (
117  const dictionary& relaxationDict,
118  const Time& runTime
119  );
120 
121 
122  //- Destructor
123  virtual ~relaxationModel();
124 
125 
126  // Member Functions
127 
128  //- Const access to the coeffs dictionary
129  const dictionary& coeffDict() const
130  {
131  return coeffDict_;
132  }
133 
134  //- Return the current relaxation coefficient
135  virtual scalar relaxation() = 0;
136 };
137 
138 
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 
141 } // End namespace Foam
142 
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 
145 #endif
146 
147 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
static autoPtr< relaxationModel > New(const dictionary &relaxationDict, const Time &runTime)
Return a reference to the selected relaxationModel.
declareRunTimeSelectionTable(autoPtr, relaxationModel, dictionary,(const dictionary &relaxationDict, const Time &runTime),(relaxationDict, runTime))
virtual scalar relaxation()=0
Return the current relaxation coefficient.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:68
const Time & runTime_
Reference to the conformalVoronoiMesh holding this cvControls object.
TypeName("relaxationModel")
Runtime type information.
const dictionary & coeffDict() const
Const access to the coeffs dictionary.
A class for handling words, derived from string.
Definition: word.H:59
dictionary coeffDict_
Method coeffs dictionary.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
Definition: POSIX.C:461
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:53
Macros to ease declaration of run-time selection tables.
Abstract base class for providing relaxation values to the cell motion controller.
virtual ~relaxationModel()
Destructor.
Namespace for OpenFOAM.