Changeset 2661


Ignore:
Timestamp:
Apr 5, 2006, 4:01:55 PM (19 years ago)
Author:
ole
Message:

Introduced exception when CG doesn't converge

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/utilities/cg_solve.py

    r2503 r2661  
    11import exceptions
    22class VectorShapeError(exceptions.Exception): pass
     3class ConvergenceError(exceptions.Exception): pass
    34
    45import logging, logging.config
     
    7172   if i==imax:
    7273       logger.warning('max number of iterations attained')
     74       msg = 'Conjugate gradient solver did not converge'
     75       raise ConvergenceError, msg
    7376
    7477   return x
Note: See TracChangeset for help on using the changeset viewer.