Changeset 7845
- Timestamp:
- Jun 15, 2010, 10:59:36 PM (14 years ago)
- Location:
- trunk/anuga_core/source/anuga/utilities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/utilities
-
Property
svn:ignore
set to
.python_cache
-
Property
svn:ignore
set to
-
trunk/anuga_core/source/anuga/utilities/cg_solve.py
r7276 r7845 4 4 5 5 import numpy as num 6 7 import logging, logging.config8 logger = logging.getLogger('cg_solve')9 logger.setLevel(logging.WARNING)10 6 11 try: 12 logging.config.fileConfig('log.ini') 13 except: 14 pass 7 import anuga.utilities.log as log 8 15 9 16 10 def conjugate_gradient(A,b,x0=None,imax=10000,tol=1.0e-8,iprint=0): … … 93 87 i = i+1 94 88 if i%iprint == 0 : 95 log ger.info('i = %g rTr = %20.15e' %(i,rTr))89 log.info('i = %g rTr = %20.15e' %(i,rTr)) 96 90 97 91 if i==imax: 98 log ger.warning('max number of iterations attained')92 log.warning('max number of iterations attained') 99 93 msg = 'Conjugate gradient solver did not converge: rTr==%20.15e' %rTr 100 94 raise ConvergenceError, msg
Note: See TracChangeset
for help on using the changeset viewer.