Go to the documentation of this file.
33 namespace energyScalingFunctions
56 return 1.0 / (1.0 +
exp( scale * (r - shift)));
65 const dictionary& energyScalingFunctionProperties,
72 energyScalingFunctionProperties.
subDict(typeName +
"Coeffs")
74 shift1_(
readScalar(doubleSigmoidCoeffs_.lookup(
"shift1"))),
75 scale1_(
readScalar(doubleSigmoidCoeffs_.lookup(
"scale1"))),
76 shift2_(
readScalar(doubleSigmoidCoeffs_.lookup(
"shift2"))),
77 scale2_(
readScalar(doubleSigmoidCoeffs_.lookup(
"scale2")))
bool read(const dictionary &energyScalingFunctionProperties)
Read dictionary.
A class for handling words, derived from string.
void scaleEnergy(scalar &e, const scalar r) const
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
dimensionedScalar exp(const dimensionedScalar &ds)
const dictionary & energyScalingFunctionProperties() const
dictionary doubleSigmoidCoeffs_
A list of keyword definitions, which are a keyword followed by any number of values (e....
scalar sigmoidScale(const scalar r, const scalar shift, const scalar scale) const
Macros for easy insertion into run-time selection tables.
const double e
Elementary charge.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
defineTypeNameAndDebug(doubleSigmoid, 0)
doubleSigmoid(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.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
word name(const complex &)
Return a string representation of a complex.