Skip to content

Commit

Permalink
remove one temporary
Browse files Browse the repository at this point in the history
  • Loading branch information
jowezarek committed Sep 22, 2023
1 parent a7133ba commit f1c7887
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions psydac/linalg/solvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def solve(self, b, out=None):
self._info = {'niter': m, 'success': am < tol_sqr, 'res_norm': sqrt(am) }

if recycle:
self.set_options(x0=x.copy()) # try x.copy(out=self._options["x0"]) instead
x.copy(out=self._options["x0"])

return x

Expand Down Expand Up @@ -473,7 +473,7 @@ def solve(self, b, out=None):
self._info = {'niter': k, 'success': nrmr_sqr < tol_sqr, 'res_norm': sqrt(nrmr_sqr) }

if recycle:
self.set_options(x0=x.copy())
x.copy(out=self._options["x0"])

return x

Expand Down Expand Up @@ -701,7 +701,7 @@ def solve(self, b, out=None):
self._info = {'niter': m, 'success': res_sqr < tol_sqr, 'res_norm': sqrt(res_sqr)}

if recycle:
self.set_options(x0=x.copy()) # try x.copy(out=self._options["x0"]) instead
x.copy(out=self._options["x0"])

return x

Expand Down Expand Up @@ -937,7 +937,7 @@ def solve(self, b, out=None):
self._info = {'niter': m, 'success': res_sqr < tol_sqr, 'res_norm': sqrt(res_sqr)}

if recycle:
self.set_options(x0=x.copy()) # try x.copy(out=self._options["x0"]) instead
x.copy(out=self._options["x0"])

return x

Expand Down Expand Up @@ -1256,7 +1256,7 @@ def solve(self, b, out=None):
self._info = {'niter': itn, 'success': rnorm<tol, 'res_norm': rnorm }

if recycle:
self.set_options(x0=x.copy())
x.copy(out=self._options["x0"])

return x

Expand Down Expand Up @@ -1666,7 +1666,7 @@ def solve(self, b, out=None):
self._successful = istop in [1,2,3]

if recycle:
self.set_options(x0=x.copy()) # try x.copy(out=self._options["x0"]) instead
x.copy(out=self._options["x0"])

return x

Expand Down Expand Up @@ -1872,7 +1872,7 @@ def solve(self, b, out=None):
self._info = {'niter': k+1, 'success': am < tol, 'res_norm': am }

if recycle:
self.set_options(x0=x.copy()) # try x.copy(out=self._options["x0"]) instead
x.copy(out=self._options["x0"])

return x

Expand Down

0 comments on commit f1c7887

Please sign in to comment.