33 namespace energyScalingFunctions
42 energyScalingFunction,
50 scalar sigmoid::sigmoidScale
57 return 1.0 / (1.0 +
exp( scale * (r - shift)));
66 const dictionary& energyScalingFunctionProperties,
73 energyScalingFunctionProperties.
subDict(typeName +
"Coeffs")
75 shift_(sigmoidCoeffs_.template lookup<scalar>(
"shift")),
76 scale_(sigmoidCoeffs_.template lookup<scalar>(
"scale"))
84 e *= sigmoidScale(r, shift_, scale_);
93 energyScalingFunctionProperties.
subDict(typeName +
"Coeffs");
95 sigmoidCoeffs_.
lookup(
"shift") >> shift_;
96 sigmoidCoeffs_.
lookup(
"scale") >> shift_;
sigmoid(const word &name, const dictionary &energyScalingFunctionProperties, const pairPotential &pairPot)
Construct from components.
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.
void scaleEnergy(scalar &e, const scalar r) const
dimensionedScalar exp(const dimensionedScalar &ds)
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)
bool read(const dictionary &energyScalingFunctionProperties)
Read dictionary.
virtual bool read(const dictionary &energyScalingFunctionProperties)=0
Read energyScalingFunction dictionary.
const doubleScalar e
Elementary charge.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.