11 #include <unordered_map>
13 #include "gsl/gsl_sf_coupling.h"
23 const int j_c,
const int m_a,
24 const int m_b,
const int m_c) {
25 const double wigner_3j = gsl_sf_coupling_3j(j_a, j_b, j_c, m_a, m_b, -m_c);
29 assert((j_a - j_b + m_c) % 2 == 0);
30 const int j = (j_a - j_b + m_c) / 2;
31 double result = std::sqrt(j_c + 1) * wigner_3j;
32 result *= (j % 2 == 0) * 2 - 1;
35 " IR: ", j_c,
" iz1: ", m_a,
" iz2: ", m_b,
42 const int m_a,
const int m_b,
const int m_c) {
43 const ThreeSpins spin_information = {j_a, j_b, j_c, m_a, m_b, m_c};
46 return search->second;
static std::unordered_map< ThreeSpins, double, ThreeSpinHash > lookup_table
Tabulation of Clebsch-Gordan coefficients.
static double coefficient(const int j_a, const int j_b, const int j_c, const int m_a, const int m_b, const int m_c)
Check in the Clebsch-Gordan lookup table if the requested coefficient is available.
static double calculate_coefficient(const int j_a, const int j_b, const int j_c, const int m_a, const int m_b, const int m_c)
Calculate Clebsch-Gordan coefficient .
Collection of useful constants that are known at compile time.
std::array< einhard::Logger<>, std::tuple_size< LogArea::AreaTuple >::value > logg
An array that stores all pre-configured Logger objects.
static constexpr int LResonances
constexpr double really_small
Numerical error tolerance.
Auxiliary struct to be used as key in the look up table of Clebsch-Gordan coefficients.