Chaste Commit::f841a6fa79bd6f7a205054452b95ddf6d10aae23
LinearSpringForce< ELEMENT_DIM, SPACE_DIM > Class Template Reference

#include <LinearSpringForce.hpp>

+ Inheritance diagram for LinearSpringForce< ELEMENT_DIM, SPACE_DIM >:
+ Collaboration diagram for LinearSpringForce< ELEMENT_DIM, SPACE_DIM >:

Public Member Functions

 LinearSpringForce ()
 
virtual ~LinearSpringForce ()
 
virtual void OutputForceParameters (out_stream &rParamsFile)
 
- Public Member Functions inherited from AbstractVariableSizeTwoBodyInteractionForce< ELEMENT_DIM, SPACE_DIM >
 AbstractVariableSizeTwoBodyInteractionForce ()
 
virtual ~AbstractVariableSizeTwoBodyInteractionForce ()
 
virtual double VariableSpringConstantMultiplicationFactor (unsigned nodeAGlobalIndex, unsigned nodeBGlobalIndex, AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM > &rCellPopulation, bool isCloserThanRestLength)
 
c_vector< double, SPACE_DIM > CalculateForceBetweenNodes (unsigned nodeAGlobalIndex, unsigned nodeBGlobalIndex, AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM > &rCellPopulation)
 
double GetSpringStiffness ()
 
double GetDivisionRestingSpringLength ()
 
double GetSpringGrowthDuration ()
 
void SetSpringStiffness (double springStiffness)
 
void SetDivisionRestingSpringLength (double divisionRestingSpringLength)
 
void SetSpringGrowthDuration (double springGrowthDuration)
 
- Public Member Functions inherited from AbstractTwoBodyInteractionForce< ELEMENT_DIM, SPACE_DIM >
 AbstractTwoBodyInteractionForce ()
 
bool GetUseCutOffLength ()
 
void SetCutOffLength (double cutOffLength)
 
double GetCutOffLength ()
 
void AddForceContribution (AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM > &rCellPopulation)
 
virtual void WriteDataToVisualizerSetupFile (out_stream &pVizSetupFile)
 
- Public Member Functions inherited from AbstractForce< ELEMENT_DIM, SPACE_DIM >
 AbstractForce ()
 
virtual ~AbstractForce ()
 
void OutputForceInfo (out_stream &rParamsFile)
 
- Public Member Functions inherited from Identifiable
virtual ~Identifiable ()
 
std::string GetIdentifier () const
 

Protected Member Functions

c_vector< double, SPACE_DIM > CalculateLinkInteraction (double overlap, double restLength, const c_vector< double, SPACE_DIM > &rUnitDifference, double multiplicationFactor)
 

Private Member Functions

template<class Archive >
void serialize (Archive &archive, const unsigned int version)
 

Friends

class TestForces
 
class boost::serialization::access
 

Additional Inherited Members

- Protected Attributes inherited from AbstractVariableSizeTwoBodyInteractionForce< ELEMENT_DIM, SPACE_DIM >
double mSpringStiffness
 
double mDivisionRestingSpringLength
 
double mSpringGrowthDuration
 
- Protected Attributes inherited from AbstractTwoBodyInteractionForce< ELEMENT_DIM, SPACE_DIM >
bool mUseCutOffLength
 
double mMechanicsCutOffLength
 

Detailed Description

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
class LinearSpringForce< ELEMENT_DIM, SPACE_DIM >

A linear spring force law between pairs of neighbouring nodes.

Implements the 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 $i$ is given by

\[
\mathbf{F}_{i}(t) = \sum_{j} \mu_{i,j} ( || \mathbf{r}_{i,j} || - s_{i,j}(t) ) \hat{\mathbf{r}}_{i,j}.
\]

Here $\mu_{i,j}$ is the spring constant for the spring between nodes $i$ and $j$, $s_{i,j}(t)$ is its natural length at time $t$, $\mathbf{r}_{i,j}$ is their relative displacement and a hat ( $\hat{}$) denotes a unit vector.

Length is scaled by natural length. Time is in hours.

Definition at line 67 of file LinearSpringForce.hpp.

Constructor & Destructor Documentation

◆ LinearSpringForce()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
LinearSpringForce< ELEMENT_DIM, SPACE_DIM >::LinearSpringForce ( )

Constructor.

Definition at line 39 of file LinearSpringForce.cpp.

◆ ~LinearSpringForce()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
LinearSpringForce< ELEMENT_DIM, SPACE_DIM >::~LinearSpringForce ( )
virtual

Destructor.

Definition at line 45 of file LinearSpringForce.cpp.

Member Function Documentation

◆ CalculateLinkInteraction()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
c_vector< double, SPACE_DIM > LinearSpringForce< ELEMENT_DIM, SPACE_DIM >::CalculateLinkInteraction ( double  overlap,
double  restLength,
const c_vector< double, SPACE_DIM > &  rUnitDifference,
double  multiplicationFactor 
)
protectedvirtual

Overridden CalculateLinkInteraction() method.

Calculates the linear spring force after shared rest-length mechanics have been computed by AbstractVariableSizeTwoBodyInteractionForce.

Parameters
overlapthe amount by which the distance between nodes is less than the rest length
restLengththe rest length of the spring between the nodes
rUnitDifferencethe unit vector pointing from one node to the other
multiplicationFactora multiplication factor for the spring constant
Returns
the force vector between the two nodes

Implements AbstractVariableSizeTwoBodyInteractionForce< ELEMENT_DIM, SPACE_DIM >.

Definition at line 50 of file LinearSpringForce.cpp.

◆ OutputForceParameters()

◆ serialize()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
template<class Archive >
void LinearSpringForce< ELEMENT_DIM, SPACE_DIM >::serialize ( Archive &  archive,
const unsigned int  version 
)
inlineprivate

Archive the object and its member variables.

Parameters
archivethe archive
versionthe current version of this class

Definition at line 82 of file LinearSpringForce.hpp.

Friends And Related Symbol Documentation

◆ boost::serialization::access

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
friend class boost::serialization::access
friend

Needed for serialization.

Definition at line 74 of file LinearSpringForce.hpp.

◆ TestForces

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
friend class TestForces
friend

Definition at line 69 of file LinearSpringForce.hpp.


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