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 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::energyScalingFunction
29 
30 Description
31 
32 SourceFiles
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"
43 #include "runTimeSelectionTables.H"
44 #include "autoPtr.H"
45 #include "pairPotential.H"
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class energyScalingFunction Declaration
54 \*---------------------------------------------------------------------------*/
55 
57 {
58 
59 protected:
60 
61  // Protected data
62 
63  word name_;
64 
66 
67  const pairPotential& pairPot_;
68 
69 
70  // Private Member Functions
71 
72  //- No copy construct
74 
75  //- No copy assignment
76  void operator=(const energyScalingFunction&) = delete;
77 
78 
79 public:
80 
81  //- Runtime type information
82  TypeName("energyScalingFunction");
83 
84 
85  // Declare run-time constructor selection table
86 
88  (
89  autoPtr,
91  dictionary,
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
128 
129  virtual void scaleEnergy(scalar& e, const scalar r) const = 0;
130 
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 // ************************************************************************* //
Foam::energyScalingFunction::operator=
void operator=(const energyScalingFunction &)=delete
No copy assignment.
Foam::energyScalingFunction::name_
word name_
Definition: energyScalingFunction.H:62
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
typeInfo.H
Foam::energyScalingFunction::energyScalingFunction
energyScalingFunction(const energyScalingFunction &)=delete
No copy construct.
Foam::energyScalingFunction::New
static autoPtr< energyScalingFunction > New(const word &name, const dictionary &energyScalingFunctionProperties, const pairPotential &pairPot)
Return a reference to the selected viscosity model.
Definition: energyScalingFunctionNew.C:35
Foam::energyScalingFunction::pairPot_
const pairPotential & pairPot_
Definition: energyScalingFunction.H:66
Foam::energyScalingFunction::energyScalingFunctionProperties
const dictionary & energyScalingFunctionProperties() const
Definition: energyScalingFunction.H:130
Foam::energyScalingFunction::~energyScalingFunction
virtual ~energyScalingFunction()=default
Destructor.
Foam::energyScalingFunction::TypeName
TypeName("energyScalingFunction")
Runtime type information.
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::pairPotential
Definition: pairPotential.H:60
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::energyScalingFunction::energyScalingFunctionProperties_
dictionary energyScalingFunctionProperties_
Definition: energyScalingFunction.H:64
IOdictionary.H
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::energyScalingFunction::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, energyScalingFunction, dictionary,(const word &name, const dictionary &energyScalingFunctionProperties, const pairPotential &pairPot),(name, energyScalingFunctionProperties, pairPot))
Foam::constant::electromagnetic::e
const dimensionedScalar e
Elementary charge.
Definition: createFields.H:11
Foam::name
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59
Foam::energyScalingFunction
Definition: energyScalingFunction.H:55
Foam::energyScalingFunction::read
virtual bool read(const dictionary &energyScalingFunctionProperties)=0
Read energyScalingFunction dictionary.
Definition: energyScalingFunction.C:58
pairPotential.H
Foam::energyScalingFunction::scaleEnergy
virtual void scaleEnergy(scalar &e, const scalar r) const =0
autoPtr.H