36 #include "LinearSpringWithVariableSpringConstantsForce.hpp" 37 #include "MeshBasedCellPopulation.hpp" 38 #include "VanLeeuwen2009WntSwatCellCycleModelHypothesisOne.hpp" 39 #include "VanLeeuwen2009WntSwatCellCycleModelHypothesisTwo.hpp" 40 #include "ApoptoticCellProperty.hpp" 41 #include "BetaCateninOneHitCellMutationState.hpp" 42 #include "ApcTwoHitCellMutationState.hpp" 44 template<
unsigned DIM>
47 mUseEdgeBasedSpringConstant(false),
48 mUseMutantSprings(false),
51 mUseBCatSprings(false),
52 mUseApoptoticSprings(false),
53 mBetaCatSpringScaler(18.14/6.0),
54 mApoptoticSpringTensionStiffness(15.0*0.25),
55 mApoptoticSpringCompressionStiffness(15.0*0.75)
59 template<
unsigned DIM>
64 template<
unsigned DIM>
71 template<
unsigned DIM>
79 template<
unsigned DIM>
85 template<
unsigned DIM>
91 template<
unsigned DIM>
93 unsigned nodeAGlobalIndex,
94 unsigned nodeBGlobalIndex,
96 bool isCloserThanRestLength)
102 isCloserThanRestLength);
117 multiplication_factor = (
static_cast<MeshBasedCellPopulation<DIM>*
>(&rCellPopulation))->GetVoronoiEdgeLength(nodeAGlobalIndex, nodeBGlobalIndex)*sqrt(3.0);
122 unsigned number_of_mutants = 0;
136 switch (number_of_mutants)
172 double edge_length_between_1_and_2 = p_static_cast_cell_population->
GetVoronoiEdgeLength(nodeAGlobalIndex, nodeBGlobalIndex);
174 double beta_cat_on_cell_1_edge = beta_cat_cell_1 * edge_length_between_1_and_2 / perim_cell_1;
175 double beta_cat_on_cell_2_edge = beta_cat_cell_2 * edge_length_between_1_and_2 / perim_cell_2;
177 double min_beta_Cat_of_two_cells = std::min(beta_cat_on_cell_1_edge, beta_cat_on_cell_2_edge);
187 if (cell_A_is_apoptotic || cell_B_is_apoptotic)
192 if (cell_A_is_apoptotic)
194 if (!isCloserThanRestLength)
203 if (cell_B_is_apoptotic)
205 if (!isCloserThanRestLength)
219 return multiplication_factor;
222 template<
unsigned DIM>
228 EXCEPTION(
"LinearSpringWithVariableSpringConstantsForce is to be used with a subclass of MeshBasedCellPopulation only");
234 spring_iterator != p_static_cast_cell_population->
SpringsEnd();
237 unsigned nodeA_global_index = spring_iterator.GetNodeA()->GetIndex();
238 unsigned nodeB_global_index = spring_iterator.GetNodeB()->GetIndex();
241 c_vector<double, DIM> negative_force = -1.0*force;
243 spring_iterator.GetNodeB()->AddAppliedForceContribution(negative_force);
244 spring_iterator.GetNodeA()->AddAppliedForceContribution(force);
248 template<
unsigned DIM>
254 template<
unsigned DIM>
257 assert(betaCatSpringScaler > 0.0);
261 template<
unsigned DIM>
267 template<
unsigned DIM>
270 assert(apoptoticSpringTensionStiffness >= 0.0);
274 template<
unsigned DIM>
280 template<
unsigned DIM>
283 assert(apoptoticSpringCompressionStiffness >= 0.0);
287 template<
unsigned DIM>
291 *rParamsFile <<
"\t\t\t<UseMutantSprings>" <<
mUseMutantSprings <<
"</UseMutantSprings>\n";
294 *rParamsFile <<
"\t\t\t<UseBCatSprings>" <<
mUseBCatSprings <<
"</UseBCatSprings>\n";
295 *rParamsFile <<
"\t\t\t<UseApoptoticSprings>" <<
mUseApoptoticSprings <<
"</UseApoptoticSprings>\n";
296 *rParamsFile <<
"\t\t\t<BetaCatSpringScaler>" <<
mBetaCatSpringScaler <<
"</BetaCatSpringScaler>\n";
double GetSurfaceAreaOfVoronoiElement(unsigned index)
SpringIterator SpringsEnd()
double GetVoronoiEdgeLength(unsigned index1, unsigned index2)
double mMutantMutantMultiplier
SpringIterator SpringsBegin()
void SetApoptoticSpringTensionStiffness(double apoptoticSpringTensionStiffness)
virtual CellPtr GetCellUsingLocationIndex(unsigned index)
bool mUseApoptoticSprings
LinearSpringWithVariableSpringConstantsForce()
double mBetaCatSpringScaler
double VariableSpringConstantMultiplicationFactor(unsigned nodeAGlobalIndex, unsigned nodeBGlobalIndex, AbstractCellPopulation< DIM > &rCellPopulation, bool isCloserThanRestLength)
c_vector< double, ELEMENT_DIM > CalculateForceBetweenNodes(unsigned nodeAGlobalIndex, unsigned nodeBGlobalIndex, AbstractCellPopulation< ELEMENT_DIM, ELEMENT_DIM > &rCellPopulation)
#define EXCEPTION(message)
bool mUseEdgeBasedSpringConstant
double GetBetaCatSpringScaler()
virtual void OutputForceParameters(out_stream &rParamsFile)
const double DOUBLE_UNSET
double GetMembraneBoundBetaCateninLevel()
void SetApoptoticSprings(bool useApoptoticSprings)
double GetMeinekeSpringStiffness()
double mApoptoticSpringTensionStiffness
#define EXPORT_TEMPLATE_CLASS_SAME_DIMS(CLASS)
void SetBetaCatSpringScaler(double betaCatSpringScaler)
double GetApoptoticSpringCompressionStiffness()
void AddForceContribution(AbstractCellPopulation< DIM > &rCellPopulation)
virtual ~LinearSpringWithVariableSpringConstantsForce()
double mNormalMutantMultiplier
virtual double VariableSpringConstantMultiplicationFactor(unsigned nodeAGlobalIndex, unsigned nodeBGlobalIndex, AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM > &rCellPopulation, bool isCloserThanRestLength)
void SetMutantSprings(bool useMutantSprings, double mutantMutantMultiplier=2, double normalMutantMultiplier=1.5)
virtual void OutputForceParameters(out_stream &rParamsFile)
void SetApoptoticSpringCompressionStiffness(double apoptoticSpringCompressionStiffness)
double mApoptoticSpringCompressionStiffness
void SetEdgeBasedSpringConstant(bool useEdgeBasedSpringConstant)
void SetBetaCateninSprings(bool useBCatSprings)
double GetApoptoticSpringTensionStiffness()