35namespace energyScalingFunctions
52scalar sigmoid::sigmoidScale
59 return 1.0 / (1.0 +
exp( scale * (r - shift)));
68 const dictionary& energyScalingFunctionProperties,
75 energyScalingFunctionProperties.subDict(typeName +
"Coeffs")
77 shift_(sigmoidCoeffs_.get<scalar>(
"shift")),
78 scale_(sigmoidCoeffs_.get<scalar>(
"scale"))
86 e *= sigmoidScale(r, shift_, scale_);
97 sigmoidCoeffs_.
readEntry(
"shift", shift_);
98 sigmoidCoeffs_.
readEntry(
"scale", shift_);
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.