mirror of
https://gitlab.com/scemama/QCaml.git
synced 2025-01-03 01:55:40 +01:00
Optimizations swap
This commit is contained in:
parent
9262688642
commit
b0a6353ade
21
Basis/ERI.ml
21
Basis/ERI.ml
@ -89,12 +89,22 @@ let to_file ~filename basis =
|
||||
let
|
||||
shell_q = shell_pairs.(k).(l)
|
||||
in
|
||||
let swap =
|
||||
Array.length shell_q < Array.length shell_p
|
||||
in
|
||||
|
||||
(* Compute all the integrals of the class *)
|
||||
let cls =
|
||||
if Array.length shell_q < 2 then
|
||||
contracted_class_shell_pairs ~schwartz_p ~schwartz_q shell_p shell_q
|
||||
if swap then
|
||||
if Array.length shell_p < 2 then
|
||||
contracted_class_shell_pairs ~schwartz_p:schwartz_q ~schwartz_q:schwartz_p shell_q shell_p
|
||||
else
|
||||
contracted_class_shell_pairs_vec ~schwartz_p:schwartz_q ~schwartz_q:schwartz_p shell_q shell_p
|
||||
else
|
||||
contracted_class_shell_pairs_vec ~schwartz_p ~schwartz_q shell_p shell_q
|
||||
if Array.length shell_q < 2 then
|
||||
contracted_class_shell_pairs ~schwartz_p ~schwartz_q shell_p shell_q
|
||||
else
|
||||
contracted_class_shell_pairs_vec ~schwartz_p ~schwartz_q shell_p shell_q
|
||||
in
|
||||
|
||||
(* Write the data in the output file *)
|
||||
@ -111,7 +121,10 @@ let to_file ~filename basis =
|
||||
let l_c = basis.(l).Contracted_shell.indice + l_c + 1 in
|
||||
let xl = to_int_tuple powers_l in
|
||||
let key =
|
||||
Zkey.of_int_tuple (Zkey.Twelve (xi,xj,xk,xl))
|
||||
if swap then
|
||||
Zkey.of_int_tuple (Zkey.Twelve (xk,xl,xi,xj))
|
||||
else
|
||||
Zkey.of_int_tuple (Zkey.Twelve (xi,xj,xk,xl))
|
||||
in
|
||||
let value =
|
||||
Zmap.find cls key
|
||||
|
Loading…
Reference in New Issue
Block a user