energyScalingFunction.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2019 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::energyScalingFunction
26 
27 Description
28 
29 SourceFiles
30  energyScalingFunction.C
31  energyScalingFunctionNew.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef energyScalingFunction_H
36 #define energyScalingFunction_H
37 
38 #include "IOdictionary.H"
39 #include "typeInfo.H"
40 #include "runTimeSelectionTables.H"
41 #include "autoPtr.H"
42 #include "pairPotential.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class energyScalingFunction Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 {
55 
56 protected:
57 
58  // Protected data
59 
60  word name_;
61 
63 
64  const pairPotential& pairPot_;
65 
66 
67 public:
68 
69  //- Runtime type information
70  TypeName("energyScalingFunction");
71 
72 
73  // Declare run-time constructor selection table
74 
76  (
77  autoPtr,
79  dictionary,
80  (
81  const word& name,
83  const pairPotential& pairPot
84  ),
85  (name, energyScalingFunctionProperties, pairPot)
86  );
87 
88 
89  // Selectors
90 
91  //- Return a reference to the selected viscosity model
93  (
94  const word& name,
95  const dictionary& energyScalingFunctionProperties,
96  const pairPotential& pairPot
97  );
98 
99 
100  // Constructors
101 
102  //- Construct from components
104  (
105  const word& name,
106  const dictionary& energyScalingFunctionProperties,
107  const pairPotential& pairPot
108  );
109 
110  //- Disallow default bitwise copy construction
112 
113 
114  //- Destructor
115  virtual ~energyScalingFunction()
116  {}
117 
118 
119  // Member Functions
120 
121  virtual void scaleEnergy(scalar& e, const scalar r) const = 0;
124  {
126  }
127 
128  //- Read energyScalingFunction dictionary
129  virtual bool read
130  (
131  const dictionary& energyScalingFunctionProperties
132  ) = 0;
133 
134 
135  // Member Operators
136 
137  //- Disallow default bitwise assignment
138  void operator=(const energyScalingFunction&) = delete;
139 };
140 
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 } // End namespace Foam
145 
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 
148 #endif
149 
150 // ************************************************************************* //
declareRunTimeSelectionTable(autoPtr, energyScalingFunction, dictionary,(const word &name, const dictionary &energyScalingFunctionProperties, const pairPotential &pairPot),(name, energyScalingFunctionProperties, pairPot))
const pairPotential & pairPot_
static autoPtr< energyScalingFunction > New(const word &name, const dictionary &energyScalingFunctionProperties, const pairPotential &pairPot)
Return a reference to the selected viscosity model.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
virtual void scaleEnergy(scalar &e, const scalar r) const =0
const dictionary & energyScalingFunctionProperties() const
A class for handling words, derived from string.
Definition: word.H:59
energyScalingFunction(const word &name, const dictionary &energyScalingFunctionProperties, const pairPotential &pairPot)
Construct from components.
TypeName("energyScalingFunction")
Runtime type information.
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
virtual ~energyScalingFunction()
Destructor.
void operator=(const energyScalingFunction &)=delete
Disallow default bitwise assignment.
virtual bool read(const dictionary &energyScalingFunctionProperties)=0
Read energyScalingFunction dictionary.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
const doubleScalar e
Elementary charge.
Definition: doubleScalar.H:98
Macros to ease declaration of run-time selection tables.
Namespace for OpenFOAM.