Commit c88ee608 authored by Martin Reinecke's avatar Martin Reinecke

better fix

parent 052ddccc
Pipeline #16969 canceled with stage
in 2 minutes and 10 seconds
......@@ -121,7 +121,7 @@ class LineSearchStrongWolfe(LineSearch):
if alpha1 < 0:
alpha1 = 1.0
else:
alpha1 = 1.0
alpha1 = 1.0/pk.norm()
# start the minimization loop
for i in xrange(self.max_iterations):
......
......@@ -39,6 +39,4 @@ class SteepestDescent(DescentMinimizer):
"""
res = energy.gradient.copy()
res *= -1./res.norm()
return res
return -energy.gradient
......@@ -84,7 +84,6 @@ class VL_BFGS(DescentMinimizer):
for i in xrange(1, len(delta)):
descent_direction += delta[i] * b[i]
descent_direction *= 1./descent_direction.norm()
return descent_direction
......
......@@ -21,7 +21,7 @@ class Test_DescentMinimizers(unittest.TestCase):
@expand([[minimizer] for minimizer in minimizers])
def test_interface(self, minimizer):
iteration_limit = 100
iteration_limit = 30
convergence_level = 4
convergence_tolerance = 1E-6
callback = lambda z: z
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment