gaunt coeff generators mathematica
Former-commit-id: 43fb56d338faf193083035ab4ae4da115ca0bbaf
This commit is contained in:
parent
85ef4d7a70
commit
93ac5730b2
|
@ -36,17 +36,18 @@ int main() {
|
|||
qpms_l_t lMax = 8;
|
||||
//qpms_l_t viewlMax = 2;
|
||||
int npoints = 10;
|
||||
double sigma = 1.3;
|
||||
double sigma = 0.1;
|
||||
double shiftsigma = 2.;
|
||||
|
||||
cart3_t o2minuso1;
|
||||
o2minuso1.x = gsl_ran_gaussian(rng, sigma);
|
||||
o2minuso1.y = gsl_ran_gaussian(rng, sigma);
|
||||
o2minuso1.z = gsl_ran_gaussian(rng, sigma);
|
||||
o2minuso1.x = gsl_ran_gaussian(rng, shiftsigma);
|
||||
o2minuso1.y = gsl_ran_gaussian(rng, shiftsigma);
|
||||
o2minuso1.z = gsl_ran_gaussian(rng, shiftsigma);
|
||||
|
||||
cart3_t points[npoints];
|
||||
double relerrs[npoints];
|
||||
memset(points, 0, npoints * sizeof(cart3_t));
|
||||
points[0].x = points[1].y = points[2].z = 1.;
|
||||
points[0].x = points[1].y = points[2].z = sigma;
|
||||
double relerrthreshold = 1e-11;
|
||||
for (unsigned i = 3; i < npoints; ++i) {
|
||||
cart3_t *w = points+i;
|
||||
|
|
|
@ -6,13 +6,13 @@ gaunt[m_, n_, mu_, nu_,
|
|||
0}, {nu, 0}, {p, 0}] ThreeJSymbol[{n, m}, {nu,
|
||||
mu}, {p, -m - mu}]
|
||||
|
||||
lMax := 100
|
||||
lMax := 30
|
||||
For[n = 0, n <= lMax, n++,
|
||||
For[nu = 0, nu <= lMax, nu++,
|
||||
For[m = -n, m <= n, m++,
|
||||
For[mu = -nu, mu <= nu, mu++,
|
||||
For[q = 0, q <= Min[n, nu, (n + nu - Abs[m + mu])/2],q++,
|
||||
Print[StringForm["{`1`, `2`, `3`, `4`, `5`, `6`},",m,n,mu,nu,q,N[gaunt[m, n, mu, nu, n + nu - 2 q],32]]]
|
||||
Print[StringForm["{`1`, `2`, `3`, `4`, `5`, `6`},",m,n,mu,nu,q,CForm[N[gaunt[m, n, mu, nu, n + nu - 2 q],32]]]]
|
||||
]
|
||||
]
|
||||
]
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
gaunt[m_, n_, mu_, nu_,
|
||||
p_] := (-1)^(m + mu) (2 p + 1) Sqrt[
|
||||
Factorial[n + m] Factorial[
|
||||
nu + mu] Factorial[p - m - mu]/Factorial[n - m]/
|
||||
Factorial[nu - mu] / Factorial[p + m + mu]] ThreeJSymbol[{n,
|
||||
0}, {nu, 0}, {p, 0}] ThreeJSymbol[{n, m}, {nu,
|
||||
mu}, {p, -m - mu}]
|
||||
|
||||
lMax := 18
|
||||
For[n = 0, n <= lMax, n++,
|
||||
For[m = -n, m <= n, m++,
|
||||
For[nu = 0, nu <= lMax, nu++,
|
||||
For[mu = -nu, mu <= nu, mu++,
|
||||
For[q = 0, q <= Min[n, nu, (n + nu - Abs[m + mu])/2],q++,
|
||||
Print[CForm[N[gaunt[m, n, mu, nu, n + nu - 2 q],16]]]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
|
Loading…
Reference in New Issue