From 2395b49ab75388bff41ffc98e9d76592d69c9436 Mon Sep 17 00:00:00 2001 From: Marco Selig <mselig@ncg-02.MPA-Garching.MPG.DE> Date: Thu, 18 Jul 2013 12:33:35 +0200 Subject: [PATCH] bug in conjugate_gradient._without fixed. --- nifty_tools.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nifty_tools.py b/nifty_tools.py index 764fa4fa5..461c48538 100644 --- a/nifty_tools.py +++ b/nifty_tools.py @@ -717,7 +717,8 @@ class conjugate_gradient(object): if(limii is None): limii = 10*self.b.domain.dim(split=False) - d = r = self.b-self.A(self.x) + r = self.b-self.A(self.x) + d = field(self.b.domain,val=np.copy(r.val),target=self.b.target) gamma = r.dot(d) delta_ = np.absolute(gamma)**(-0.5) -- GitLab