- Timestamp:
- Sep 18, 2007, 3:18:32 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/abstract_2d_finite_volumes/quantity.py
r4728 r4735 172 172 173 173 174 # New leaner interface to setting values174 # New leaner interface to setting values 175 175 def set_values(self, 176 176 numeric = None, # List, numeric array or constant … … 178 178 function = None, # Callable object: f(x,y) 179 179 geospatial_data = None, # Arbitrary dataset 180 points = None, values = None, data_georef = None, #Input 181 # for fit (obsoleted by use of geo_spatial object) 180 points = None, values = None, data_georef = None, # Obsoleted by use of geo_spatial object 182 181 filename = None, attribute_name = None, #Input from file 183 182 alpha = None, … … 356 355 msg = 'Using points, values or data_georef with set_quantity ' 357 356 msg += 'is obsolete. Please use a Geospatial_data object instead.' 358 warn(msg, DeprecationWarning) 357 #warn(msg, DeprecationWarning) 358 raise Exception, msg 359 359 360 360 … … 400 400 use_cache = use_cache) 401 401 elif points is not None: 402 print 'The usage of points in set_values will be deprecated.' +\ 403 'Please use the geospatial_data object.' 404 405 msg = 'When points are specified, associated values must also be.' 406 assert values is not None, msg 407 self.set_values_from_points(points, values, alpha, 408 location, indices, 409 data_georef = data_georef, 410 verbose = verbose, 411 use_cache = use_cache) 402 msg = 'The usage of points in set_values has been deprecated.' +\ 403 'Please use the geospatial_data object instead.' 404 raise Exception, msg 405 406 407 412 408 elif filename is not None: 413 409 if hasattr(self.domain, 'points_file_block_line_size'): … … 704 700 705 701 706 self.set_values_from_points(points, values, alpha,707 location, indices,708 data_georef = data_georef,709 verbose = verbose,710 use_cache = use_cache)711 712 713 714 def set_values_from_points(self, points, values, alpha,715 location, indices,716 data_georef = None,717 verbose = False,718 use_cache = False):719 """720 Set quantity values from arbitray data points using721 fit_interpolate.fit722 """723 724 725 702 from anuga.coordinate_transforms.geo_reference import Geo_reference 726 703 … … 744 721 745 722 mesh_georef = self.domain.geo_reference 746 747 #print mesh_georef748 #print data_georef749 #print points750 723 751 724 … … 763 736 self.set_values_from_array(vertex_attributes, 764 737 location, indices, verbose) 738 739 740 741 def set_values_from_points(self, points, values, alpha, 742 location, indices, 743 data_georef = None, 744 verbose = False, 745 use_cache = False): 746 """ 747 Set quantity values from arbitray data points using 748 fit_interpolate.fit 749 """ 750 751 raise Exception, 'set_values_from_points is obsolete, use geospatial data object instead' 752 765 753 766 754 def set_values_from_file(self, filename, attribute_name, alpha, … … 782 770 783 771 if location != 'vertices': 784 msg = 'set_values_from_ pointsis only defined for '+\772 msg = 'set_values_from_file is only defined for '+\ 785 773 'location=\'vertices\'' 786 774 raise msg
Note: See TracChangeset
for help on using the changeset viewer.