Index: /inundation/examples/island.py
===================================================================
--- /inundation/examples/island.py (revision 2637)
+++ /inundation/examples/island.py (revision 2638)
@@ -2,5 +2,5 @@
Island surrounded by water.
-This example investigates onshore 'creep'
+This example investigates onshore 'creep'
"""
@@ -37,7 +37,7 @@
, interior_regions=[ ([[50,25], [70,25], [70,75], [50,75]], 3)]
)
-
-
-
+
+
+
#Create shallow water domain
domain = Domain(mesh_filename = 'island.msh')
@@ -66,6 +66,6 @@
z[i] = 8*exp( -((x[i]-50)**2 + (y[i]-50)**2)/100 )
- #z[i] += 0.5*exp( -((x[i]-10)**2 + (y[i]-10)**2)/50 )
-
+ #z[i] += 0.5*exp( -((x[i]-10)**2 + (y[i]-10)**2)/50 )
+
return z
@@ -73,10 +73,10 @@
z = 0*x
for i in range(len(x)):
- z[i] -= 0.7*exp( -((x[i]-10)**2 + (y[i]-10)**2)/200 )
-
+ z[i] -= 0.7*exp( -((x[i]-10)**2 + (y[i]-10)**2)/200 )
+
return z
-#domain.set_quantity('friction', 0.1) #Honky dory
-domain.set_quantity('friction', 2) #Creep
+domain.set_quantity('friction', 0.1) #Honky dory
+#domain.set_quantity('friction', 2) #Creep
domain.set_quantity('elevation', island)
domain.set_quantity('stage', 1)
Index: /inundation/log.ini
===================================================================
--- /inundation/log.ini (revision 2638)
+++ /inundation/log.ini (revision 2638)
@@ -0,0 +1,41 @@
+
+[loggers]
+keys=root,cg_solve,least_squares
+
+[handlers]
+keys=hand01
+
+[formatters]
+keys=form01
+
+#-----------------------------------------------------------------------
+[logger_root]
+level=NOTSET
+handlers=hand01
+
+[logger_cg_solve]
+level=ERROR
+handlers=hand01
+propagate=0
+qualname=cg_solve
+
+[logger_least_squares]
+level=INFO
+handlers=hand01
+propagate=0
+qualname=least_squares
+
+#-----------------------------------------------------------------------
+# Handlers
+[handler_hand01]
+class=StreamHandler
+level=NOTSET
+formatter=form01
+args=(sys.stdout,)
+
+
+#-----------------------------------------------------------------------
+# Formats
+[formatter_form01]
+format=%(name)s_%(levelname)s: %(message)s
+datefmt=
Index: /inundation/test_all.py
===================================================================
--- /inundation/test_all.py (revision 2637)
+++ /inundation/test_all.py (revision 2638)
@@ -23,6 +23,6 @@
exclude_dirs = ['pypar_dist', #Special requirements
'props', 'wcprops', 'prop-base', 'text-base', '.svn', #Svn
- 'tmp',
- 'pmesh'] #Name conflict on my home machine (Ole)
+ 'tmp',
+ 'pmesh'] #Name conflict on my home machine (Ole)
@@ -42,5 +42,5 @@
#Exclude svn admin dirs
if file in exclude_dirs: continue
-
+
absolute_filename = path + os.sep + file
@@ -60,7 +60,7 @@
import os, unittest
path = os.getcwd()
-
+
files = [x for x in get_test_files(path) if not x == 'test_all.py']
-
+
print 'Testing path %s:' %('...'+path[-50:])
for file in files:
@@ -80,3 +80,7 @@
if __name__ == '__main__':
- unittest.main(defaultTest='regressionTest')
+ #unittest.main(defaultTest='regressionTest')
+
+ suite = regressionTest()
+ runner = unittest.TextTestRunner() #verbosity=2
+ runner.run(suite)
Index: /inundation/utilities/log.ini
===================================================================
--- /inundation/utilities/log.ini (revision 2638)
+++ /inundation/utilities/log.ini (revision 2638)
@@ -0,0 +1,41 @@
+
+[loggers]
+keys=root,cg_solve,least_squares
+
+[handlers]
+keys=hand01
+
+[formatters]
+keys=form01
+
+#-----------------------------------------------------------------------
+[logger_root]
+level=NOTSET
+handlers=hand01
+
+[logger_cg_solve]
+level=ERROR
+handlers=hand01
+propagate=0
+qualname=cg_solve
+
+[logger_least_squares]
+level=INFO
+handlers=hand01
+propagate=0
+qualname=least_squares
+
+#-----------------------------------------------------------------------
+# Handlers
+[handler_hand01]
+class=StreamHandler
+level=NOTSET
+formatter=form01
+args=(sys.stdout,)
+
+
+#-----------------------------------------------------------------------
+# Formats
+[formatter_form01]
+format=%(name)s_%(levelname)s: %(message)s
+datefmt=
Index: /inundation/utilities/test_cg_solve.py
===================================================================
--- /inundation/utilities/test_cg_solve.py (revision 2637)
+++ /inundation/utilities/test_cg_solve.py (revision 2638)
@@ -12,5 +12,5 @@
def test_sparse_solve(self):
- """Small Sparse Matrix"""
+ """Solve Small Sparse Matrix"""
A = [[2.0, -1.0, 0.0, 0.0 ],
@@ -30,5 +30,5 @@
def test_max_iter(self):
- """Small Sparse Matrix"""
+ """Test max iteration Small Sparse Matrix"""
A = [[2.0, -1.0, 0.0, 0.0 ],
@@ -62,5 +62,5 @@
b = A*xe
- x = conjugate_gradient(A,b,b,tol=1.0e-5,iprint=0)
+ x = conjugate_gradient(A,b,b,tol=1.0e-5,iprint=1)
assert allclose(x,xe)
@@ -181,7 +181,6 @@
if __name__ == "__main__":
suite = unittest.makeSuite(Test_CG_Solve,'test')
- runner = unittest.TextTestRunner() #(verbosity=2)
+ runner = unittest.TextTestRunner(verbosity=2)
runner.run(suite)
-
Index: /inundation/zeus/pyvolution.zpi
===================================================================
--- /inundation/zeus/pyvolution.zpi (revision 2637)
+++ /inundation/zeus/pyvolution.zpi (revision 2638)
@@ -87,5 +87,4 @@
..\pyvolution\generic_boundary_conditions.py
..\pyvolution\interpolate_sww.py
- ..\pyvolution\island.py
..\pyvolution\least_squares.py
..\pyvolution\log.ini