mirror of
https://gitlab.com/scemama/QCaml.git
synced 2025-01-03 10:05:40 +01:00
Using less memory
This commit is contained in:
parent
a976bacfdf
commit
355aa9f166
31
CI/CI.ml
31
CI/CI.ml
@ -54,17 +54,6 @@ let make det_space =
|
|||||||
let det = Ds.determinants det_space in
|
let det = Ds.determinants det_space in
|
||||||
let mo_basis = Ds.mo_basis det_space in
|
let mo_basis = Ds.mo_basis det_space in
|
||||||
|
|
||||||
let m_H = lazy (
|
|
||||||
Array.init ndet (fun i -> let ki = det.(i) in
|
|
||||||
Vec.init ndet (fun j -> let kj = det.(j-1) in
|
|
||||||
h_ij mo_basis ki kj
|
|
||||||
)
|
|
||||||
|> Vector.sparse_of_vec
|
|
||||||
)
|
|
||||||
|> Matrix.sparse_of_vector_array
|
|
||||||
)
|
|
||||||
in
|
|
||||||
|
|
||||||
|
|
||||||
(*
|
(*
|
||||||
let m_H = lazy (
|
let m_H = lazy (
|
||||||
@ -124,13 +113,23 @@ let make det_space =
|
|||||||
Parallel.broadcast (lazy h)
|
Parallel.broadcast (lazy h)
|
||||||
) in
|
) in
|
||||||
*)
|
*)
|
||||||
let m_S2 = lazy (
|
|
||||||
|
|
||||||
|
let m_H = lazy (
|
||||||
|
let v = Vec.make0 ndet in
|
||||||
Array.init ndet (fun i -> let ki = det.(i) in
|
Array.init ndet (fun i -> let ki = det.(i) in
|
||||||
Vec.init ndet (fun j -> let kj = det.(j-1) in
|
Array.iteri (fun j kj ->
|
||||||
CIMatrixElement.make_s2 ki kj
|
v.{j+1} <- h_ij mo_basis ki kj) det;
|
||||||
)
|
Vector.sparse_of_vec v)
|
||||||
|> Vector.sparse_of_vec
|
|> Matrix.sparse_of_vector_array
|
||||||
)
|
)
|
||||||
|
in
|
||||||
|
let m_S2 = lazy (
|
||||||
|
let v = Vec.make0 ndet in
|
||||||
|
Array.init ndet (fun i -> let ki = det.(i) in
|
||||||
|
Array.iteri (fun j kj ->
|
||||||
|
v.{j+1} <- CIMatrixElement.make_s2 ki kj) det;
|
||||||
|
Vector.sparse_of_vec v)
|
||||||
|> Matrix.sparse_of_vector_array
|
|> Matrix.sparse_of_vector_array
|
||||||
)
|
)
|
||||||
in
|
in
|
||||||
|
Loading…
Reference in New Issue
Block a user