Ignore:
Timestamp:
Nov 28, 2007, 1:56:28 PM (17 years ago)
Author:
duncan
Message:

Fit speed up for when there is a lot of blocking

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/development/cairns_demo/runcairns.py

    r4860 r4861  
     1
    12"""Script for running a tsunami inundation scenario for Cairns, QLD Australia.
    23
     
    3132from anuga.shallow_water.data_manager import convert_dem_from_ascii2netcdf
    3233from anuga.shallow_water.data_manager import dem2pts
     34from anuga.fit_interpolate.search_functions import search_times, \
     35     reset_search_times
     36from anuga.fit_interpolate.general_fit_interpolate import \
     37     get_build_quadtree_time
    3338
    3439# Application specific imports
     
    3944# Define scenario as either slide or fixed_wave.
    4045#------------------------------------------------------------------------------
    41 #scenario = 'slide'
    42 scenario = 'fixed_wave'
     46scenario = 'slide'
     47#scenario = 'fixed_wave'
    4348
    4449if os.access(scenario, os.F_OK) == 0:
     
    95100# Setup computational domain
    96101#------------------------------------------------------------------------------
     102
    97103from anuga.abstract_2d_finite_volumes.pmesh2domain import pmesh_to_domain_instance
    98104from anuga.caching import cache
     
    127133tide = 0.0
    128134domain.set_quantity('stage', tide)
    129 domain.set_quantity('friction', 0.0)
     135domain.set_quantity('friction', 0.0)
     136
     137
     138t0 = time.time()
    130139domain.set_quantity('elevation',
    131140                    filename=dem_name + '.pts',
     
    134143                    alpha=0.1)
    135144
    136 
    137 
     145print 'Fitting the elevation data took %.2f seconds' %(time.time()-t0)
     146
     147search_one_cell_time, search_more_cells_time = search_times()
     148reset_search_times()
     149print "search_one_cell_time",search_one_cell_time
     150print "search_more_cells_time", search_more_cells_time
     151print "build_quadtree_time", get_build_quadtree_time()
     152import sys; sys.exit()
    138153#------------------------------------------------------------------------------
    139154# Setup information for slide scenario (to be applied 1 min into simulation
     
    184199#------------------------------------------------------------------------------
    185200
    186 import time
    187201t0 = time.time()
    188202
Note: See TracChangeset for help on using the changeset viewer.