Changeset 4794
- Timestamp:
- Nov 5, 2007, 5:28:09 PM (17 years ago)
- Location:
- anuga_core/source/anuga
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/advection/advection.py
r4793 r4794 1 import sys2 from os import sep3 4 1 """Class Domain - 5 2 2D triangular domains for finite-volume computations of … … 23 20 """ 24 21 22 print '************Advection module called' 25 23 26 24 import logging, logging.config … … 35 33 36 34 from anuga.abstract_2d_finite_volumes.domain import * 37 Generic_domain = Domain # Rename35 Generic_domain = Domain # Rename 38 36 39 37 class Domain(Generic_domain): -
anuga_core/source/anuga/advection/test_advection.py
r3662 r4794 1 1 import sys 2 2 from os import sep 3 sys.path.append('..'+sep+'pyvolution')4 3 5 4 import unittest … … 8 7 from anuga.config import g, epsilon 9 8 from Numeric import allclose, array, zeros, ones, Float 10 from anuga.advection.advection import *9 from anuga.advection.advection import Domain, Transmissive_boundary, Dirichlet_boundary 11 10 12 11 class Test_Advection(unittest.TestCase): 13 12 def setUp(self): 13 print 'Running an advection test' 14 14 pass 15 15 … … 147 147 #Test that system can evolve 148 148 149 from mesh_factory import rectangular149 from anuga.abstract_2d_finite_volumes.mesh_factory import rectangular 150 150 151 151 points, vertices, boundary = rectangular(6, 6) … … 163 163 domain.check_integrity() 164 164 165 print 'Advection domain evolving' 165 166 #Check that the boundary value gets propagated to all elements 166 167 for t in domain.evolve(yieldstep = 0.05, finaltime = 10): 168 domain.write_time() 167 169 if allclose(domain.quantities['stage'].centroid_values, 3.1415): 168 170 break … … 173 175 #------------------------------------------------------------- 174 176 if __name__ == "__main__": 175 suite = unittest.makeSuite(Test_Advection, 'test')177 suite = unittest.makeSuite(Test_Advection, 'test') 176 178 runner = unittest.TextTestRunner() 177 179 runner.run(suite) -
anuga_core/source/anuga/test_all.py
r4763 r4794 21 21 if sys.platform != 'win32': #Windows 22 22 exclude_files.append('test_advection.py') #Weave doesn't work on Linux 23 23 24 24 exclude_dirs = ['pypar_dist', #Special requirements 25 25 'props', 'wcprops', 'prop-base', 'text-base', '.svn', #Svn
Note: See TracChangeset
for help on using the changeset viewer.