Changeset 5079


Ignore:
Timestamp:
Feb 27, 2008, 9:12:46 AM (16 years ago)
Author:
ole
Message:

Added some statistics to run_dam.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/debug/bad_time_step/run_dam.py

    r5074 r5079  
    2727# Related major packages
    2828from anuga.shallow_water import Domain, Reflective_boundary, \
    29                             Dirichlet_boundary,  Time_boundary, \
    30                             File_boundary, \
    31                             Transmissive_Momentum_Set_Stage_boundary
     29     Dirichlet_boundary,  Time_boundary, \
     30     File_boundary, \
     31     Transmissive_Momentum_Set_Stage_boundary
    3232from anuga.fit_interpolate.interpolate import interpolate_sww2csv
    3333from anuga.abstract_2d_finite_volumes.util import start_screen_catcher, \
     
    5959        finaltime = 15.
    6060        maximum_triangle_area=0.01
     61        #maximum_triangle_area=0.1 #OK
    6162    else:
    6263        yieldstep = 0.02
     
    6970                                   outputdir_name=outputdir_name,
    7071                                   home='.')
    71     print "The output dir is", pro_instance.outputdir
     72    print 'The output dir is', pro_instance.outputdir
    7273    copy_code_files(pro_instance.outputdir,__file__,
    7374                    dirname(project.__file__) \
     
    9091
    9192    print 'USER:    ', pro_instance.user
     93
     94   
    9295    #-------------------------------------------------------------------------
    9396    # Create the triangular mesh
     
    132135    # Create boundary function from timeseries provided in file
    133136    function = file_function(project.boundary_file, domain, verbose=True)
     137
     138    #print dir(function)
     139    #print function.time, function.quantities_range
     140    #import sys; sys.exit()
     141   
    134142    Bts = Transmissive_Momentum_Set_Stage_boundary(domain, function)
    135143
     
    145153
    146154    for t in domain.evolve(yieldstep, finaltime):
    147    
    148         domain.write_time()
    149         print 'That took %.2f seconds' %(time.time()-t0)
    150         print 'finished'
     155        print domain.timestepping_statistics(track_speeds=False)
     156        print domain.boundary_statistics(tags=['wave'])
     157       
     158    print 'That took %.2f seconds' %(time.time()-t0)
     159    print 'finished'
    151160
    152161    points = [[2.8,0.225],  #-1.8m from SWL
Note: See TracChangeset for help on using the changeset viewer.