#include <GeneralisedLinearSpringForce.hpp>
Inherits AbstractTwoBodyInteractionForce< DIM >.
Inherited by LinearSpringWithVariableSpringConstantsForce< DIM >.
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 |
A force law employed by Meineke et al (2001) in their off-lattice model of the intestinal crypt (doi:10.1046/j.0960-7722.2001.00216.x).
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.
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 MeshBasedTissue< DIM >::CreateCellPair(), TissueCell::GetAge(), TissueConfig::GetApoptosisTime(), TissueConfig::GetDivisionRestingSpringLength(), TissueConfig::GetMDuration(), TissueConfig::GetMechanicsCutOffLength(), AbstractTissue< DIM >::GetNode(), TissueConfig::GetSpringStiffness(), SimulationTime::GetTimeStep(), TissueCell::GetTimeUntilDeath(), TissueCell::HasApoptosisBegun(), AbstractTissue< DIM >::HasMesh(), SimulationTime::Instance(), TissueConfig::Instance(), MeshBasedTissue< DIM >::IsMarkedSpring(), AbstractTwoBodyInteractionForce< DIM >::mUseCutoffPoint, AbstractTissue< DIM >::rGetCellUsingLocationIndex(), MeshBasedTissue< DIM >::UnmarkSpring(), and GeneralisedLinearSpringForce< DIM >::VariableSpringConstantMultiplicationFactor().
Referenced by LinearSpringWithVariableSpringConstantsForce< DIM >::AddForceContribution().
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().
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.