Changeset 4861


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

Fit speed up for when there is a lot of blocking

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/fit_interpolate/fit.py

    r4859 r4861  
    116116            self._build_smoothing_matrix_D()
    117117           
     118        self.mesh_boundary_polygon = self.mesh.get_boundary_polygon()   
     119           
    118120    def _build_coefficient_matrix_B(self,
    119121                                  verbose = False):
     
    268270        inside_poly_indices, outside_poly_indices  = \
    269271                     in_and_outside_polygon(point_coordinates,
    270                                             self.mesh.get_boundary_polygon(),
     272                                            self.mesh_boundary_polygon,
    271273                                            closed = True, verbose = verbose)
    272274        #print "self.inside_poly_indices",self.inside_poly_indices
  • anuga_core/source/anuga/fit_interpolate/run_long_benchmark.py

    r4859 r4861  
    2020# Simulating Cairns. Seemed to take too long to run.  Need to Try again.
    2121 
    22 #maxArea_list = [0.00001]
    23 #num_of_points_list = [1863558]
     22maxArea_list = [0.00001]
     23num_of_points_list = [1863558]
    2424
    2525# a maxArea of 0.0001 gives 15568 triangles
     
    5050
    5151# Quick check
    52 maxArea_list = [0.61]
    53 num_of_points_list = [4]
     52# maxArea_list = [0.61]
     53#num_of_points_list = [4]
    5454
    5555
     
    5858max_points_per_cell_list = [13]
    5959use_file_type_list = ['pts']
    60 run_profile =   False # True #True # False #
     60run_profile =   True #False # True #True # False #
    6161gridded_list = [True] #, False]
    6262
  • anuga_validation/automated_validation_tests/fitting/validate_benchmark_fit.py

    r4841 r4861  
    2525        #print "host", host
    2626        ben = BenchmarkLeastSquares()
    27         time, mem, num_tri = ben.trial(
     27        time, mem, num_tri, one_t, more_t, quad_t = ben.trial(
    2828            num_of_points=1000
    2929            ,maxArea=0.0001
     
    3737        if host.find('tornado') == 0 or host.find('compute-1') == 0:
    3838            # Tornado headnode or node
    39             time_standard = 15.1
     39            time_standard = 11.5
    4040            self.assert_(time<time_standard*1.2)
    41             mem_standard = 18384
     41            mem_standard = 21280
    4242            self.assert_(mem<mem_standard*1.2)
    4343           
    4444        elif host.find('compute-0') == 0: # cyclone node
    45             time_standard = 20.0
     45            time_standard = 17.0
    4646            self.assert_(time<time_standard*1.2)
    47             mem_standard = 18924
     47            mem_standard = 21168
    4848            self.assert_(mem<mem_standard*1.2)
    4949
    5050        elif host.find('cyclone') == 0: # cyclone headnode
    51             time_standard = 13.9
     51            time_standard = 11.8
    5252            self.assert_(time<time_standard*1.2)
    53             mem_standard = 18924
     53            mem_standard = 20500
    5454            self.assert_(mem<mem_standard*1.2)
    5555
     
    6161
    6262        elif host.find('pc-31569') == 0: # DSG's PC
    63             time_standard = 31.0
     63            time_standard = 26.1
    6464            self.assert_(time<time_standard*1.2)
    6565           
  • 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.