63 springConstant_(harmonicSpringCoeffs_.get<scalar>(
"springConstant"))
71 return 0.5*springConstant_*
magSqr(r);
77 return -springConstant_*r;
85 harmonicSpringCoeffs_ =
88 harmonicSpringCoeffs_.
readEntry(
"springConstant", springConstant_);
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 & tetherPotentialProperties() const
virtual bool read(const dictionary &tetherPotentialProperties)=0
Read tetherPotential dictionary.
tetherPotential(const tetherPotential &)=delete
No copy construct.
scalar energy(const vector r) const
bool read(const dictionary &tetherPotentialProperties)
Read dictionary.
harmonicSpring(const word &name, const dictionary &tetherPotentialProperties)
Construct from components.
vector force(const vector r) const
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
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.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)