36 #include "DifferentialAdhesionGeneralisedLinearSpringForce.hpp"
37 #include "CellLabel.hpp"
39 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
42 mHomotypicLabelledSpringConstantMultiplier(1.0),
43 mHeterotypicSpringConstantMultiplier(1.0)
47 template<
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;
89 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
92 return mHomotypicLabelledSpringConstantMultiplier;
95 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
98 assert(labelledSpringConstantMultiplier > 0.0);
99 mHomotypicLabelledSpringConstantMultiplier = labelledSpringConstantMultiplier;
102 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
105 return mHeterotypicSpringConstantMultiplier;
108 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
111 assert(heterotypicSpringConstantMultiplier > 0.0);
112 mHeterotypicSpringConstantMultiplier = heterotypicSpringConstantMultiplier;
115 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
118 *rParamsFile <<
"\t\t\t<HomotypicLabelledSpringConstantMultiplier>" << mHomotypicLabelledSpringConstantMultiplier <<
"</HomotypicLabelledSpringConstantMultiplier>\n";
119 *rParamsFile <<
"\t\t\t<HeterotypicSpringConstantMultiplier>" << mHeterotypicSpringConstantMultiplier <<
"</HeterotypicSpringConstantMultiplier>\n";
virtual CellPtr GetCellUsingLocationIndex(unsigned index)
double VariableSpringConstantMultiplicationFactor(unsigned nodeAGlobalIndex, unsigned nodeBGlobalIndex, AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM > &rCellPopulation, bool isCloserThanRestLength)
double GetHomotypicLabelledSpringConstantMultiplier()
void SetHeterotypicSpringConstantMultiplier(double heterotypicSpringConstantMultiplier)
#define EXPORT_TEMPLATE_CLASS_ALL_DIMS(CLASS)
virtual void OutputForceParameters(out_stream &rParamsFile)
double GetHeterotypicSpringConstantMultiplier()
DifferentialAdhesionGeneralisedLinearSpringForce()
void SetHomotypicLabelledSpringConstantMultiplier(double labelledSpringConstantMultiplier)
void OutputForceParameters(out_stream &rParamsFile)