Skip to content

Commit

Permalink
Merge pull request #58 from timovanopstal/printsolver
Browse files Browse the repository at this point in the history
reinstate: print solver name in convergence info
  • Loading branch information
gertjanvanzwieten committed Feb 17, 2015
2 parents fdc4127 + 6a569a0 commit db2fca8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nutils/matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ def matvec( v, _tmp=numpy.zeros(self.shape[1]), _dot=self.core.dot, _I=I, _J=J )

A = scipy.sparse.linalg.LinearOperator( b.shape*2, matvec, dtype=float )
x[J], info = solverfun( A, b, M=precon, tol=tol, x0=x0, callback=mycallback, **solverargs )
assert info == 0, '%s solver failed with status %d' % ( solver, info )
log.info('Linear solver converged in %d iterations' % mycallback.ncalls)
assert info == 0, '%s solver failed with status %d' % (solver, info)
log.info( '%s solver converged in %d iterations' % (solver.upper(), mycallback.ncalls) )
return x

def getprecon( self, name='SPLU', constrain=None, lconstrain=None, rconstrain=None ):
Expand Down

0 comments on commit db2fca8

Please sign in to comment.