36 #include "NagaiHondaDifferentialAdhesionForce.hpp" 37 #include "CellLabel.hpp" 39 template<
unsigned DIM>
42 mNagaiHondaLabelledCellLabelledCellAdhesionEnergyParameter(1.0),
43 mNagaiHondaLabelledCellCellAdhesionEnergyParameter(1.0),
44 mNagaiHondaLabelledCellBoundaryAdhesionEnergyParameter(1.0)
48 template<
unsigned DIM>
53 template<
unsigned DIM>
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>())
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)
116 else if (num_labelled_cells == 1)
124 assert(num_labelled_cells == 0);
130 template<
unsigned DIM>
136 template<
unsigned DIM>
142 template<
unsigned DIM>
148 template<
unsigned DIM>
154 template<
unsigned DIM>
160 template<
unsigned DIM>
166 template<
unsigned DIM>
NagaiHondaDifferentialAdhesionForce()
virtual CellPtr GetCellUsingLocationIndex(unsigned index)
double mNagaiHondaLabelledCellBoundaryAdhesionEnergyParameter
void OutputForceParameters(out_stream &rParamsFile)
std::set< unsigned > & rGetContainingElementIndices()
void SetNagaiHondaLabelledCellCellAdhesionEnergyParameter(double labelledCellCellAdhesionEnergyParameter)
virtual ~NagaiHondaDifferentialAdhesionForce()
void OutputForceParameters(out_stream &rParamsFile)
#define EXPORT_TEMPLATE_CLASS_SAME_DIMS(CLASS)
double GetNagaiHondaLabelledCellBoundaryAdhesionEnergyParameter()
void SetNagaiHondaLabelledCellLabelledCellAdhesionEnergyParameter(double labelledCellLabelledCellAdhesionEnergyParameter)
void SetNagaiHondaLabelledCellBoundaryAdhesionEnergyParameter(double labelledCellBoundaryAdhesionEnergyParameter)
double GetNagaiHondaLabelledCellLabelledCellAdhesionEnergyParameter()
double mNagaiHondaLabelledCellCellAdhesionEnergyParameter
double GetNagaiHondaCellCellAdhesionEnergyParameter()
double GetNagaiHondaLabelledCellCellAdhesionEnergyParameter()
double GetNagaiHondaCellBoundaryAdhesionEnergyParameter()
double mNagaiHondaLabelledCellLabelledCellAdhesionEnergyParameter
virtual double GetAdhesionParameter(Node< DIM > *pNodeA, Node< DIM > *pNodeB, VertexBasedCellPopulation< DIM > &rVertexCellPopulation)