131 unsigned int LMAX=coefficientsA.
getLMax();
134 for (
unsigned int L=0;L<=2*LMAX;L++) {
135 for (
int M=-L; M<=int(L); M++) {
136 coefficientsASq(L,M)=0.0;
137 for (
unsigned int l1=0;l1<=LMAX;l1++) {
138 for (
unsigned int l2=0;l2<=LMAX;l2++) {
139 for (
int m1=-l1;m1<=int(l1);m1++) {
140 for (
int m2=-l2;m2<=int(l2);m2++) {
142 if (((l1+l2) >= L) && abs(l1-l2) <=
int(L)) {
143 coefficientsASq(L,M) += (coefficientsA(l1,m1)*
144 conj(coefficientsA(l2,m2))*
146 sqrt((2*l1+1)*(2*l2+1)/(4*M_PI*(2*L+1)))*
147 clebschGordan(l1,l2,0,0,L,0)*clebschGordan(l1,l2,m1,-m2,L,M));
156 return coefficientsASq;