Changeset 591
- Timestamp:
- Nov 18, 2004, 4:58:42 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/pyvolution/quantity.py
r590 r591 185 185 186 186 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 function190 191 f: x, y -> z Function where x, y and z are arrays192 location: Where values are to be stored.193 Permissible options are: vertices, edges, centroid194 Default is "vertices"195 """196 197 if location == 'centroids':198 P = self.domain.centroid_coordinates199 self.set_values(f(P[:,0], P[:,1]), location)200 elif location == 'edges':201 raise 'Not implemented: %s' %location202 else:203 #Vertices204 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):210 187 def set_function_values(self, f, location='vertices', indexes = None): 211 188 """Set values for quantity using specified function … … 241 218 else: 242 219 raise 'Not implemented: %s' %location 220 243 221 244 222 def set_array_values(self, values, location='vertices', indexes = None):
Note: See TracChangeset
for help on using the changeset viewer.