Skip to content
patch-rmmdiis.diff 1.56 KiB
Newer Older
commit 761cba649d58e2d2f24c0a1e2fdad917b5929679
Author: Martti Louhivuori <martti.louhivuori@csc.fi>
Date:   Thu May 18 10:56:07 2017 +0300

    Remove obsolete error calculation from DIIS step

diff --git a/gpaw/eigensolvers/rmmdiis.py b/gpaw/eigensolvers/rmmdiis.py
index 7d60553..d182713 100644
--- a/gpaw/eigensolvers/rmmdiis.py
+++ b/gpaw/eigensolvers/rmmdiis.py
@@ -299,23 +299,6 @@ class RMMDIIS(Eigensolver):
                                              P_axi, kpt.eps_n[n_x], R_xG, n_x,
                                              calculate_change=True)
                     self.timer.stop('Calculate residuals')
-                    self.timer.start('Calculate errors')
-                    errors_new_x = np.zeros(B)
-                    # errors_x[:] = 0.0
-                    for n in range(n1, n2):
-                        if kpt.f_n is None:
-                            weight = kpt.weight
-                        else:
-                            weight = kpt.f_n[n]
-                        if self.nbands_converge != 'occupied':
-                            if wfs.bd.global_index(n) < self.nbands_converge:
-                                weight = kpt.weight
-                            else:
-                                weight = 0.0
-                        errors_new_x[n-n1] += weight * integrate(R_xG[n - n1],
-                                                                 R_xG[n - n1])
-                    comm.sum(errors_x)
-                    self.timer.stop('Calculate errors')
 
             self.timer.stop('DIIS step')
             # Final trial step