Changeset 591


Ignore:
Timestamp:
Nov 18, 2004, 4:58:42 PM (20 years ago)
Author:
duncan
Message:

removed old set_function_values method

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/ga/storm_surge/pyvolution/quantity.py

    r590 r591  
    185185
    186186
    187     #def set_function_values(self, f, location='vertices'):
    188     def set_function_values_old(self, f, location='vertices'):
    189         """Set values for quantity using specified function
    190 
    191         f: x, y -> z Function where x, y and z are arrays
    192         location: Where values are to be stored.
    193                   Permissible options are: vertices, edges, centroid
    194                   Default is "vertices"
    195         """
    196 
    197         if location == 'centroids':
    198             P = self.domain.centroid_coordinates
    199             self.set_values(f(P[:,0], P[:,1]), location)
    200         elif location == 'edges':
    201             raise 'Not implemented: %s' %location
    202         else:
    203             #Vertices
    204             P = self.domain.get_vertex_coordinates()
    205             for i in range(3):
    206                 self.vertex_values[:,i] = f(P[:,2*i], P[:,2*i+1])
    207 
    208 
    209     #def set_function_values_DSG(self, f, location='vertices', indexes = None):
    210187    def set_function_values(self, f, location='vertices', indexes = None):
    211188        """Set values for quantity using specified function
     
    241218        else:
    242219            raise 'Not implemented: %s' %location
     220
    243221           
    244222    def set_array_values(self, values, location='vertices', indexes = None):
Note: See TracChangeset for help on using the changeset viewer.