Commit 02714e25 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

Merge branch 'descent_minimizer_exception' into 'CG_paranoia'

Add exception in descent minimizer

See merge request !681
parents 738be3ad 7a7521c5
Pipeline #108767 passed with stages
in 21 minutes
......@@ -197,6 +197,8 @@ class NewtonCG(DescentMinimizer):
e, conv = ConjugateGradient(ic, nreset=self._nreset)(e, p)
if self._history is not None:
self._history += ic.history
if conv == ic.ERROR:
raise ValueError("Cannot find descent direction")
return -e.position
@property
......
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