cpp/motions/tetrahedral.cpp
2024-08-18 13:21:27 +02:00

55 lines
2.0 KiB
C++

//
// Created by dominik on 8/16/24.
//
#include <random>
#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 [cos_theta, phi] = draw_position();
//
// m_corners[0] = omega_q(cos_theta, phi);
//
// const double alpha = 2. * M_PI * m_uni_dist(m_rng);
// std::cout << alpha << std::endl;
// v1[0] = sin(phi0)*sin(teta0);
// v2[0] = cos(phi0)*sin(teta0);
// v3[0] = cos(teta0);
//
// abs = v1[0]*v1[0]+v2[0]*v2[0]+v3[0]*v3[0]; // Normalization
// v1[0] = v1[0]/abs;
// v2[0] = v2[0]/abs;
// v3[0] = v3[0]/abs;
//
// /*Calculating the components of the other orientationts. Compare Master Thesis M. Sattig,corrected Version (Share/Abschlussarbeiten)*/
// norm = sqrt(1 - v3[0]*v3[0])+1E-12;
// normI = 1.0/(norm);
//
// cosgama = cos(delta0);
// singama = sin(delta0);
// v1[1] = v1[0]*cosBETA + sinBETA*normI*(-v1[0]*v3[0]*singama - v2[0]*cosgama);
// v2[1] = v2[0]*cosBETA + sinBETA*normI*(-v2[0]*v3[0]*singama + v1[0]*cosgama);
// v3[1] = v3[0]*cosBETA + sinBETA*norm*singama;
//
// cosgama = cos(gama + delta0);
// singama = sin(gama + delta0);
// v1[2] = v1[0]*cosBETA + sinBETA*normI*(-v1[0]*v3[0]*singama - v2[0]*cosgama);
// v2[2] = v2[0]*cosBETA + sinBETA*normI*(-v2[0]*v3[0]*singama + v1[0]*cosgama);
// v3[2] = v3[0]*cosBETA + sinBETA*norm*singama;
//
// cosgama = cos(2.0*gama + delta0);
// singama = sin(2.0*gama + delta0);
// v1[3] = v1[0]*cosBETA + sinBETA*normI*(-v1[0]*v3[0]*singama - v2[0]*cosgama);
// v2[3] = v2[0]*cosBETA + sinBETA*normI*(-v2[0]*v3[0]*singama + v1[0]*cosgama);
// v3[3] = v3[0]*cosBETA + sinBETA*norm*singama;
}
double TetrahedralJump::jump() {
return 0.;
}