Changeset 4173 for anuga_core/source/anuga/examples
- Timestamp:
- Jan 12, 2007, 10:18:44 AM (18 years ago)
- Location:
- anuga_core/source/anuga/examples
- Files:
-
- 2 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/examples/run_tsh.py
r4026 r4173 6 6 7 7 A example of running this program is; 8 python run_tsh.py visualisehill.tsh 0.05 18 python run_tsh.py n hill.tsh 0.05 1 9 9 """ 10 10 … … 13 13 # 14 14 15 from Numeric import array 16 import time 15 17 import sys 16 18 from os import sep, path 17 sys.path.append('..'+sep+'pyvolution')18 19 19 from shallow_water import Domain, Reflective_boundary, Dirichlet_boundary,\20 Transmissive_boundary, Time_boundary21 from region import Add_value_to_region, Set_region22 from mesh_factory import rectangular 23 from anuga. pyvolution.pmesh2domain import pmesh_to_domain_instance20 from anuga.shallow_water import Domain, Reflective_boundary, \ 21 Dirichlet_boundary, Transmissive_boundary, Time_boundary 22 from anuga.abstract_2d_finite_volumes.region import Add_value_to_region, \ 23 Set_region 24 from anuga.visualiser import RealtimeVisualiser 24 25 25 from Numeric import array26 26 27 import time28 27 29 28 #from anuga.config import default_datadir … … 50 49 else: 51 50 visualise = True 51 52 52 filename = sys.argv[2] 53 53 yieldstep = float(sys.argv[3]) … … 55 55 56 56 print 'Creating domain from', filename 57 domain = pmesh_to_domain_instance(filename, Domain) 57 domain = Domain(filename) 58 59 # check if the visualiser will work 60 try: 61 xx = RealtimeVisualiser(domain) 62 except: 63 print "Warning: Error in RealtimeVisualiser. Could not visualise." 64 visualise = False 65 58 66 print "Number of triangles = ", len(domain) 59 67 print "domain.geo_reference",domain.geo_reference … … 85 93 inflow_stage = 10.0 86 94 87 ######NEW95 88 96 domain.set_quantity('friction', manning) 89 97 … … 93 101 # domain.quantities['elevation'].vertex_values) 94 102 #domain.set_quantity('stage', 0.0) 95 ######NEW103 96 104 97 105 ######################
Note: See TracChangeset
for help on using the changeset viewer.