"Exact" gaunt coefficients with mathematic

Former-commit-id: 412f86320710acb3d6a3edfb2e560c09b4371976
This commit is contained in:
Marek Nečada 2018-02-12 19:58:06 +00:00
parent 1a95827149
commit d406b8abb1
1 changed files with 21 additions and 0 deletions

21
tests/gauntgen.m Normal file
View File

@ -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 := 100
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]]]
]
]
]
]
]