57 EXCEPTION(
"This force class cannot be used in the presence of lamina elements.");
60 for (
unsigned pair = 0; pair < rNodePairs.size(); ++pair)
68 Node<DIM>* p_node_a = rNodePairs[pair].first;
69 Node<DIM>* p_node_b = rNodePairs[pair].second;
73 const double normed_dist = norm_2(vec_a2b);
87 double elem_spacing = 0.5 * (node_a_elem_spacing + node_b_elem_spacing);
91 if (a_cell_labelled && b_cell_labelled)
93 eff_spring_const *= mLabelledCellToLabelledCellSpringConst;
95 else if (a_cell_labelled || b_cell_labelled)
97 eff_spring_const *= mLabelledCellToCellSpringConst;
101 eff_spring_const *= mCellToCellSpringConst;
110 vec_a2b *= eff_spring_const * (normed_dist - eff_rest_length) / normed_dist;
112 c_vector<double, DIM> force_a2b = vec_a2b * (elem_spacing / node_a_elem_spacing);
115 c_vector<double, DIM> force_b2a = vec_a2b * (-1.0 * elem_spacing / node_b_elem_spacing);