From 122cb658cdec91ce33aec0977567fde15b87eda8 Mon Sep 17 00:00:00 2001 From: edoapra Date: Tue, 14 Jan 2025 16:49:18 -0800 Subject: [PATCH] speed up getNxyz --- src/NWints/int/getNxyz.F | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/NWints/int/getNxyz.F b/src/NWints/int/getNxyz.F index ed4a1ae4f3..355a8064f2 100644 --- a/src/NWints/int/getNxyz.F +++ b/src/NWints/int/getNxyz.F @@ -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)