63 std::set<unsigned> shared_elements;
64 std::set_intersection(elements_containing_nodeA.begin(),
65 elements_containing_nodeA.end(),
66 elements_containing_nodeB.begin(),
67 elements_containing_nodeB.end(),
68 std::inserter(shared_elements, shared_elements.begin()));
71 assert(!shared_elements.empty());
74 if (shared_elements.size() == 1)
76 unsigned element_index = *(shared_elements.begin());
81 if (p_cell->template HasCellProperty<CellLabel>())
84 return this->GetNagaiHondaLabelledCellBoundaryAdhesionEnergyParameter();
89 return this->GetNagaiHondaCellBoundaryAdhesionEnergyParameter();
95 unsigned num_labelled_cells = 0;
96 for (std::set<unsigned>::iterator iter = shared_elements.begin();
97 iter != shared_elements.end();
100 unsigned element_index = *(iter);
105 if (p_cell->template HasCellProperty<CellLabel>())
107 num_labelled_cells++;
111 if (num_labelled_cells == 2)
114 return this->GetNagaiHondaLabelledCellLabelledCellAdhesionEnergyParameter();
116 else if (num_labelled_cells == 1)
119 return this->GetNagaiHondaLabelledCellCellAdhesionEnergyParameter();
124 assert(num_labelled_cells == 0);
125 return this->GetNagaiHondaCellCellAdhesionEnergyParameter();