// // Created by dominik on 8/16/24. // #include #include "tetrahedral.h" TetrahedralJump::TetrahedralJump(const double delta, const double eta, std::mt19937_64& rng) : Motion(delta, eta, rng) {} TetrahedralJump::TetrahedralJump(std::mt19937_64& rng) : Motion(rng) {} void TetrahedralJump::initialize() { // const auto pos = SphericalPos{0., 0}; const auto pos = draw_position(); m_corners[0] = omega_q(pos); const double alpha = 2. * M_PI * m_uni_dist(m_rng); // const double alpha = 0.; for (int i = 1; i<4; i++) { auto corner_pos = rotate(pos, m_beta, alpha + (i-1) * 2*M_PI/3.); m_corners[i] = omega_q(corner_pos); } } double TetrahedralJump::jump() { m_corner_idx += m_chooser(m_rng); m_corner_idx %= 4; return m_corners[m_corner_idx]; }