33 namespace Hamiltonian {
37 assert( cd.
Check() &&
"CoreData not ok in PlainGC Hamiltonian");
43 const auto& p = cd.m_parameters->get_child(
"cell_mechanics");
45 m_lambda_bend = p.get<
double>(
"lambda_bend");
46 m_lambda_cell_length = p.get<
double>(
"lambda_celllength");
47 m_lambda_length = p.get<
double>(
"lambda_length");
48 m_rp_stiffness = p.get<
double>(
"relative_perimeter_stiffness");
49 m_target_node_distance = p.get<
double>(
"target_node_distance");
52 double PlainGC::operator()(
Cell* cell)
56 if (!cell->IsBoundaryPolygon()) {
61 h += pow(cell->
GetArea() - cell->GetTargetArea(), 2);
66 h += m_lambda_length * HHelper::EdgeTerm(cell, m_rp_stiffness, m_target_node_distance);
71 if (abs(m_lambda_cell_length) > 1.0e-7) {
72 h += m_lambda_cell_length * HHelper::CellLengthTerm(cell);
79 if (abs(m_lambda_bend) > 1.0e-7) {
80 h += m_lambda_bend * HHelper::BendingTerm(cell);
Core data with mesh, parameters, random engine and time data.
A cell contains walls and nodes.
Core data used during model execution.
Interface for Hamiltonian PlainGC component.
Interface/Implementation for Hamiltonian::HHelper.
Namespace for components of the Default model group.
Namespace for the core simulator.
double GetArea() const
Return the area of the cell.
bool Check() const
Verify all pointers non-null.