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.
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, IOobjectOption::readOption readOpt=IOobjectOption::MUST_READ) const
Find entry and assign to T val. FatalIOError if it is found and the number of tokens is incorrect,...
const dictionary & energyScalingFunctionProperties() const
virtual bool read(const dictionary &energyScalingFunctionProperties)=0
Read energyScalingFunction dictionary.
energyScalingFunction(const energyScalingFunction &)=delete
No copy construct.
bool read(const dictionary &energyScalingFunctionProperties)
Read dictionary.
sigmoid(const word &name, const dictionary &energyScalingFunctionProperties, const pairPotential &pairPot)
Construct from components.
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)
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.