energyScalingFunction.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) 2011 OpenFOAM Foundation
9 Copyright (C) 2019 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::energyScalingFunction
29
30Description
31
32SourceFiles
33 energyScalingFunction.C
34 energyScalingFunctionNew.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef energyScalingFunction_H
39#define energyScalingFunction_H
40
41#include "IOdictionary.H"
42#include "typeInfo.H"
44#include "autoPtr.H"
45#include "pairPotential.H"
46
47// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49namespace Foam
50{
51
52/*---------------------------------------------------------------------------*\
53 Class energyScalingFunction Declaration
54\*---------------------------------------------------------------------------*/
57{
58
59protected:
60
61 // Protected data
63 word name_;
68
69
70 // Private Member Functions
71
72 //- No copy construct
74
75 //- No copy assignment
76 void operator=(const energyScalingFunction&) = delete;
77
78
79public:
80
81 //- Runtime type information
82 TypeName("energyScalingFunction");
83
84
85 // Declare run-time constructor selection table
88 (
89 autoPtr,
92 (
93 const word& name,
95 const pairPotential& pairPot
96 ),
98 );
99
100
101 // Selectors
102
103 //- Return a reference to the selected viscosity model
105 (
106 const word& name,
108 const pairPotential& pairPot
109 );
110
111
112 // Constructors
113
114 //- Construct from components
116 (
117 const word& name,
119 const pairPotential& pairPot
120 );
121
122
123 //- Destructor
124 virtual ~energyScalingFunction() = default;
125
126
127 // Member Functions
129 virtual void scaleEnergy(scalar& e, const scalar r) const = 0;
132 {
134 }
135
136 //- Read energyScalingFunction dictionary
137 virtual bool read
138 (
140 ) = 0;
141};
142
143
144// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145
146} // End namespace Foam
147
148// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149
150#endif
151
152// ************************************************************************* //
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
TypeName("energyScalingFunction")
Runtime type information.
const pairPotential & pairPot_
const dictionary & energyScalingFunctionProperties() const
virtual bool read(const dictionary &energyScalingFunctionProperties)=0
Read energyScalingFunction dictionary.
virtual ~energyScalingFunction()=default
Destructor.
static autoPtr< energyScalingFunction > New(const word &name, const dictionary &energyScalingFunctionProperties, const pairPotential &pairPot)
Return a reference to the selected viscosity model.
declareRunTimeSelectionTable(autoPtr, energyScalingFunction, dictionary,(const word &name, const dictionary &energyScalingFunctionProperties, const pairPotential &pairPot),(name, energyScalingFunctionProperties, pairPot))
energyScalingFunction(const energyScalingFunction &)=delete
No copy construct.
virtual void scaleEnergy(scalar &e, const scalar r) const =0
void operator=(const energyScalingFunction &)=delete
No copy assignment.
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59
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)
volScalarField & e
Definition: createFields.H:11
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73