Changeset 2638


Ignore:
Timestamp:
Mar 30, 2006, 10:13:03 PM (18 years ago)
Author:
steve
Message:
 
Location:
inundation
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • inundation/examples/island.py

    r2636 r2638  
    22
    33Island surrounded by water.
    4 This example investigates onshore 'creep' 
     4This example investigates onshore 'creep'
    55
    66"""
     
    3737                          , interior_regions=[ ([[50,25], [70,25], [70,75], [50,75]], 3)]
    3838                          )
    39                          
    40                                                    
    41                          
     39
     40
     41
    4242#Create shallow water domain
    4343domain = Domain(mesh_filename = 'island.msh')
     
    6666        z[i] = 8*exp( -((x[i]-50)**2 + (y[i]-50)**2)/100 )
    6767
    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
    7070    return z
    7171
     
    7373    z = 0*x
    7474    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
    7777    return z
    7878
    79 #domain.set_quantity('friction', 0.1)  #Honky dory
    80 domain.set_quantity('friction', 2)     #Creep
     79domain.set_quantity('friction', 0.1)  #Honky dory
     80#domain.set_quantity('friction', 2)     #Creep
    8181domain.set_quantity('elevation', island)
    8282domain.set_quantity('stage', 1)
  • inundation/test_all.py

    r2566 r2638  
    2323exclude_dirs = ['pypar_dist', #Special requirements
    2424                '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)
    2727
    2828
     
    4242        #Exclude svn admin dirs
    4343        if file in exclude_dirs: continue
    44        
     44
    4545        absolute_filename = path + os.sep + file
    4646
     
    6060    import os, unittest
    6161    path = os.getcwd()
    62    
     62
    6363    files = [x for x in  get_test_files(path) if not x == 'test_all.py']
    64    
     64
    6565    print 'Testing path %s:' %('...'+path[-50:])
    6666    for file in files:
     
    8080
    8181if __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  
    1212
    1313    def test_sparse_solve(self):
    14         """Small Sparse Matrix"""
     14        """Solve Small Sparse Matrix"""
    1515
    1616        A = [[2.0, -1.0, 0.0, 0.0 ],
     
    3030
    3131    def test_max_iter(self):
    32         """Small Sparse Matrix"""
     32        """Test max iteration Small Sparse Matrix"""
    3333
    3434        A = [[2.0, -1.0, 0.0, 0.0 ],
     
    6262
    6363        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)
    6565
    6666        assert allclose(x,xe)
     
    181181if __name__ == "__main__":
    182182     suite = unittest.makeSuite(Test_CG_Solve,'test')
    183      runner = unittest.TextTestRunner() #(verbosity=2)
     183     runner = unittest.TextTestRunner(verbosity=2)
    184184     runner.run(suite)
    185185
    186186
    187 
  • inundation/zeus/pyvolution.zpi

    r2622 r2638  
    8787    <file>..\pyvolution\generic_boundary_conditions.py</file>
    8888    <file>..\pyvolution\interpolate_sww.py</file>
    89     <file>..\pyvolution\island.py</file>
    9089    <file>..\pyvolution\least_squares.py</file>
    9190    <file>..\pyvolution\log.ini</file>
Note: See TracChangeset for help on using the changeset viewer.