Changeset 2638
- Timestamp:
- Mar 30, 2006, 10:13:03 PM (17 years ago)
- Location:
- inundation
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/examples/island.py
r2636 r2638 2 2 3 3 Island surrounded by water. 4 This example investigates onshore 'creep' 4 This example investigates onshore 'creep' 5 5 6 6 """ … … 37 37 , interior_regions=[ ([[50,25], [70,25], [70,75], [50,75]], 3)] 38 38 ) 39 40 41 39 40 41 42 42 #Create shallow water domain 43 43 domain = Domain(mesh_filename = 'island.msh') … … 66 66 z[i] = 8*exp( -((x[i]-50)**2 + (y[i]-50)**2)/100 ) 67 67 68 #z[i] += 0.5*exp( -((x[i]-10)**2 + (y[i]-10)**2)/50 ) 69 68 #z[i] += 0.5*exp( -((x[i]-10)**2 + (y[i]-10)**2)/50 ) 69 70 70 return z 71 71 … … 73 73 z = 0*x 74 74 for i in range(len(x)): 75 z[i] -= 0.7*exp( -((x[i]-10)**2 + (y[i]-10)**2)/200 ) 76 75 z[i] -= 0.7*exp( -((x[i]-10)**2 + (y[i]-10)**2)/200 ) 76 77 77 return z 78 78 79 #domain.set_quantity('friction', 0.1) #Honky dory 80 domain.set_quantity('friction', 2) #Creep79 domain.set_quantity('friction', 0.1) #Honky dory 80 #domain.set_quantity('friction', 2) #Creep 81 81 domain.set_quantity('elevation', island) 82 82 domain.set_quantity('stage', 1) -
inundation/test_all.py
r2566 r2638 23 23 exclude_dirs = ['pypar_dist', #Special requirements 24 24 'props', 'wcprops', 'prop-base', 'text-base', '.svn', #Svn 25 'tmp', 26 'pmesh'] #Name conflict on my home machine (Ole) 25 'tmp', 26 'pmesh'] #Name conflict on my home machine (Ole) 27 27 28 28 … … 42 42 #Exclude svn admin dirs 43 43 if file in exclude_dirs: continue 44 44 45 45 absolute_filename = path + os.sep + file 46 46 … … 60 60 import os, unittest 61 61 path = os.getcwd() 62 62 63 63 files = [x for x in get_test_files(path) if not x == 'test_all.py'] 64 64 65 65 print 'Testing path %s:' %('...'+path[-50:]) 66 66 for file in files: … … 80 80 81 81 if __name__ == '__main__': 82 unittest.main(defaultTest='regressionTest') 82 #unittest.main(defaultTest='regressionTest') 83 84 suite = regressionTest() 85 runner = unittest.TextTestRunner() #verbosity=2 86 runner.run(suite) -
inundation/utilities/test_cg_solve.py
r2527 r2638 12 12 13 13 def test_sparse_solve(self): 14 """S mall Sparse Matrix"""14 """Solve Small Sparse Matrix""" 15 15 16 16 A = [[2.0, -1.0, 0.0, 0.0 ], … … 30 30 31 31 def test_max_iter(self): 32 """ Small Sparse Matrix"""32 """Test max iteration Small Sparse Matrix""" 33 33 34 34 A = [[2.0, -1.0, 0.0, 0.0 ], … … 62 62 63 63 b = A*xe 64 x = conjugate_gradient(A,b,b,tol=1.0e-5,iprint= 0)64 x = conjugate_gradient(A,b,b,tol=1.0e-5,iprint=1) 65 65 66 66 assert allclose(x,xe) … … 181 181 if __name__ == "__main__": 182 182 suite = unittest.makeSuite(Test_CG_Solve,'test') 183 runner = unittest.TextTestRunner( ) #(verbosity=2)183 runner = unittest.TextTestRunner(verbosity=2) 184 184 runner.run(suite) 185 185 186 186 187 -
inundation/zeus/pyvolution.zpi
r2622 r2638 87 87 <file>..\pyvolution\generic_boundary_conditions.py</file> 88 88 <file>..\pyvolution\interpolate_sww.py</file> 89 <file>..\pyvolution\island.py</file>90 89 <file>..\pyvolution\least_squares.py</file> 91 90 <file>..\pyvolution\log.ini</file>
Note: See TracChangeset
for help on using the changeset viewer.