LOOS 4.1.0
The Lightweight Object Oriented Structural analysis library/toolkit
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | List of all members
ENM::SpringFunction Class Referenceabstract

Interface for ENM spring functions. More...

#include <spring_functions.hpp>

Inheritance diagram for ENM::SpringFunction:
Inheritance graph
[legend]

Public Types

typedef std::vector< double > Params
 

Public Member Functions

virtual std::string name () const =0
 Name for this particular spring function.
 
virtual Params setParams (const Params &konst)=0
 Sets the internal constants, returning the unused ones.
 
virtual bool validParams () const =0
 Determines if the internal constants are "valid".
 
virtual uint paramSize () const =0
 How many internal constants there are.
 
virtual loos::DoubleMatrix constant (const loos::GCoord &u, const loos::GCoord &v, const loos::GCoord &d)=0
 Actually compute the spring constant as a 3x3 matrix.
 

Protected Member Functions

double checkConstant (double d)
 Check for negative spring-constants.
 

Detailed Description

Interface for ENM spring functions.

These classes define the various possible spring functions used in creating the Hessian. All derived from the SpringFunction base class. This class returns a 3x3 DoubleMatrix containing the spring constants...

The SpringFunction::constant() function takes the coords of the two nodes plus their difference vector (since it'll almost always be computed prior to calling SpringFunction, no sense in recomputing it).

=Misc notes=

setParams() takes a vector of doubles that represents the internal "constants" for the spring functions. It treats the vector as a LIFO stack and picks off the ones it neds, returning the rest.

Member Function Documentation

◆ checkConstant()

double ENM::SpringFunction::checkConstant ( double d)
inlineprotected

Check for negative spring-constants.

Issues a one-time warning if a negative spring constant is found

◆ constant()

virtual loos::DoubleMatrix ENM::SpringFunction::constant ( const loos::GCoord & u,
const loos::GCoord & v,
const loos::GCoord & d )
pure virtual

Actually compute the spring constant as a 3x3 matrix.

Implemented in ENM::UniformSpringFunction.

◆ name()

virtual std::string ENM::SpringFunction::name ( ) const
pure virtual

Name for this particular spring function.

Implemented in ENM::DistanceCutoff, ENM::DistanceWeight, ENM::ExponentialDistance, ENM::HCA, and ENM::ConstBonded.

◆ paramSize()

virtual uint ENM::SpringFunction::paramSize ( ) const
pure virtual

How many internal constants there are.

Implemented in ENM::DistanceCutoff, ENM::DistanceWeight, ENM::ExponentialDistance, ENM::HCA, and ENM::ConstBonded.

◆ setParams()

virtual Params ENM::SpringFunction::setParams ( const Params & konst)
pure virtual

Sets the internal constants, returning the unused ones.

Implemented in ENM::DistanceCutoff, ENM::DistanceWeight, ENM::ExponentialDistance, ENM::HCA, and ENM::ConstBonded.

◆ validParams()

virtual bool ENM::SpringFunction::validParams ( ) const
pure virtual

Determines if the internal constants are "valid".

Implemented in ENM::DistanceCutoff, ENM::DistanceWeight, ENM::ExponentialDistance, ENM::HCA, and ENM::ConstBonded.


The documentation for this class was generated from the following file: