Ignore:
Timestamp:
Jan 12, 2007, 10:18:44 AM (18 years ago)
Author:
duncan
Message:

deleting old files, updating others.

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  
    66
    77A example of running this program is;
    8 python run_tsh.py visualise hill.tsh 0.05 1
     8python run_tsh.py n hill.tsh 0.05 1
    99"""
    1010
     
    1313#
    1414
     15from Numeric import array
     16import time
    1517import sys
    1618from os import sep, path
    17 sys.path.append('..'+sep+'pyvolution')
    1819
    19 from shallow_water import Domain, Reflective_boundary, Dirichlet_boundary,\
    20      Transmissive_boundary, Time_boundary
    21 from region import Add_value_to_region, Set_region
    22 from mesh_factory import rectangular
    23 from anuga.pyvolution.pmesh2domain import pmesh_to_domain_instance
     20from anuga.shallow_water import Domain, Reflective_boundary, \
     21     Dirichlet_boundary, Transmissive_boundary, Time_boundary
     22from anuga.abstract_2d_finite_volumes.region import Add_value_to_region, \
     23     Set_region
     24from anuga.visualiser import RealtimeVisualiser
    2425
    25 from Numeric import array
    2626
    27 import time
    2827
    2928#from anuga.config import default_datadir
     
    5049    else:   
    5150        visualise = True
     51       
    5252    filename = sys.argv[2]
    5353    yieldstep = float(sys.argv[3])
     
    5555   
    5656    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   
    5866    print "Number of triangles = ", len(domain)
    5967    print "domain.geo_reference",domain.geo_reference
     
    8593    inflow_stage = 10.0
    8694
    87     ######NEW
     95   
    8896    domain.set_quantity('friction', manning)
    8997
     
    93101    #                        domain.quantities['elevation'].vertex_values)
    94102    #domain.set_quantity('stage', 0.0)
    95     ######NEW
     103   
    96104
    97105    ######################
Note: See TracChangeset for help on using the changeset viewer.