#include <GeneralisedLinearSpringForce.hpp>
Public Member Functions | |
GeneralisedLinearSpringForce () | |
~GeneralisedLinearSpringForce () | |
virtual double | VariableSpringConstantMultiplicationFactor (unsigned nodeAGlobalIndex, unsigned nodeBGlobalIndex, AbstractCellPopulation< DIM > &rCellPopulation, bool isCloserThanRestLength) |
c_vector< double, DIM > | CalculateForceBetweenNodes (unsigned nodeAGlobalIndex, unsigned nodeBGlobalIndex, AbstractCellPopulation< DIM > &rCellPopulation) |
double | GetMeinekeSpringStiffness () |
double | GetMeinekeDivisionRestingSpringLength () |
double | GetMeinekeSpringGrowthDuration () |
void | SetMeinekeSpringStiffness (double springStiffness) |
void | SetMeinekeDivisionRestingSpringLength (double divisionRestingSpringLength) |
void | SetMeinekeSpringGrowthDuration (double springGrowthDuration) |
virtual void | OutputForceParameters (out_stream &rParamsFile) |
Protected Attributes | |
double | mMeinekeSpringStiffness |
double | mMeinekeDivisionRestingSpringLength |
double | mMeinekeSpringGrowthDuration |
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.
References GeneralisedLinearSpringForce< DIM >::mMeinekeSpringStiffness.
GeneralisedLinearSpringForce< DIM >::~GeneralisedLinearSpringForce | ( | ) | [inline] |
Destructor.
Definition at line 55 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 CryptProjectionForce, and LinearSpringWithVariableSpringConstantsForce< DIM >.
Definition at line 72 of file GeneralisedLinearSpringForce.hpp.
double GeneralisedLinearSpringForce< DIM >::VariableSpringConstantMultiplicationFactor | ( | unsigned | nodeAGlobalIndex, | |
unsigned | nodeBGlobalIndex, | |||
AbstractCellPopulation< DIM > & | rCellPopulation, | |||
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 | |
rCellPopulation | the cell population | |
isCloserThanRestLength | whether the neighbouring nodes lie closer than the rest length of their connecting spring |
Reimplemented in LinearSpringWithVariableSpringConstantsForce< DIM >.
Definition at line 46 of file GeneralisedLinearSpringForce.cpp.
Referenced by GeneralisedLinearSpringForce< DIM >::CalculateForceBetweenNodes(), and LinearSpringWithVariableSpringConstantsForce< DIM >::VariableSpringConstantMultiplicationFactor().
c_vector< double, DIM > GeneralisedLinearSpringForce< DIM >::CalculateForceBetweenNodes | ( | unsigned | nodeAGlobalIndex, | |
unsigned | nodeBGlobalIndex, | |||
AbstractCellPopulation< DIM > & | rCellPopulation | |||
) | [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 | |
rCellPopulation | the cell population |
Implements AbstractTwoBodyInteractionForce< DIM >.
Definition at line 60 of file GeneralisedLinearSpringForce.cpp.
References MeshBasedCellPopulation< DIM >::CreateCellPair(), AbstractCellPopulation< DIM >::GetCellUsingLocationIndex(), AbstractTwoBodyInteractionForce< DIM >::GetCutOffLength(), AbstractCellPopulation< DIM >::GetNode(), SimulationTime::GetTimeStep(), SimulationTime::Instance(), MeshBasedCellPopulation< DIM >::IsMarkedSpring(), AbstractCellPopulation< DIM >::IsMeshBasedCellPopulation(), GeneralisedLinearSpringForce< DIM >::mMeinekeDivisionRestingSpringLength, GeneralisedLinearSpringForce< DIM >::mMeinekeSpringGrowthDuration, GeneralisedLinearSpringForce< DIM >::mMeinekeSpringStiffness, AbstractTwoBodyInteractionForce< DIM >::mUseCutOffLength, MeshBasedCellPopulation< DIM >::UnmarkSpring(), and GeneralisedLinearSpringForce< DIM >::VariableSpringConstantMultiplicationFactor().
Referenced by LinearSpringWithVariableSpringConstantsForce< DIM >::AddForceContribution().
double GeneralisedLinearSpringForce< DIM >::GetMeinekeSpringStiffness | ( | ) | [inline] |
Definition at line 212 of file GeneralisedLinearSpringForce.cpp.
References GeneralisedLinearSpringForce< DIM >::mMeinekeSpringStiffness.
Referenced by LinearSpringWithVariableSpringConstantsForce< DIM >::VariableSpringConstantMultiplicationFactor().
double GeneralisedLinearSpringForce< DIM >::GetMeinekeDivisionRestingSpringLength | ( | ) | [inline] |
Definition at line 217 of file GeneralisedLinearSpringForce.cpp.
References GeneralisedLinearSpringForce< DIM >::mMeinekeDivisionRestingSpringLength.
double GeneralisedLinearSpringForce< DIM >::GetMeinekeSpringGrowthDuration | ( | ) | [inline] |
Definition at line 222 of file GeneralisedLinearSpringForce.cpp.
References GeneralisedLinearSpringForce< DIM >::mMeinekeSpringGrowthDuration.
void GeneralisedLinearSpringForce< DIM >::SetMeinekeSpringStiffness | ( | double | springStiffness | ) | [inline] |
Set mMeinekeSpringStiffness.
springStiffness | the new value of mMeinekeSpringStiffness |
Definition at line 229 of file GeneralisedLinearSpringForce.cpp.
References GeneralisedLinearSpringForce< DIM >::mMeinekeSpringStiffness.
void GeneralisedLinearSpringForce< DIM >::SetMeinekeDivisionRestingSpringLength | ( | double | divisionRestingSpringLength | ) | [inline] |
Set mMeinekeDivisionRestingSpringLength.
divisionRestingSpringLength | the new value of mMeinekeDivisionRestingSpringLength |
Definition at line 236 of file GeneralisedLinearSpringForce.cpp.
References GeneralisedLinearSpringForce< DIM >::mMeinekeDivisionRestingSpringLength.
void GeneralisedLinearSpringForce< DIM >::SetMeinekeSpringGrowthDuration | ( | double | springGrowthDuration | ) | [inline] |
Set mMeinekeSpringGrowthDuration.
springGrowthDuration | the new value of mMeinekeSpringGrowthDuration |
Definition at line 245 of file GeneralisedLinearSpringForce.cpp.
References GeneralisedLinearSpringForce< DIM >::mMeinekeSpringGrowthDuration.
void GeneralisedLinearSpringForce< DIM >::OutputForceParameters | ( | out_stream & | rParamsFile | ) | [inline, virtual] |
Outputs force parameters to file
As this method is pure virtual, it must be overridden in subclasses.
rParamsFile | the file stream to which the parameters are output |
Reimplemented from AbstractTwoBodyInteractionForce< DIM >.
Reimplemented in CryptProjectionForce, and LinearSpringWithVariableSpringConstantsForce< DIM >.
Definition at line 253 of file GeneralisedLinearSpringForce.cpp.
References GeneralisedLinearSpringForce< DIM >::mMeinekeDivisionRestingSpringLength, GeneralisedLinearSpringForce< DIM >::mMeinekeSpringGrowthDuration, GeneralisedLinearSpringForce< DIM >::mMeinekeSpringStiffness, and AbstractTwoBodyInteractionForce< DIM >::OutputForceParameters().
Referenced by LinearSpringWithVariableSpringConstantsForce< DIM >::OutputForceParameters(), and CryptProjectionForce::OutputForceParameters().
friend class boost::serialization::access [friend] |
Needed for serialization.
Reimplemented from AbstractTwoBodyInteractionForce< DIM >.
Reimplemented in CryptProjectionForce, and LinearSpringWithVariableSpringConstantsForce< DIM >.
Definition at line 64 of file GeneralisedLinearSpringForce.hpp.
double GeneralisedLinearSpringForce< DIM >::mMeinekeSpringStiffness [protected] |
Spring stiffness.
Represented by the parameter mu in the model by Meineke et al (2001) in their off-lattice model of the intestinal crypt (doi:10.1046/j.0960-7722.2001.00216.x).
Definition at line 91 of file GeneralisedLinearSpringForce.hpp.
Referenced by GeneralisedLinearSpringForce< DIM >::CalculateForceBetweenNodes(), GeneralisedLinearSpringForce< DIM >::GeneralisedLinearSpringForce(), GeneralisedLinearSpringForce< DIM >::GetMeinekeSpringStiffness(), GeneralisedLinearSpringForce< DIM >::OutputForceParameters(), GeneralisedLinearSpringForce< 2 >::serialize(), and GeneralisedLinearSpringForce< DIM >::SetMeinekeSpringStiffness().
double GeneralisedLinearSpringForce< DIM >::mMeinekeDivisionRestingSpringLength [protected] |
Initial resting spring length after cell division. Has units of cell size at equilibrium rest length
The value of this parameter should be larger than mDivisionSeparation, because of pressure from neighbouring springs.
Definition at line 100 of file GeneralisedLinearSpringForce.hpp.
Referenced by GeneralisedLinearSpringForce< DIM >::CalculateForceBetweenNodes(), GeneralisedLinearSpringForce< DIM >::GetMeinekeDivisionRestingSpringLength(), GeneralisedLinearSpringForce< DIM >::OutputForceParameters(), GeneralisedLinearSpringForce< 2 >::serialize(), and GeneralisedLinearSpringForce< DIM >::SetMeinekeDivisionRestingSpringLength().
double GeneralisedLinearSpringForce< DIM >::mMeinekeSpringGrowthDuration [protected] |
The time it takes for the springs rest length to increase from mMeinekeDivisionRestingSpringLength to its natural length.
The value of this parameter is usually the same as the M Phase of the cell cycle and defaults to 1.
Definition at line 108 of file GeneralisedLinearSpringForce.hpp.
Referenced by GeneralisedLinearSpringForce< DIM >::CalculateForceBetweenNodes(), GeneralisedLinearSpringForce< DIM >::GetMeinekeSpringGrowthDuration(), GeneralisedLinearSpringForce< DIM >::OutputForceParameters(), GeneralisedLinearSpringForce< 2 >::serialize(), and GeneralisedLinearSpringForce< DIM >::SetMeinekeSpringGrowthDuration().