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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2012-2015 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::relaxationModel
28
29Description
30 Abstract base class for providing relaxation values to the cell motion
31 controller
32
33SourceFiles
34 relaxationModel.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef relaxationModel_H
39#define relaxationModel_H
40
41#include "point.H"
42#include "Time.H"
43#include "dictionary.H"
44#include "autoPtr.H"
46
47// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49namespace Foam
50{
51
52/*---------------------------------------------------------------------------*\
53 Class relaxationModel Declaration
54\*---------------------------------------------------------------------------*/
57:
58 public dictionary
59{
60
61protected:
62
63 // Protected data
64
65 //- Reference to the conformalVoronoiMesh holding this cvControls object
66 const Time& runTime_;
67
68 //- Method coeffs dictionary
70
71
72 // Protected Member Functions
73
74 //- No copy construct
75 relaxationModel(const relaxationModel&) = delete;
76
77 //- No copy assignment
78 void operator=(const relaxationModel&) = delete;
79
80
81public:
82
83 //- Runtime type information
84 TypeName("relaxationModel");
85
86
87 // Declare run-time constructor selection table
90 (
91 autoPtr,
94 (
95 const dictionary& relaxationDict,
96 const Time& runTime
97 ),
98 (relaxationDict, runTime)
99 );
100
101
102 // Constructors
103
104 //- Construct from components
106 (
107 const word& type,
108 const dictionary& relaxationDict,
109 const Time& runTime
110 );
111
112
113 // Selectors
114
115 //- Return a reference to the selected relaxationModel
117 (
118 const dictionary& relaxationDict,
119 const Time& runTime
120 );
121
122
123 //- Destructor
124 virtual ~relaxationModel() = default;
125
126
127 // Member Functions
128
129 //- Const access to the coeffs dictionary
130 const dictionary& coeffDict() const
131 {
132 return coeffDict_;
133 }
134
135 //- Return the current relaxation coefficient
136 virtual scalar relaxation() = 0;
137};
138
139
140// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141
142} // End namespace Foam
143
144// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145
146#endif
147
148// ************************************************************************* //
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:80
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Abstract base class for providing relaxation values to the cell motion controller.
void operator=(const relaxationModel &)=delete
No copy assignment.
dictionary coeffDict_
Method coeffs dictionary.
static autoPtr< relaxationModel > New(const dictionary &relaxationDict, const Time &runTime)
Return a reference to the selected relaxationModel.
relaxationModel(const relaxationModel &)=delete
No copy construct.
const Time & runTime_
Reference to the conformalVoronoiMesh holding this cvControls object.
virtual scalar relaxation()=0
Return the current relaxation coefficient.
declareRunTimeSelectionTable(autoPtr, relaxationModel, dictionary,(const dictionary &relaxationDict, const Time &runTime),(relaxationDict, runTime))
TypeName("relaxationModel")
Runtime type information.
virtual ~relaxationModel()=default
Destructor.
relaxationModel(const word &type, const dictionary &relaxationDict, const Time &runTime)
Construct from components.
const dictionary & coeffDict() const
Const access to the coeffs dictionary.
A class for handling words, derived from Foam::string.
Definition: word.H:68
engineTime & runTime
Namespace for OpenFOAM.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:598
Macros to ease declaration of run-time selection tables.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73