Ignore:
Timestamp:
Sep 18, 2007, 3:18:32 PM (17 years ago)
Author:
ole
Message:

Cleaned up some obsolete code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/abstract_2d_finite_volumes/quantity.py

    r4728 r4735  
    172172
    173173
    174     #New leaner interface to setting values
     174    # New leaner interface to setting values
    175175    def set_values(self,
    176176                   numeric = None,    # List, numeric array or constant
     
    178178                   function = None,   # Callable object: f(x,y)
    179179                   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
    182181                   filename = None, attribute_name = None, #Input from file
    183182                   alpha = None,
     
    356355            msg = 'Using points, values or data_georef with set_quantity '
    357356            msg += 'is obsolete. Please use a Geospatial_data object instead.'
    358             warn(msg, DeprecationWarning)
     357            #warn(msg, DeprecationWarning)
     358            raise Exception, msg
    359359
    360360
     
    400400                                                     use_cache = use_cache)
    401401        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           
    412408        elif filename is not None:
    413409            if hasattr(self.domain, 'points_file_block_line_size'):
     
    704700
    705701
    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 using
    721         fit_interpolate.fit
    722         """
    723 
    724 
    725702        from anuga.coordinate_transforms.geo_reference import Geo_reference
    726703
     
    744721
    745722        mesh_georef = self.domain.geo_reference
    746 
    747         #print mesh_georef
    748         #print data_georef
    749         #print points
    750723
    751724
     
    763736        self.set_values_from_array(vertex_attributes,
    764737                                   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       
    765753
    766754    def set_values_from_file(self, filename, attribute_name, alpha,
     
    782770
    783771        if location != 'vertices':
    784             msg = 'set_values_from_points is only defined for '+\
     772            msg = 'set_values_from_file is only defined for '+\
    785773                  'location=\'vertices\''
    786774            raise msg
Note: See TracChangeset for help on using the changeset viewer.