#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) |
void | AddForceContribution (std::vector< c_vector< double, DIM > > &rForces, AbstractTissue< DIM > &rTissue) |
Private Member Functions | |
template<class Archive> | |
void | serialize (Archive &archive, const unsigned int version) |
Friends | |
class | TestForces |
class | boost::serialization::access |
The force law is that of an linear overdamped spring.
Definition at line 43 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.
archive | ||
version |
Reimplemented from AbstractTwoBodyInteractionForce< DIM >.
Reimplemented in LinearSpringWithVariableSpringConstantsForce< DIM >.
Definition at line 58 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(), CancerParameters::GetApoptosisTime(), CancerParameters::GetDivisionRestingSpringLength(), CancerParameters::GetMDuration(), AbstractTissue< DIM >::GetNode(), CancerParameters::GetSpringStiffness(), SimulationTime::GetTimeStep(), TissueCell::HasApoptosisBegun(), AbstractTissue< DIM >::HasMesh(), SimulationTime::Instance(), CancerParameters::Instance(), AbstractTissue< DIM >::IsGhostNode(), AbstractTwoBodyInteractionForce< DIM >::mCutoffPoint, AbstractTwoBodyInteractionForce< DIM >::mUseCutoffPoint, AbstractTissue< DIM >::rGetCellUsingLocationIndex(), TissueCell::TimeUntilDeath(), and GeneralisedLinearSpringForce< DIM >::VariableSpringConstantMultiplicationFactor().
Referenced by LinearSpringWithVariableSpringConstantsForce< DIM >::AddForceContribution(), and GeneralisedLinearSpringForce< DIM >::AddForceContribution().
void GeneralisedLinearSpringForce< DIM >::AddForceContribution | ( | std::vector< c_vector< double, DIM > > & | rForces, | |
AbstractTissue< DIM > & | rTissue | |||
) | [inline, virtual] |
Overridden AddForceContribution() method.
rForces | reference to vector of forces on nodes | |
rTissue | reference to the tissue |
Implements AbstractForce< DIM >.
Reimplemented in LinearSpringWithVariableSpringConstantsForce< DIM >.
Definition at line 198 of file GeneralisedLinearSpringForce.cpp.
References GeneralisedLinearSpringForce< DIM >::CalculateForceBetweenNodes(), AbstractTissue< DIM >::GetNumNodes(), and AbstractTissue< DIM >::HasMesh().
friend class boost::serialization::access [friend] |
Needed for serialization.
Reimplemented from AbstractTwoBodyInteractionForce< DIM >.
Reimplemented in LinearSpringWithVariableSpringConstantsForce< DIM >.
Definition at line 50 of file GeneralisedLinearSpringForce.hpp.