36 #include "DifferentialAdhesionGeneralisedLinearSpringForce.hpp"
37 #include "NodeBasedCellPopulation.hpp"
38 #include "CellLabel.hpp"
40 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
43 mHomotypicLabelledSpringConstantMultiplier(1.0),
44 mHeterotypicSpringConstantMultiplier(1.0)
48 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
50 unsigned nodeAGlobalIndex,
51 unsigned nodeBGlobalIndex,
53 bool isCloserThanRestLength)
56 if (isCloserThanRestLength)
64 bool cell_A_is_labelled = p_cell_A->template HasCellProperty<CellLabel>();
67 bool cell_B_is_labelled = p_cell_B->template HasCellProperty<CellLabel>();
70 if (cell_A_is_labelled != cell_B_is_labelled)
72 return mHeterotypicSpringConstantMultiplier;
77 if (cell_A_is_labelled)
79 return mHomotypicLabelledSpringConstantMultiplier;
90 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
93 return mHomotypicLabelledSpringConstantMultiplier;
96 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
99 assert(labelledSpringConstantMultiplier > 0.0);
100 mHomotypicLabelledSpringConstantMultiplier = labelledSpringConstantMultiplier;
103 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
106 return mHeterotypicSpringConstantMultiplier;
109 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
112 assert(heterotypicSpringConstantMultiplier > 0.0);
113 mHeterotypicSpringConstantMultiplier = heterotypicSpringConstantMultiplier;
116 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
119 *rParamsFile <<
"\t\t\t<HomotypicLabelledSpringConstantMultiplier>" << mHomotypicLabelledSpringConstantMultiplier <<
"</HomotypicLabelledSpringConstantMultiplier>\n";
120 *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)