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_ =
96 doubleSigmoidCoeffs_.
lookup(
"shift1") >> shift1_;
97 doubleSigmoidCoeffs_.
lookup(
"scale1") >> scale1_;
98 doubleSigmoidCoeffs_.
lookup(
"shift2") >> shift2_;
99 doubleSigmoidCoeffs_.
lookup(
"scale2") >> scale2_;
Macros for easy insertion into run-time selection tables.
A list of keyword definitions, which are a keyword followed by any number of values (e....
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
const dictionary & energyScalingFunctionProperties() const
virtual bool read(const dictionary &energyScalingFunctionProperties)=0
Read energyScalingFunction dictionary.
bool read(const dictionary &energyScalingFunctionProperties)
Read dictionary.
void scaleEnergy(scalar &e, const scalar r) const
doubleSigmoid(const word &name, const dictionary &energyScalingFunctionProperties, const pairPotential &pairPot)
Construct from components.
A class for handling words, derived from string.
addToRunTimeSelectionTable(energyScalingFunction, doubleSigmoid, dictionary)
defineTypeNameAndDebug(doubleSigmoid, 0)
dimensionedScalar exp(const dimensionedScalar &ds)
word name(const bool)
Return a word representation of a bool.