diff --git a/integrators/tps2.py b/integrators/tps2.py index ad55678cd315074a4cb5e422a251fa7678ae760f..5af8bd548caa3b5e08d67427600ade0471c72a37 100644 --- a/integrators/tps2.py +++ b/integrators/tps2.py @@ -234,9 +234,10 @@ class TPS2(_tpsx.TPSX, \ RHS = self._Q.dot( f ) - w, succ = scipy.sparse.linalg.gmres(self._LHS, RHS , x0=None \ + self._UpdateGuess() + self._solution, succ = scipy.sparse.linalg.gmres(self._LHS, RHS , x0=self._guess \ , tol=self._solvetol, maxiter=4000, M=self._preconditioner) - self._Mag.v.gf.vec.FV().NumPy()[:] = self._Q.transpose().dot(w) + self._Mag.v.gf.vec.FV().NumPy()[:] = self._Q.transpose().dot(self._solution) diff_gf.vec.FV().NumPy()[:] = self._Mag.v.gf.vec.FV().NumPy()-oldIterate itError = sqrt( Integrate(diff_cf*diff_cf, self._GetMesh()) )