36#include "DifferentialAdhesionGeneralisedLinearSpringForce.hpp"
37#include "CellLabel.hpp"
39template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
42 mHomotypicLabelledSpringConstantMultiplier(1.0),
43 mHeterotypicSpringConstantMultiplier(1.0)
47template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
49 unsigned nodeAGlobalIndex,
50 unsigned nodeBGlobalIndex,
52 bool isCloserThanRestLength)
55 if (isCloserThanRestLength)
63 bool cell_A_is_labelled = p_cell_A->template HasCellProperty<CellLabel>();
66 bool cell_B_is_labelled = p_cell_B->template HasCellProperty<CellLabel>();
69 if (cell_A_is_labelled != cell_B_is_labelled)
71 return mHeterotypicSpringConstantMultiplier;
76 if (cell_A_is_labelled)
78 return mHomotypicLabelledSpringConstantMultiplier;
89template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
92 return mHomotypicLabelledSpringConstantMultiplier;
95template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
98 assert(labelledSpringConstantMultiplier > 0.0);
99 mHomotypicLabelledSpringConstantMultiplier = labelledSpringConstantMultiplier;
102template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
105 return mHeterotypicSpringConstantMultiplier;
108template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
111 assert(heterotypicSpringConstantMultiplier > 0.0);
112 mHeterotypicSpringConstantMultiplier = heterotypicSpringConstantMultiplier;
115template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
118 *rParamsFile <<
"\t\t\t<HomotypicLabelledSpringConstantMultiplier>" << mHomotypicLabelledSpringConstantMultiplier <<
"</HomotypicLabelledSpringConstantMultiplier>\n";
119 *rParamsFile <<
"\t\t\t<HeterotypicSpringConstantMultiplier>" << mHeterotypicSpringConstantMultiplier <<
"</HeterotypicSpringConstantMultiplier>\n";
#define EXPORT_TEMPLATE_CLASS_ALL_DIMS(CLASS)
virtual CellPtr GetCellUsingLocationIndex(unsigned index)
DifferentialAdhesionGeneralisedLinearSpringForce()
double VariableSpringConstantMultiplicationFactor(unsigned nodeAGlobalIndex, unsigned nodeBGlobalIndex, AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM > &rCellPopulation, bool isCloserThanRestLength)
double GetHeterotypicSpringConstantMultiplier()
void OutputForceParameters(out_stream &rParamsFile)
void SetHeterotypicSpringConstantMultiplier(double heterotypicSpringConstantMultiplier)
double GetHomotypicLabelledSpringConstantMultiplier()
void SetHomotypicLabelledSpringConstantMultiplier(double labelledSpringConstantMultiplier)
virtual void OutputForceParameters(out_stream &rParamsFile)