Changeset 7845


Ignore:
Timestamp:
Jun 15, 2010, 10:59:36 PM (14 years ago)
Author:
steve
Message:
 
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
  • trunk/anuga_core/source/anuga/utilities/cg_solve.py

    r7276 r7845  
    44
    55import numpy as num
    6    
    7 import logging, logging.config
    8 logger = logging.getLogger('cg_solve')
    9 logger.setLevel(logging.WARNING)
    106
    11 try:
    12     logging.config.fileConfig('log.ini')
    13 except:
    14     pass
     7import anuga.utilities.log as log
     8
    159
    1610def conjugate_gradient(A,b,x0=None,imax=10000,tol=1.0e-8,iprint=0):
     
    9387       i = i+1
    9488       if i%iprint == 0 :
    95           logger.info('i = %g rTr = %20.15e' %(i,rTr))
     89          log.info('i = %g rTr = %20.15e' %(i,rTr))
    9690
    9791       if i==imax:
    98             logger.warning('max number of iterations attained')
     92            log.warning('max number of iterations attained')
    9993            msg = 'Conjugate gradient solver did not converge: rTr==%20.15e' %rTr
    10094            raise ConvergenceError, msg
Note: See TracChangeset for help on using the changeset viewer.