Go to the documentation of this file.
35 namespace energyScalingFunctions
51 scalar doubleSigmoid::sigmoidScale
58 return 1.0 / (1.0 +
exp( scale * (r - shift)));
67 const dictionary& energyScalingFunctionProperties,
74 energyScalingFunctionProperties.
subDict(typeName +
"Coeffs")
76 shift1_(doubleSigmoidCoeffs_.get<scalar>(
"shift1")),
77 scale1_(doubleSigmoidCoeffs_.get<scalar>(
"scale1")),
78 shift2_(doubleSigmoidCoeffs_.get<scalar>(
"shift2")),
79 scale2_(doubleSigmoidCoeffs_.get<scalar>(
"scale2"))
87 e *= sigmoidScale(r, shift1_, scale1_) * sigmoidScale(r, shift2_, scale2_);
95 doubleSigmoidCoeffs_ =
98 doubleSigmoidCoeffs_.
readEntry(
"shift1", shift1_);
99 doubleSigmoidCoeffs_.
readEntry(
"scale1", scale1_);
100 doubleSigmoidCoeffs_.
readEntry(
"shift2", shift2_);
101 doubleSigmoidCoeffs_.
readEntry(
"scale2", scale2_);
bool read(const dictionary &energyScalingFunctionProperties)
Read dictionary.
A class for handling words, derived from Foam::string.
void scaleEnergy(scalar &e, const scalar r) const
dimensionedScalar exp(const dimensionedScalar &ds)
const dictionary & energyScalingFunctionProperties() const
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Macros for easy insertion into run-time selection tables.
defineTypeNameAndDebug(doubleSigmoid, 0)
doubleSigmoid(const word &name, const dictionary &energyScalingFunctionProperties, const pairPotential &pairPot)
Construct from components.
const dimensionedScalar e
Elementary charge.
addToRunTimeSelectionTable(energyScalingFunction, doubleSigmoid, dictionary)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
virtual bool read(const dictionary &energyScalingFunctionProperties)=0
Read energyScalingFunction dictionary.