Go to the documentation of this file.
35 namespace tetherPotentials
61 tetherPotentialProperties.subDict(typeName +
"Coeffs")
63 springConstant_(harmonicSpringCoeffs_.
get<scalar>(
"springConstant"))
71 return 0.5*springConstant_*
magSqr(r);
77 return -springConstant_*r;
85 harmonicSpringCoeffs_ =
88 harmonicSpringCoeffs_.
readEntry(
"springConstant", springConstant_);
A class for handling words, derived from Foam::string.
harmonicSpring(const word &name, const dictionary &tetherPotentialProperties)
bool read(const dictionary &tetherPotentialProperties)
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
virtual bool read(const dictionary &tetherPotentialProperties)=0
vector force(const vector r) const
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
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(harmonicSpring, 0)
const dictionary & tetherPotentialProperties() const
scalar energy(const vector r) const
addToRunTimeSelectionTable(tetherPotential, harmonicSpring, dictionary)
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
word name(const expressions::valueTypeCode typeCode)