Commit dd3c67f3 authored by Martin Reinecke's avatar Martin Reinecke

bug fix

parent edcc3b75
Pipeline #23414 passed with stage
in 4 minutes and 34 seconds
......@@ -84,7 +84,7 @@ class DescentMinimizer(Minimizer):
new_energy = self.line_searcher.perform_line_search(
energy=energy, pk=self.get_descent_direction(energy),
f_k_minus_1=f_k_minus_1)
except RuntimeError:
except ValueError:
return energy, controller.ERROR
f_k_minus_1 = energy.value
......
......@@ -106,7 +106,7 @@ class LineSearchStrongWolfe(LineSearch):
phiprime_0 = le_0.directional_derivative
if phiprime_0 >= 0:
dobj.mprint("Error: search direction is not a descent direction")
raise RuntimeError("search direction must be a descent direction")
raise ValueError("search direction must be a descent direction")
# set alphas
alpha0 = 0.
......
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