// // Created by dominik on 8/16/24. // #include #include "tetrahedral.h" TetrahedralJump::TetrahedralJump(const double delta, const double eta, std::mt19937_64& rng) : Motion(std::string{"TetrahedralJump"}, delta, eta, rng) {} TetrahedralJump::TetrahedralJump(std::mt19937_64& rng) : Motion(std::string{"TetrahedralJump"}, rng) {} void TetrahedralJump::initialize() { const auto pos = draw_position(); m_corners[0] = omega_q(pos); const double alpha = 2. * M_PI * m_uni_dist(m_rng); 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]; }