Changeset 2447
- Timestamp:
- Feb 24, 2006, 6:21:06 PM (19 years ago)
- Location:
- inundation
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/load_mesh/loadASCII.py
r2262 r2447 989 989 Note: will throw an IOError if it can't load the file. 990 990 Catch these! 991 992 #FIXME (Ole): This function should really return a Geospatial_data object. 991 993 """ 992 994 -
inundation/pyvolution/least_squares.py
r2347 r2447 127 127 128 128 if verbose: print "points file loaded" 129 if verbose: print "fitting to mesh"129 if verbose: print "fitting to mesh" 130 130 f = fit_to_mesh(vertex_coordinates, 131 131 triangles, … … 156 156 157 157 #FIXME (Ole): Remember to output mesh_origin as well 158 if verbose: print "exporting to file ", mesh_output_file158 if verbose: print "exporting to file ", mesh_output_file 159 159 160 160 try: … … 174 174 data_origin = None, 175 175 mesh_origin = None, 176 precrop = False): 176 precrop = False, 177 use_cache = False): 177 178 """ 178 179 Fit a smooth surface to a triangulation, … … 202 203 """ 203 204 204 205 interp = Interpolation(vertex_coordinates, 206 triangles, 207 point_coordinates, 208 alpha = alpha, 209 verbose = verbose, 210 expand_search = expand_search, 211 data_origin = data_origin, 212 mesh_origin = mesh_origin, 213 precrop = precrop) 205 if use_cache is True: 206 from caching.caching import cache 207 interp = cache(_interpolation, 208 (vertex_coordinates, 209 triangles, 210 point_coordinates), 211 {'alpha': alpha, 212 'verbose': verbose, 213 'expand_search': expand_search, 214 'data_origin': data_origin, 215 'mesh_origin': mesh_origin, 216 'precrop': precrop}, 217 verbose = verbose) 218 219 else: 220 interp = Interpolation(vertex_coordinates, 221 triangles, 222 point_coordinates, 223 alpha = alpha, 224 verbose = verbose, 225 expand_search = expand_search, 226 data_origin = data_origin, 227 mesh_origin = mesh_origin, 228 precrop = precrop) 214 229 215 230 vertex_attributes = interp.fit_points(point_attributes, verbose = verbose) … … 272 287 return vertex_coordinates, triangles, boundary, vertex_attributes 273 288 289 290 def _interpolation(*args, **kwargs): 291 """Private function for use with caching. Reason is that classes 292 may change their byte code between runs which is annoying. 293 """ 294 295 return Interpolation(*args, **kwargs) 274 296 275 297 -
inundation/pyvolution/quantity.py
r2366 r2447 690 690 691 691 #Read from (NetCDF) file 692 #FIXME (Ole): This function should really return a Geospatial_data object. 692 693 points_dict = import_points_file(filename) 693 694 points = points_dict['pointlist']
Note: See TracChangeset
for help on using the changeset viewer.