From bfae99198bcd80a352de61f352ec2a167aaaa97a Mon Sep 17 00:00:00 2001 From: Christopher Lackner Date: Wed, 3 Jun 2020 12:44:59 +0200 Subject: [PATCH] change if statements ("usable" in complex setting) --- python/nonlinearsolvers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/nonlinearsolvers.py b/python/nonlinearsolvers.py index 9db1f1d83..9a6791a48 100644 --- a/python/nonlinearsolvers.py +++ b/python/nonlinearsolvers.py @@ -46,8 +46,8 @@ def Solve(self, maxit=100, maxerr=1e-11, dampfactor=1, w.data = self.inv * r err2 = InnerProduct(w,r) - if err2 < 0: - if print_wrong_direction: + if print_wrong_direction: + if err2 < 0: print("wrong direction") err = sqrt(abs(err2)) if printing: