mirror of
https://gitlab.com/scemama/QCaml.git
synced 2024-08-30 00:03:42 +02:00
Accelerated direct FCI
This commit is contained in:
parent
5e399dac44
commit
c2ead899d9
12
CI/CI.ml
12
CI/CI.ml
@ -399,12 +399,14 @@ let create_matrix_spin_computed f det_space =
|
|||||||
let h123_prev = ref (fun _ -> 0.) in
|
let h123_prev = ref (fun _ -> 0.) in
|
||||||
let j_a = ref (-n_alfa) in
|
let j_a = ref (-n_alfa) in
|
||||||
let j_alfa_prev = ref (-10) in
|
let j_alfa_prev = ref (-10) in
|
||||||
|
let j0 = ref (!j_a * n_beta) in
|
||||||
result := fun j ->
|
result := fun j ->
|
||||||
let j0 = !j_a * n_beta in
|
if j > !j0 + n_beta
|
||||||
if j > j0 + n_beta
|
|| j < !j0
|
||||||
|| j < j0
|
then begin
|
||||||
then
|
|
||||||
j_a := (j-1)/n_beta;
|
j_a := (j-1)/n_beta;
|
||||||
|
j0 := !j_a * n_beta
|
||||||
|
end;
|
||||||
let j_alfa = !j_a + 1 in
|
let j_alfa = !j_a + 1 in
|
||||||
let h123 =
|
let h123 =
|
||||||
if j_alfa <> !j_alfa_prev then
|
if j_alfa <> !j_alfa_prev then
|
||||||
@ -414,7 +416,7 @@ let create_matrix_spin_computed f det_space =
|
|||||||
end;
|
end;
|
||||||
!h123_prev
|
!h123_prev
|
||||||
in
|
in
|
||||||
let j_beta = j - !j_a*n_beta in
|
let j_beta = j - !j0 in
|
||||||
h123 (j_beta-1)
|
h123 (j_beta-1)
|
||||||
end;
|
end;
|
||||||
!result
|
!result
|
||||||
|
@ -17,7 +17,7 @@ ALL_EXE=$(ALL_BYTE) $(ALL_NATIVE)
|
|||||||
.PHONY: default doc
|
.PHONY: default doc
|
||||||
|
|
||||||
|
|
||||||
default: $(ALL_EXE) doc
|
default: $(ALL_EXE)
|
||||||
|
|
||||||
tests: run_tests.native
|
tests: run_tests.native
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user