#include <GeneralisedLinearSpringForce.hpp>
Public Member Functions | |
GeneralisedLinearSpringForce () | |
~GeneralisedLinearSpringForce () | |
virtual double | VariableSpringConstantMultiplicationFactor (unsigned nodeAGlobalIndex, unsigned nodeBGlobalIndex, AbstractTissue< DIM > &rTissue, bool isCloserThanRestLength) |
c_vector< double, DIM > | CalculateForceBetweenNodes (unsigned nodeAGlobalIndex, unsigned nodeBGlobalIndex, AbstractTissue< DIM > &rTissue) |
Private Member Functions | |
template<class Archive> | |
void | serialize (Archive &archive, const unsigned int version) |
Friends | |
class | TestForces |
class | boost::serialization::access |
Each pair of neighbouring nodes are assumed to be connected by a linear spring. The force of node is given by
Here is the spring constant for the spring between nodes and , is its natural length at time , is their relative displacement and a hat () denotes a unit vector.
Length is scaled by natural length. Time is in hours.
Definition at line 57 of file GeneralisedLinearSpringForce.hpp.
GeneralisedLinearSpringForce< DIM >::GeneralisedLinearSpringForce | ( | ) | [inline] |
Constructor.
Definition at line 33 of file GeneralisedLinearSpringForce.cpp.
GeneralisedLinearSpringForce< DIM >::~GeneralisedLinearSpringForce | ( | ) | [inline] |
Destructor.
Definition at line 48 of file GeneralisedLinearSpringForce.cpp.
void GeneralisedLinearSpringForce< DIM >::serialize | ( | Archive & | archive, | |
const unsigned int | version | |||
) | [inline, private] |
Archive the object and its member variables.
archive | the archive | |
version | the current version of this class |
Reimplemented from AbstractTwoBodyInteractionForce< DIM >.
Reimplemented in LinearSpringWithVariableSpringConstantsForce< DIM >.
Definition at line 72 of file GeneralisedLinearSpringForce.hpp.
double GeneralisedLinearSpringForce< DIM >::VariableSpringConstantMultiplicationFactor | ( | unsigned | nodeAGlobalIndex, | |
unsigned | nodeBGlobalIndex, | |||
AbstractTissue< DIM > & | rTissue, | |||
bool | isCloserThanRestLength | |||
) | [inline, virtual] |
Return a multiplication factor for the spring constant, which returns a default value of 1.
This method is overridden in a subclass.
nodeAGlobalIndex | index of one neighbouring node | |
nodeBGlobalIndex | index of the other neighbouring node | |
rTissue | the tissue | |
isCloserThanRestLength | whether the neighbouring nodes lie closer than the rest length of their connecting spring |
Reimplemented in LinearSpringWithVariableSpringConstantsForce< DIM >.
Definition at line 39 of file GeneralisedLinearSpringForce.cpp.
Referenced by GeneralisedLinearSpringForce< DIM >::CalculateForceBetweenNodes(), and LinearSpringWithVariableSpringConstantsForce< DIM >::VariableSpringConstantMultiplicationFactor().
c_vector< double, DIM > GeneralisedLinearSpringForce< DIM >::CalculateForceBetweenNodes | ( | unsigned | nodeAGlobalIndex, | |
unsigned | nodeBGlobalIndex, | |||
AbstractTissue< DIM > & | rTissue | |||
) | [inline, virtual] |
Overridden CalculateForceBetweenNodes() method.
Calculates the force between two nodes.
Note that this assumes they are connected and is called by rCalculateVelocitiesOfEachNode()
nodeAGlobalIndex | index of one neighbouring node | |
nodeBGlobalIndex | index of the other neighbouring node | |
rTissue | the tissue |
Implements AbstractTwoBodyInteractionForce< DIM >.
Definition at line 53 of file GeneralisedLinearSpringForce.cpp.
References TissueCell::GetAge(), TissueConfig::GetApoptosisTime(), TissueConfig::GetDivisionRestingSpringLength(), TissueConfig::GetMDuration(), AbstractTissue< DIM >::GetNode(), TissueConfig::GetSpringStiffness(), SimulationTime::GetTimeStep(), TissueCell::HasApoptosisBegun(), AbstractTissue< DIM >::HasMesh(), SimulationTime::Instance(), TissueConfig::Instance(), AbstractTissue< DIM >::IsGhostNode(), AbstractTwoBodyInteractionForce< DIM >::mUseCutoffPoint, AbstractTissue< DIM >::rGetCellUsingLocationIndex(), TissueCell::TimeUntilDeath(), and GeneralisedLinearSpringForce< DIM >::VariableSpringConstantMultiplicationFactor().
Referenced by LinearSpringWithVariableSpringConstantsForce< DIM >::AddForceContribution().
friend class boost::serialization::access [friend] |
Needed for serialization.
Reimplemented from AbstractTwoBodyInteractionForce< DIM >.
Reimplemented in LinearSpringWithVariableSpringConstantsForce< DIM >.
Definition at line 64 of file GeneralisedLinearSpringForce.hpp.