33 namespace tetherPotentials
59 tetherPotentialProperties.
subDict(typeName +
"Coeffs")
61 springConstant_(
readScalar(harmonicSpringCoeffs_.lookup(
"springConstant")))
69 return 0.5*springConstant_*
magSqr(r);
75 return -springConstant_*r;
83 harmonicSpringCoeffs_ =
84 tetherPotentialProperties.
subDict(typeName +
"Coeffs");
86 harmonicSpringCoeffs_.
lookup(
"springConstant") >> springConstant_;
A list of keyword definitions, which are a keyword followed by any number of values (e...
vector force(const vector r) const
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
Macros for easy insertion into run-time selection tables.
bool read(const dictionary &tetherPotentialProperties)
Read dictionary.
virtual bool read(const dictionary &tetherPotentialProperties)=0
Read tetherPotential dictionary.
A class for handling words, derived from string.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
defineTypeNameAndDebug(harmonicSpring, 0)
dimensioned< scalar > magSqr(const dimensioned< Type > &)
addToRunTimeSelectionTable(tetherPotential, harmonicSpring, dictionary)
harmonicSpring(const word &name, const dictionary &tetherPotentialProperties)
Construct from components.
scalar energy(const vector r) const
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.