1 #ifndef NODE_MOVER_H_INCLUDED
2 #define NODE_MOVER_H_INCLUDED
26 #include <boost/property_tree/ptree.hpp>
31 #include <unordered_set>
54 MetropolisInfo(
unsigned int dc = 0U,
unsigned int uc = 0U,
double dd = 0.0,
double ud = 0.0)
55 : down_count(dc), up_count(uc), down_dh(dd), up_dh(ud)
57 unsigned int down_count;
58 unsigned int up_count;
64 down_count += other.down_count;
65 up_count += other.up_count;
66 down_dh += other.down_dh;
77 MoveInfo(
Node* no =
nullptr,
bool da =
false,
bool ma =
false,
78 double sd = 0.0, std::array<double, 3> d = {{0.0, 0.0, 0.0}})
79 : node(no), dh_accept(da), mc_accept(ma), dh(sd), displacement(d)
85 std::array<double,3> displacement;
102 MetropolisInfo
SweepOverNodes(
double step_size,
double temperature);
118 void CalculateCellEnergies();
121 void CalculateCellEnergiesDelta();
130 bool IsNonIntersecting(
Node* node,
const std::array<double, 3>& move)
const;
133 MetropolisInfo MoveNode(
Node* n,
double step_size,
double temperature);
136 MetropolisInfo MoveNodeDelta(
Node* n,
double step_size,
double temperature);
139 MoveInfo MoveAcceptance(
Node* node,
double step_size,
double temperature);
142 MetropolisInfo MoveExecution(
const MoveInfo& move);
146 std::map<Cell*, double> m_cell_energies;
150 double m_tissue_energy;
155 std::vector<std::function<std::array<double,3>()> > m_mc_move_generator;
159 std::vector<std::function<double()> > m_normal_generator;
163 std::vector<std::function<double()> > m_uniform_generator;
168 #endif // end_of_include_guard
std::function< double(Cell *)> HamiltonianComponent
Hamiltonian component interface.
std::function< double(const NeighborNodes &, Node *, std::array< double, 3 >)> DeltaHamiltonianComponent
DeltaHamiltonian component interface.
Core data with mesh, parameters, random engine and time data.
Core data used during model execution.
double GetTissueEnergy() const
Get current energy for the whole tissue.
Interface of Model Components.
MetropolisInfo SweepOverNodes(double step_size, double temperature)
Sweep over all nodes, do metropolis move for each of them.
Cell mechanics by displacement and insertion of nodes.
Namespace for the core simulator.
bool UsesDeltaHamiltonian() const
Using the delta-hamiltonian.
NodeMover()
Straight initialization of empty object.
Information related to (potential) move of a node in the mesh.
void Initialize(const CoreData &cd)
Initializes based on values in property tree.
Structure of cells; key data structure.
Information gathered to evaluat effects of Metropolis Algorithm.