33 namespace energyScalingFunctions
49 scalar doubleSigmoid::sigmoidScale
56 return 1.0 / (1.0 +
exp( scale * (r - shift)));
65 const dictionary& energyScalingFunctionProperties,
72 energyScalingFunctionProperties.
subDict(typeName +
"Coeffs")
74 shift1_(doubleSigmoidCoeffs_.template lookup<scalar>(
"shift1")),
75 scale1_(doubleSigmoidCoeffs_.template lookup<scalar>(
"scale1")),
76 shift2_(doubleSigmoidCoeffs_.template lookup<scalar>(
"shift2")),
77 scale2_(doubleSigmoidCoeffs_.template lookup<scalar>(
"scale2"))
85 e *= sigmoidScale(r, shift1_, scale1_) * sigmoidScale(r, shift2_, scale2_);
93 doubleSigmoidCoeffs_ =
94 energyScalingFunctionProperties.
subDict(typeName +
"Coeffs");
96 doubleSigmoidCoeffs_.
lookup(
"shift1") >> shift1_;
97 doubleSigmoidCoeffs_.
lookup(
"scale1") >> scale1_;
98 doubleSigmoidCoeffs_.
lookup(
"shift2") >> shift2_;
99 doubleSigmoidCoeffs_.
lookup(
"scale2") >> scale2_;
void scaleEnergy(scalar &e, const scalar r) const
A list of keyword definitions, which are a keyword followed by any number of values (e...
defineTypeNameAndDebug(doubleSigmoid, 0)
Macros for easy insertion into run-time selection tables.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
dimensionedScalar exp(const dimensionedScalar &ds)
bool read(const dictionary &energyScalingFunctionProperties)
Read dictionary.
A class for handling words, derived from string.
energyScalingFunction(const word &name, const dictionary &energyScalingFunctionProperties, const pairPotential &pairPot)
Construct from components.
addToRunTimeSelectionTable(energyScalingFunction, doubleSigmoid, dictionary)
virtual bool read(const dictionary &energyScalingFunctionProperties)=0
Read energyScalingFunction dictionary.
doubleSigmoid(const word &name, const dictionary &energyScalingFunctionProperties, const pairPotential &pairPot)
Construct from components.
const doubleScalar e
Elementary charge.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.