1 #ifndef SIMPT_DEFAULT_MOVE_GEN_DIRECTED_NORMAL_H_INCLUDED
2 #define SIMPT_DEFAULT_MOVE_GEN_DIRECTED_NORMAL_H_INCLUDED
26 #include <boost/property_tree/ptree.hpp>
27 #include <trng/normal_dist.hpp>
33 namespace MoveGenerator {
37 using boost::property_tree::ptree;
48 assert( cd.
Check() &&
"CoreData not ok.");
55 m_normal_generator = cd.m_random_engine->GetGenerator(trng::normal_dist<double>(0.0, 1.0));
56 m_mc_step_x_scale = cd.m_parameters->get<
double>(
"cell_mechanics.mc_step_x_scale");
57 m_mc_step_y_scale = cd.m_parameters->get<
double>(
"cell_mechanics.mc_step_y_scale");
64 const double x = m_normal_generator() * m_mc_step_x_scale;
65 const double y = m_normal_generator() * m_mc_step_y_scale;
66 return std::array<double, 3>{{ x, y, 0.0 }};
70 std::function<double()> m_normal_generator;
71 double m_mc_step_x_scale;
72 double m_mc_step_y_scale;
78 #endif // end_of_include_guard
Core data with mesh, parameters, random engine and time data.
Core data used during model execution.
Namespace for miscellaneous utilities.
Interface of RandomEngine.
Namespace for components of the Default model group.
Namespace for the core simulator.
void Initialize(const CoreData &cd)
Initialize or re-initialize.
Move Generator with normal distribution and directional bias.
std::array< double, 3 > operator()()
Generate a random move.
DirectedNormal(const CoreData &cd)
Straight initialization.
bool Check() const
Verify all pointers non-null.