Changeset 6194 for anuga_core/source/anuga/fit_interpolate/interpolate.py
- Timestamp:
- Jan 19, 2009, 8:47:26 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/fit_interpolate/interpolate.py
r6189 r6194 759 759 import types 760 760 761 if verbose is True: 762 print 'Interpolation_function: input checks' 763 761 764 # 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 765 770 766 771 # Check if quantities is a single array only … … 788 793 self.spatial = True 789 794 795 if verbose is True: 796 print 'Interpolation_function: thinning' 797 798 790 799 # Thin timesteps if needed 791 800 # Note array() is used to make the thinned arrays contiguous in memory … … 794 803 if len(quantities[name].shape) == 2: 795 804 quantities[name] = num.array(quantities[name][::time_thinning,:]) 796 805 806 if verbose is True: 807 print 'Interpolation_function: precomputing' 808 797 809 # Save for use with statistics 798 810 self.quantities_range = {} … … 915 927 print msg 916 928 929 # FIXME(Ole): This one is no longer needed for STS files 917 930 interpol = Interpolate(vertex_coordinates, 918 931 triangles,
Note: See TracChangeset
for help on using the changeset viewer.