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

Minor changes

This commit is contained in:
Anthony Scemama 2019-01-15 15:18:01 +01:00
parent 881db3a586
commit e250864a19
3 changed files with 4 additions and 4 deletions

View File

@ -262,13 +262,13 @@ let of_basis_parallel basis =
let t0 = Unix.gettimeofday () in let t0 = Unix.gettimeofday () in
let ishell = ref 0 in let ishell = ref max_int in
let input_stream = Stream.of_list (List.rev shell_pairs) in let input_stream = Stream.of_list (List.rev shell_pairs) in
let f shell_p = let f shell_p =
let () = let () =
if Parallel.rank < 2 && Cs.index (Csp.shell_a shell_p) > !ishell then if Parallel.rank < 2 && Cs.index (Csp.shell_a shell_p) < !ishell then
(ishell := Cs.index (Csp.shell_a shell_p) ; print_int !ishell ; print_newline ()) (ishell := Cs.index (Csp.shell_a shell_p) ; print_int !ishell ; print_newline ())
in in

View File

@ -5,7 +5,7 @@ At iteration {% $m$ %}, one has:
- {% $\mathbf{p}_m$ %}, a vector of parameters - {% $\mathbf{p}_m$ %}, a vector of parameters
- {% $\mathbf{e}_m$ %}, an approximate error vector - {% $\mathbf{e}_m$ %}, an approximate error vector
The DIIS approximate solution for iteration $m+1$ is given by The DIIS approximate solution for iteration {% $m+1$ %} is given by
{% \begin{align*} {% \begin{align*}
\mathbf{p}_{m+1} & = \sum_{i=1}^m c_i (\mathbf{p}^f + \mathbf{e}_i) \\ \mathbf{p}_{m+1} & = \sum_{i=1}^m c_i (\mathbf{p}^f + \mathbf{e}_i) \\

View File

@ -20,7 +20,7 @@ let key_of_indices ~r1 ~r2 =
let f i k = let f i k =
let p, r = let p, r =
if i <= k then i, k else k, i if i <= k then i, k else k, i
in p+ (r*r-r)/2 in p + (r*(r-1))/2
in in
let p = f i k and q = f j l in let p = f i k and q = f j l in
f p q f p q