10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-12-22 12:23:31 +01:00

Accelerated direct FCI

This commit is contained in:
Anthony Scemama 2019-04-03 22:27:41 +02:00
parent 5e399dac44
commit c2ead899d9
2 changed files with 8 additions and 6 deletions

View File

@ -399,12 +399,14 @@ let create_matrix_spin_computed f det_space =
let h123_prev = ref (fun _ -> 0.) in
let j_a = ref (-n_alfa) in
let j_alfa_prev = ref (-10) in
let j0 = ref (!j_a * n_beta) in
result := fun j ->
let j0 = !j_a * n_beta in
if j > j0 + n_beta
|| j < j0
then
if j > !j0 + n_beta
|| j < !j0
then begin
j_a := (j-1)/n_beta;
j0 := !j_a * n_beta
end;
let j_alfa = !j_a + 1 in
let h123 =
if j_alfa <> !j_alfa_prev then
@ -414,7 +416,7 @@ let create_matrix_spin_computed f det_space =
end;
!h123_prev
in
let j_beta = j - !j_a*n_beta in
let j_beta = j - !j0 in
h123 (j_beta-1)
end;
!result

View File

@ -17,7 +17,7 @@ ALL_EXE=$(ALL_BYTE) $(ALL_NATIVE)
.PHONY: default doc
default: $(ALL_EXE) doc
default: $(ALL_EXE)
tests: run_tests.native