35 namespace energyScalingFunctions
44 energyScalingFunction,
52 scalar 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_);
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
sigmoid(const word &name, const dictionary &energyScalingFunctionProperties, const pairPotential &pairPot)
Construct from components.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
defineTypeNameAndDebug(doubleSigmoid, 0)
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
Macros for easy insertion into run-time selection tables.
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 dimensionedScalar e
Elementary charge.
void scaleEnergy(scalar &e, const scalar r) const
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
dimensionedScalar exp(const dimensionedScalar &ds)
const dictionary & energyScalingFunctionProperties() const
A class for handling words, derived from Foam::string.
addToRunTimeSelectionTable(energyScalingFunction, doubleSigmoid, dictionary)
bool read(const dictionary &energyScalingFunctionProperties)
Read dictionary.
virtual bool read(const dictionary &energyScalingFunctionProperties)=0
Read energyScalingFunction dictionary.