Ignore:
Timestamp:
Jan 19, 2009, 8:47:26 AM (15 years ago)
Author:
ole
Message:

Work on Patong, diagnostics and one optimisation

File:
1 edited

Legend:

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

    r6189 r6194  
    759759        import types
    760760
     761        if verbose is True:
     762            print 'Interpolation_function: input checks'
     763
    761764        # Check temporal info
    762         time = ensure_numeric(time)       
    763         msg = 'Time must be a monotonuosly increasing sequence %s' % time
    764         assert num.alltrue(time[1:] - time[:-1] >= 0), msg
     765        time = ensure_numeric(time)
     766        if not num.alltrue(time[1:] - time[:-1] >= 0):
     767            # This message is time consuming to form due to the conversion of
     768            msg = 'Time must be a monotonuosly increasing sequence %s' % time
     769            raise Exception, msg
    765770
    766771        # Check if quantities is a single array only
     
    788793            self.spatial = True         
    789794
     795        if verbose is True:
     796            print 'Interpolation_function: thinning'
     797
     798           
    790799        # Thin timesteps if needed
    791800        # Note array() is used to make the thinned arrays contiguous in memory
     
    794803            if len(quantities[name].shape) == 2:
    795804                quantities[name] = num.array(quantities[name][::time_thinning,:])
    796              
     805
     806        if verbose is True:
     807            print 'Interpolation_function: precomputing'
     808           
    797809        # Save for use with statistics
    798810        self.quantities_range = {}
     
    915927                print msg
    916928
     929            # FIXME(Ole): This one is no longer needed for STS files
    917930            interpol = Interpolate(vertex_coordinates,
    918931                                   triangles,
Note: See TracChangeset for help on using the changeset viewer.