speed up getNxyz

This commit is contained in:
edoapra 2025-01-14 16:49:18 -08:00
parent 2e90dec4ad
commit 122cb658cd
No known key found for this signature in database
GPG key ID: 9E6A0B70826967BA

View file

@ -48,7 +48,17 @@ c Define the angular momentum indices for the given shell component.
if( lambda.le.linit )then
#endif
nc = (lambda*(lambda+1)*(lambda+2))/6 + ic
if(lambda.eq.0) then
nc=ic
elseif(lambda.eq.1) then
nc=ic+1
elseif(lambda.eq.2) then
nc=ic+4
elseif(lambda.eq.3) then
nc=ic+10
else
nc = (lambda*(lambda+1)*(lambda+2))/6 + ic
endif
Nxyz(1) = Ixyz(1,nc)
Nxyz(2) = Ixyz(2,nc)
Nxyz(3) = Ixyz(3,nc)