10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-23 12:55:37 +01:00

Fixed out of bound

This commit is contained in:
Anthony Scemama 2021-04-17 10:36:49 +02:00
parent 484ee028da
commit 848ba6bfce

View File

@ -38,7 +38,11 @@
endif endif
ncfg = ncfgpersomo - ncfgprev ncfg = ncfgpersomo - ncfgprev
!detDimperBF = max(1,nint((binom(i,(i+1)/2)))) !detDimperBF = max(1,nint((binom(i,(i+1)/2))))
if (i > 2) then
dimcsfpercfg = max(1,nint((binom(i-2,(i-2+1)/2)-binom(i-2,((i-2+1)/2)+1)))) dimcsfpercfg = max(1,nint((binom(i-2,(i-2+1)/2)-binom(i-2,((i-2+1)/2)+1))))
else
dimcsfpercfg = 1
endif
n_CSF += ncfg * dimcsfpercfg n_CSF += ncfg * dimcsfpercfg
!if(cfg_seniority_index(i+2) == -1) EXIT !if(cfg_seniority_index(i+2) == -1) EXIT
!if(detDimperBF > maxDetDimPerBF) maxDetDimPerBF = detDimperBF !if(detDimperBF > maxDetDimPerBF) maxDetDimPerBF = detDimperBF