Changeset 2573


Ignore:
Timestamp:
Mar 22, 2006, 2:05:01 PM (18 years ago)
Author:
duncan
Message:

bug fixing, adding infinite variable to use with Numeric

Location:
inundation
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • inundation/fit_interpolate/benchmark_least_squares.py

    r2563 r2573  
    172172
    173173        for point in range(num_of_points):
    174             points.append([random()*100, random()*100])
     174            points.append([random(), random()])
    175175            point_atts.append(10.0)
    176176
  • inundation/fit_interpolate/interpolate.py

    r2564 r2573  
    3030from coordinate_transforms.geo_reference import Geo_reference
    3131from pyvolution.quad import build_quadtree
    32 from utilities.numerical_tools import ensure_numeric, mean
     32from utilities.numerical_tools import ensure_numeric, mean, INF
    3333from utilities.polygon import inside_polygon
    3434
     
    8383        #       The functionality of boundary_polygon is needed for that
    8484
    85         #FIXME - geo ref does not have to go into mesh.
    86         # Change the point co-ords to conform to the
    87         # mesh co-ords early in the code
    88 
    8985        #FIXME: geo_ref can also be a geo_ref object
    9086        #FIXME: move this to interpolate_block
     87
     88        #Note: not so keen to use geospacial to represent the mesh,
     89        # since the data structure is
     90        # points, geo-ref and triangles, rather than just points and geo-ref
     91        # this info will usually be coming from a domain instance.
    9192        if mesh_origin is None:
    9293            geo = None
     
    9798       
    9899        self.mesh.check_integrity()
    99 
    100100        self.root = build_quadtree(self.mesh,
    101101                              max_points_per_cell = max_vertices_per_cell)
     102        #print "self.root",self.root.show()
    102103       
    103104       
  • inundation/utilities/numerical_tools.py

    r2533 r2573  
    1212    print 'Could not find scipy - using Numeric'
    1313    from Numeric import ArrayType, array, sum, innerproduct, ravel, sqrt, searchsorted, sort, concatenate   
    14    
     14
     15# Getting an infinate number to use when using Numeric
     16INF = (array([1])/0.)[0]
    1517
    1618def angle(v):
Note: See TracChangeset for help on using the changeset viewer.