35namespace energyScalingFunctions
51scalar 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_);
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
virtual bool read()
Re-read model coefficients if they have changed.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
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
const dictionary & energyScalingFunctionProperties() const
void scaleEnergy(scalar &e, const scalar r) const
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
dimensionedScalar exp(const dimensionedScalar &ds)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.