Changeset 7848


Ignore:
Timestamp:
Jun 16, 2010, 2:50:06 PM (10 years ago)
Author:
steve
Message:

Changed the logging levels in log.py so that the information about openning the
file ./anuga.log is now only an info log as opposed to critical log. I.e. by default
doesn't write to the console.

Location:
trunk/anuga_core
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/documentation/user_manual/anuga_user_manual.tex

    r7828 r7848  
    1 % Complete documentation on the extended LaTeX markup used for Python
     1% Complete documentation on the extended LaTeX markup used for Python
    22% documentation is available in ''Documenting Python'', which is part
    33% of the standard documentation for Python.  It may be found online
     
    2626\documentclass{manual}
    2727
     28
    2829\usepackage{graphicx}
    2930\usepackage[english]{babel}
    3031\usepackage{datetime}
    3132\usepackage[hang,small,bf]{caption}
     33
    3234
    3335\input{definitions}
     
    46294631
    46304632\begin{verbatim}
    4631 convariance_value, alpha = $\backslash$
     4633convariance_value, alpha = \
    46324634        find_optimal_smoothing_parameter(data_file=fileName,
    46334635                                         alpha_list=[0.0001, 0.01, 1],
  • trunk/anuga_core/source/anuga/utilities/cg_solve.py

    r7845 r7848  
    88
    99
    10 def conjugate_gradient(A,b,x0=None,imax=10000,tol=1.0e-8,iprint=0):
     10def conjugate_gradient(A,b,x0=None,imax=10000,tol=1.0e-8,iprint=None):
    1111    """
    1212    Try to solve linear equation Ax = b using
     
    3333    return x0
    3434   
    35 def _conjugate_gradient(A,b,x0=None,imax=10000,tol=1.0e-8,iprint=0):
     35def _conjugate_gradient(A,b,x0=None,imax=10000,tol=1.0e-8,iprint=None):
    3636   """
    3737   Try to solve linear equation Ax = b using
     
    6262
    6363   #FIXME: Should test using None
    64    if iprint == 0:
     64   if iprint == None  or iprint == 0:
    6565      iprint = imax
    6666
     
    7272   rTr0 = rTr
    7373
     74   #FIXME Let the iterations stop if starting with a small residual
    7475   while (i<imax and rTr>tol**2*rTr0):
    7576       q = A*d
  • trunk/anuga_core/source/anuga/utilities/log.py

    r7810 r7848  
    126126                        logging.getLevelName(console_logging_level)))
    127127        if _new_python:
    128             logging.log(logging.CRITICAL, start_msg,
     128            logging.log(logging.INFO, start_msg,
    129129                        extra={'mname': __name__, 'lnum': 0})
    130130        else:
    131             logging.log(logging.CRITICAL, start_msg)
     131            logging.log(logging.INFO, start_msg)
    132132
    133133        # mark module as *setup*
  • trunk/anuga_core/source/anuga/utilities/test_cg_solve.py

    r7276 r7848  
    44class TestError(exceptions.Exception): pass
    55import unittest
    6 
    76
    87import numpy as num
     
    1211
    1312
     13
     14
    1415class Test_CG_Solve(unittest.TestCase):
    1516
     
    2829        x =  [0.0, 0.0, 0.0, 0.0]
    2930
    30         x = conjugate_gradient(A,b,x,iprint=0)
     31        x = conjugate_gradient(A,b,x)
    3132
    3233        assert num.allclose(x,xe)
     
    4748
    4849        try:
    49             x = conjugate_gradient(A,b,x,iprint=0,imax=2)
     50            x = conjugate_gradient(A,b,x,imax=2)
    5051        except ConvergenceError:
    5152            pass
     
    7172
    7273        b  = A*xe
    73         x = conjugate_gradient(A,b,b,tol=1.0e-5,iprint=1)
     74        x = conjugate_gradient(A,b,b,tol=1.0e-5)
    7475
    7576        assert num.allclose(x,xe)
     
    99100
    100101        b  = A*xe
    101         x = conjugate_gradient(A,b,b,iprint=0)
     102        x = conjugate_gradient(A,b,b,iprint=1)
    102103
    103104        assert num.allclose(x,xe)
Note: See TracChangeset for help on using the changeset viewer.