11 constexpr Index idl = 2;
12 Index Ldeb = std::max(std::abs(jji-jjip), std::abs(jjf-jjfp));
13 if ((Ldeb % idl) not_eq 0) Ldeb += 1;
14 const Index Lfin = std::min(jji+jjip, jjf+jjfp);
17 for (
Index L=Ldeb; L <= Lfin; L+=idl) {
19 const Numeric SS=RJ*QL[L]/ECS[L];
20 RJ =
wigner3j(jjf, jjfp, L, lf, -lf, 0);
21 som += RJ*SS*
wigner6j(jji, jjf, 1, jjfp, jjip, L);
30 constexpr Index Jmax = 128;
31 constexpr Index nRmx = 4 * Jmax;
32 constexpr Index lmax = 4 * Jmax;
33 constexpr std::array typerf{
'P',
'Q',
'R'};
40 for (
Index ll=0; ll<=8; ll++) {
41 for (
Index Deltal : {0, 1}) {
43 const Index lf = ll + Deltal;
47 for (
Index itemp=0; itemp<8; itemp++) {
48 const auto temp =
Numeric(180 + 20 * itemp);
50 Tensor3 Wipert(nRmx, nRmx, 2, 0.0);
52 for (
Index ipp=0; ipp<2; ipp++) {
55 const Index iPert = 2 + ipp;
56 const std::array amasse{4., 40., 28., 32.};
57 const std::array aa{35.46e-3, 19.39e-3, 0.0180*std::pow(T0/temp, 0.85), 0.0168*std::pow(T0/temp, 0.5)};
58 const std::array alc{0.53, 3.0, 2.2, 2.4};
59 const std::array alp{1.062, 0.848, 0.81*std::pow(T0/temp, 0.0152), 0.82*std::pow(T0/temp, -0.0910)};
60 const std::array bbet{0., 0.02, 0.008, 0.007};
61 const std::array dx{0.0, aa[iPert], alc[iPert], alp[iPert], bbet[iPert]};
66 const Numeric AM = 1./(1./amasse[iPert]+1./44.);
67 const Numeric ECT = 0.0006983*AM*dx[2]*dx[2]/temp;
71 constexpr Index idl = 2;
73 const Numeric betaa = 1.4388 * brot / temp;
74 for (
Index L=1; L <= lmax; L++) {
76 ECS[L] =
FECS(QMX, ECT);
77 const auto AL2 =
Numeric(L*L+L);
78 const Numeric SL0 = AT/std::pow(AL2, dx[3])*std::exp(-betaa*dx[4]*AL2);
84 for (
Index ibid=3; ibid>=1; ibid--) {
85 const Index itypeR = (ibid % 3) - 1;
86 if (li == 0 and lf == 0 and itypeR == 0)
continue;
87 for (
Index jji=0; jji<=Jmax; jji++) {
88 Index jjf = jji + itypeR;
89 if (jji >= li and jjf >= lf) {
93 typeR[nraies] = typerf[itypeR];
99 for (
Index iR=0; iR<=nraies; iR++) {
100 const Index jji = ji[iR];
101 const Index jjf = jf[iR];
102 for (
Index iRp=0; iRp<=nraies; iRp++) {
103 const Index jjip = ji[iRp];
104 const Index jjfp = jf[iRp];
105 if (jjip > jji)
continue;
112 for (
Index iR=0; iR<=nraies; iR++) {
113 for (
Index iRp=0; iRp<=nraies; iRp++) {
114 W(iRp, iR, itemp) = 0.79*Wipert(iRp,iR,0)+0.21*Wipert(iRp,iR,1);
119 std::ostringstream os;
120 os <<
"Wtype" << li << lf <<
"p.dat";
121 std::ofstream fil(os.str());
122 for (
Index iR=0; iR<=nraies; iR++) {
123 for (
Index iRp=0; iRp<=nraies; iRp++) {
124 if(ji[iRp] > ji[iR])
continue;
129 " %0.12E %0.12E %0.12E %0.12E %0.12E %0.12E %0.12E %0.12E %" PRId64
130 " %" PRId64
" %" PRId64
" %" PRId64
"\n",
147 std::cout <<
"Done with file: " << os.str() <<
'\n';
base max(const Array< base > &x)
Max function.
base min(const Array< base > &x)
Min function.
Numeric relaxation_matrix_element(const Index li, const Index lf, const Index jji, const Index jjf, const Index jjip, const Index jjfp, const Vector &ECS, const Vector &QL)
constexpr Numeric FECS(Numeric OMGA, Numeric EC) noexcept
Implementation of Matrix, Vector, and such stuff.
NUMERIC Numeric
The type to use for all floating point numbers.
INDEX Index
The type to use for all integer numbers and indices.
Numeric wigner6j(const Rational j1, const Rational j2, const Rational j3, const Rational l1, const Rational l2, const Rational l3)
Wigner 6J symbol.
Index make_wigner_ready(int largest, int fastest, int size)
Ready Wigner.
Numeric wigner3j(const Rational j1, const Rational j2, const Rational j3, const Rational m1, const Rational m2, const Rational m3)
Wigner 3J symbol.
Wigner symbol interactions.