Files
cpp/src/motions/tetrahedral.h
Dominik Demuth 1c8befac3f added flexibility
2024-11-28 11:07:44 +01:00

29 lines
571 B
C++

#ifndef RWSIM_MOTIONTETRAHEDRAL_H
#define RWSIM_MOTIONTETRAHEDRAL_H
#include "base.h"
#include <random>
#include <cmath>
#include <array>
class TetrahedralJump final : public Motion {
public:
TetrahedralJump(double, double, std::mt19937_64&);
explicit TetrahedralJump(std::mt19937_64&);
void initialize() override;
double jump() override;
private:
const double m_beta{std::acos(-1/3.)};
std::array<double, 4> m_corners{};
int m_corner_idx{0};
std::uniform_int_distribution<> m_chooser{1, 3};
};
#endif //RWSIM_MOTIONTETRAHEDRAL_H