# Changeset 7848

Ignore:
Timestamp:
Jun 16, 2010, 2:50:06 PM (13 years ago)
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

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

 r7828 ﻿% Complete documentation on the extended LaTeX markup used for Python % Complete documentation on the extended LaTeX markup used for Python % documentation is available in ''Documenting Python'', which is part % of the standard documentation for Python.  It may be found online \documentclass{manual} \usepackage{graphicx} \usepackage[english]{babel} \usepackage{datetime} \usepackage[hang,small,bf]{caption} \input{definitions} \begin{verbatim} convariance_value, alpha = $\backslash$ convariance_value, alpha = \ find_optimal_smoothing_parameter(data_file=fileName, alpha_list=[0.0001, 0.01, 1],
• ## trunk/anuga_core/source/anuga/utilities/cg_solve.py

 r7845 def conjugate_gradient(A,b,x0=None,imax=10000,tol=1.0e-8,iprint=0): def conjugate_gradient(A,b,x0=None,imax=10000,tol=1.0e-8,iprint=None): """ Try to solve linear equation Ax = b using return x0 def _conjugate_gradient(A,b,x0=None,imax=10000,tol=1.0e-8,iprint=0): def _conjugate_gradient(A,b,x0=None,imax=10000,tol=1.0e-8,iprint=None): """ Try to solve linear equation Ax = b using #FIXME: Should test using None if iprint == 0: if iprint == None  or iprint == 0: iprint = imax rTr0 = rTr #FIXME Let the iterations stop if starting with a small residual while (itol**2*rTr0): q = A*d
• ## trunk/anuga_core/source/anuga/utilities/log.py

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

 r7276 class TestError(exceptions.Exception): pass import unittest import numpy as num class Test_CG_Solve(unittest.TestCase): x =  [0.0, 0.0, 0.0, 0.0] x = conjugate_gradient(A,b,x,iprint=0) x = conjugate_gradient(A,b,x) assert num.allclose(x,xe) try: x = conjugate_gradient(A,b,x,iprint=0,imax=2) x = conjugate_gradient(A,b,x,imax=2) except ConvergenceError: pass b  = A*xe x = conjugate_gradient(A,b,b,tol=1.0e-5,iprint=1) x = conjugate_gradient(A,b,b,tol=1.0e-5) assert num.allclose(x,xe) b  = A*xe x = conjugate_gradient(A,b,b,iprint=0) x = conjugate_gradient(A,b,b,iprint=1) assert num.allclose(x,xe)
Note: See TracChangeset for help on using the changeset viewer.