1 #ifndef SIMPT_DEFAULT_MOVE_GEN_DIRECTED_UNIFORM_H_INCLUDED
2 #define SIMPT_DEFAULT_MOVE_GEN_DIRECTED_UNIFORM_H_INCLUDED
26 #include <boost/property_tree/ptree.hpp>
27 #include <trng/uniform_dist.hpp>
32 namespace MoveGenerator {
36 using boost::property_tree::ptree;
47 assert( cd.
Check() &&
"CoreData not ok.");
54 m_uniform_generator = cd.m_random_engine->GetGenerator(trng::uniform_dist<double>(-1.0e0, 1.0e0));
55 m_mc_step_x_scale = cd.m_parameters->get<
double>(
"cell_mechanics.mc_step_x_scale");
56 m_mc_step_y_scale = cd.m_parameters->get<
double>(
"cell_mechanics.mc_step_y_scale");
63 const double x = m_uniform_generator() * m_mc_step_x_scale;
64 const double y = m_uniform_generator() * m_mc_step_y_scale;
65 return std::array<double, 3>{{ x, y, 0.0 }};
69 std::function<double()> m_uniform_generator;
70 double m_mc_step_x_scale;
71 double m_mc_step_y_scale;
77 #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.
std::array< double, 3 > operator()()
Generate a random move.
Move Generator with uniform distribution and directional bias.
DirectedUniform(const CoreData &cd)
Straight initialization.
void Initialize(const CoreData &cd)
Initialize or re-initialize.
bool Check() const
Verify all pointers non-null.