Go to the documentation of this file.
33 namespace energyScalingFunctions
42 energyScalingFunction,
57 return 1.0 / (1.0 +
exp( scale * (r - shift)));
66 const dictionary& energyScalingFunctionProperties,
73 energyScalingFunctionProperties.
subDict(typeName +
"Coeffs")
75 shift_(
readScalar(sigmoidCoeffs_.lookup(
"shift"))),
76 scale_(
readScalar(sigmoidCoeffs_.lookup(
"scale")))
scalar sigmoidScale(const scalar r, const scalar shift, const scalar scale) const
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)
sigmoid(const word &name, const dictionary &energyScalingFunctionProperties, const pairPotential &pairPot)
Construct from components.
const dictionary & energyScalingFunctionProperties() const
bool read(const dictionary &energyScalingFunctionProperties)
Read dictionary.
A list of keyword definitions, which are a keyword followed by any number of values (e....
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)
dictionary sigmoidCoeffs_
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.