📣 An issue occured with the embedded container registry on October 25 2021, between 10:30 and 12:10 (UTC+2). Any persisting issues should be reported to CC-IN2P3 Support. 🐛

Commit c1ffb0f8 authored by Jean-Eric Campagne's avatar Jean-Eric Campagne
Browse files

(JEC) 18/1/16 take l-limit into account when spin =/= 0

parent fd6e740e
......@@ -294,16 +294,16 @@ void MultiSphericalLaguerreTransform() {
//---------------------------------------
void SpinMultiSphericalLaguerreTransform() {
r_8 alpha = param.alpha; //JEC 13/1/16
r_8 alpha = param.alpha;
int Nmax = param.N;
int Lmax = param.Lmax;
r_8 Rmax = param.R;
string geometry = param.geometry;
int ntheta = param.ntheta;
int nphi = param.nphi;
int spin = param.spin;
int spin = param.spin; //JEC 18/1/16
cout << " ___________ MultiSphericalLaguerreTransform TEST _____________ " << endl;
cout << " ___________ SpinMultiSphericalLaguerreTransform TEST _____________ " << endl;
tstack_push("data input");
......@@ -336,15 +336,16 @@ void SpinMultiSphericalLaguerreTransform() {
vector< complex<r_8> > ElmnOrig(Ntot);
vector< complex<r_8> > BlmnOrig(Ntot);
int id=-1;
for(int n=0;n<Nmax;n++){ //on each shell
for(int m=0;m<Lmax;m++){ //Warning the filling of alm is adapted for libsharp memory
for(int l=m;l<Lmax;l++){
id++;
r_8 rv = drand(-1,1,&state);
r_8 iv = (m==0) ? 0.0 : drand(-1,1,&state);
r_8 rv = (l<abs(spin)) ? 0.0 : drand(-1,1,&state);
r_8 iv = (m==0 || l<abs(spin)) ? 0.0 : drand(-1,1,&state);
ElmnOrig[id] = complex<r_8>(rv,iv);
rv = drand(-1,1,&state);
iv = (m==0) ? 0.0 : drand(-1,1,&state);
rv = (l<abs(spin)) ? 0.0 : drand(-1,1,&state);
iv = (m==0 || l<abs(spin)) ? 0.0 : drand(-1,1,&state);
BlmnOrig[id] = complex<r_8>(rv,iv);
}//end l-loop
}//end m-loop
......@@ -369,11 +370,11 @@ void SpinMultiSphericalLaguerreTransform() {
vector< complex<r_8> > Blmk;
sphlagtrans.Synthesis(ElmnOrig, BlmnOrig, spin, fijk_re, fijk_im, Elmk, Blmk);
//#if DEBUG >= 2
#if DEBUG >= 2
for (int i=0; i<NpTot; i++){
cout << "fijk("<<i<<"): " << fijk_re[i] << ", " << fijk_im[i] << endl;
}
//#endif
#endif
tstack_pop("processing part Synthesis");
tstack_push("processing part Analysis");
......@@ -399,7 +400,7 @@ void SpinMultiSphericalLaguerreTransform() {
r_8 err_rel(0.);
int imax = -1;
for(int i=0;i<Ntot;i++){
if(i>(Ntot-9)) {
if(i<100) {
cout << "(" << i << ") : Elnm Orig " << ElmnOrig[i] << " <-> Elmn Rec " << Elmn[i] << endl;
cout << "............ Blnm Orig " << BlmnOrig[i] << " <-> Blmn Rec " << Blmn[i] << endl;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment