Xped
Loading...
Searching...
No Matches
SU2Wrappers.hpp
Go to the documentation of this file.
1#ifndef SU2WRAPPERS_H_
2#define SU2WRAPPERS_H_
3
4// As the default libraries for the 3nj-symbols, we use the GSL (Gnu scientific library):
5#if !defined XPED_USE_WIG_SU2_COEFFS && !defined XPED_USE_WIG_SU2_COEFFS && !defined XPED_USE_FAST_WIG_SU2_COEFFS
6# define XPED_USE_GSL_SU2_COEFFS 1
7#endif
8
10#ifdef XPED_USE_GSL_SU2_COEFFS
11# include <gsl/gsl_sf_coupling.h>
12#endif
13
14#ifdef XPED_USE_WIG_SU2_COEFFS
15# include "wigxjpf.h"
16# pragma message("Xped is using WIGXJPF library for 3nj-symbols.")
17#endif
18
19#ifdef XPED_USE_FAST_WIG_SU2_COEFFS
20# include "fastwigxj.h"
21# include "wigxjpf.h"
22# pragma message("Xped is using FASTWIGXJ library for 3nj-symbols.")
23#endif
25
66#ifdef XPED_USE_GSL_SU2_COEFFS
67inline double
68coupl_9j_base(const int q1, const int q2, const int q3, const int q4, const int q5, const int q6, const int q7, const int q8, const int q9)
69{
70 return gsl_sf_coupling_9j(q1 - 1, q2 - 1, q3 - 1, q4 - 1, q5 - 1, q6 - 1, q7 - 1, q8 - 1, q9 - 1);
71}
72
73inline double coupl_6j_base(const int q1, const int q2, const int q3, const int q4, const int q5, const int q6)
74{
75 return gsl_sf_coupling_6j(q1 - 1, q2 - 1, q3 - 1, q4 - 1, q5 - 1, q6 - 1);
76}
77
78inline double coupl_3j_base(const int q1, const int q2, const int q3, const int q1_z, const int q2_z, const int q3_z)
79{
80 return gsl_sf_coupling_3j(q1 - 1, q2 - 1, q3 - 1, q1_z, q2_z, q3_z);
81}
82#endif // XPED_USE_GSL_SU2_COEFFS
83
84#ifdef XPED_USE_WIG_SU2_COEFFS
85inline double
86coupl_9j_base(const int q1, const int q2, const int q3, const int q4, const int q5, const int q6, const int q7, const int q8, const int q9)
87{
88 return wig9jj(q1 - 1, q2 - 1, q3 - 1, q4 - 1, q5 - 1, q6 - 1, q7 - 1, q8 - 1, q9 - 1);
89}
90
91inline double coupl_6j_base(const int q1, const int q2, const int q3, const int q4, const int q5, const int q6)
92{
93 return wig6jj(q1 - 1, q2 - 1, q3 - 1, q4 - 1, q5 - 1, q6 - 1);
94}
95
96inline double coupl_3j_base(const int q1, const int q2, const int q3, const int q1_z, const int q2_z, const int q3_z)
97{
98 return wig3jj(q1 - 1, q2 - 1, q3 - 1, q1_z, q2_z, q3_z);
99}
100#endif // XPED_USE_WIG_SU2_COEFFS
101
104#ifdef XPED_USE_FAST_WIG_SU2_COEFFS
105inline double
106coupl_9j_base(const int q1, const int q2, const int q3, const int q4, const int q5, const int q6, const int q7, const int q8, const int q9)
107{
108 return fw9jja(q1 - 1, q2 - 1, q3 - 1, q4 - 1, q5 - 1, q6 - 1, q7 - 1, q8 - 1, q9 - 1);
109}
110
111inline double coupl_6j_base(const int q1, const int q2, const int q3, const int q4, const int q5, const int q6)
112{
113 return fw6jja(q1 - 1, q2 - 1, q3 - 1, q4 - 1, q5 - 1, q6 - 1);
114}
115
116inline double coupl_3j_base(const int q1, const int q2, const int q3, const int q1_z, const int q2_z, const int q3_z)
117{
118 return fw3jja(q1 - 1, q2 - 1, q3 - 1, q1_z, q2_z);
119}
120#endif // XPED_USE_FAST_WIG_SU2_COEFFS
121
122inline double
123coupling_9j(const int q1, const int q2, const int q3, const int q4, const int q5, const int q6, const int q7, const int q8, const int q9)
124{
125 return coupl_9j_base(q1, q2, q3, q4, q5, q6, q7, q8, q9);
126}
127
128inline double coupling_6j(const int q1, const int q2, const int q3, const int q4, const int q5, const int q6)
129{
130 return coupl_6j_base(q1, q2, q3, q4, q5, q6);
131}
132
133inline double coupling_3j(const int q1, const int q2, const int q3, const int q1_z, const int q2_z, const int q3_z)
134{
135 return coupl_3j_base(q1, q2, q3, q1_z, q2_z, q3_z);
136}
137
138#endif
double coupl_6j_base(const int q1, const int q2, const int q3, const int q4, const int q5, const int q6)
Definition: SU2Wrappers.hpp:73
double coupl_3j_base(const int q1, const int q2, const int q3, const int q1_z, const int q2_z, const int q3_z)
Definition: SU2Wrappers.hpp:78
double coupling_9j(const int q1, const int q2, const int q3, const int q4, const int q5, const int q6, const int q7, const int q8, const int q9)
Definition: SU2Wrappers.hpp:123
double coupling_3j(const int q1, const int q2, const int q3, const int q1_z, const int q2_z, const int q3_z)
Definition: SU2Wrappers.hpp:133
double coupling_6j(const int q1, const int q2, const int q3, const int q4, const int q5, const int q6)
Definition: SU2Wrappers.hpp:128
double coupl_9j_base(const int q1, const int q2, const int q3, const int q4, const int q5, const int q6, const int q7, const int q8, const int q9)
Definition: SU2Wrappers.hpp:68