60 for (
unsigned pair = 0; pair < rNodePairs.size(); ++pair)
65 Node<DIM>* p_node_a = rNodePairs[pair].first;
66 Node<DIM>* p_node_b = rNodePairs[pair].second;
70 double normed_dist = norm_2(vec_a2b);
76 bool a_lamina = p_node_a->
GetRegion() == LAMINA_REGION;
77 bool b_lamina = p_node_b->
GetRegion() == LAMINA_REGION;
88 double elem_spacing = 0.5 * (node_a_elem_spacing + node_b_elem_spacing);
94 if (a_lamina || b_lamina)
96 eff_well_depth *= mLaminaWellDepthMult;
97 eff_rest_length *= mLaminaRestLengthMult;
100 bool apical_lam = (a_lamina && p_node_a->
rGetLocation()[1] > 0.5) ||
105 eff_well_depth *= 1.0;
109 double morse_exp = exp((eff_rest_length - normed_dist) / eff_well_width);
115 vec_a2b *= 2.0 * eff_well_width * eff_well_depth * morse_exp * (1.0 - morse_exp) / normed_dist;
117 c_vector<double, DIM> force_a2b = vec_a2b * (elem_spacing / node_a_elem_spacing);
120 c_vector<double, DIM> force_b2a = vec_a2b * (-1.0 * elem_spacing / node_b_elem_spacing);
126 if (this->mAdditiveNormalNoise)
128 this->AddNormalNoiseToNodes(rCellPopulation);