Changeset 8763
- Timestamp:
- Mar 17, 2013, 10:08:46 PM (12 years ago)
- Location:
- trunk/anuga_core
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/demos/cairns/project.py
r8728 r8763 57 57 58 58 # bigger base_scale == less triangles 59 base_scale = 100000 60 base_scale = 10000059 #base_scale = 100000 # 162170 triangles 60 base_scale = 400000 # 42093 61 61 default_res = 100 * base_scale # Background resolution 62 62 islands_res = base_scale -
trunk/anuga_core/demos/cairns/run_cairns.py
r8728 r8763 65 65 domain.set_flow_algorithm('tsunami') 66 66 67 68 67 69 #------------------------------------------------------------------------------ 68 70 # Setup initial conditions -
trunk/anuga_core/source/anuga/fit_interpolate/fit.py
r8757 r8763 46 46 import sys 47 47 48 # Setup for c fitting routines49 # from anuga.utilities import compile50 # if compile.can_use_C_extension('fitsmooth.c'):48 #---------------------------------------------- 49 # C code to build interpolation matrices 50 #---------------------------------------------- 51 51 import fitsmooth 52 #else:53 # msg = "C implementation of fitting algorithms (fitsmooth.c) not avalaible"54 # raise Exception(msg)55 56 # Setup for quad_tree extension57 #from anuga.utilities import compile58 #if compile.can_use_C_extension('quad_tree_ext.c'):59 #from anuga.utilities import quad_tree_ext60 #else:61 # msg = "C implementation of quad tree extension not avaliable"62 # raise Exception(msg)63 64 # Setup for sparse_matrix extension65 #from anuga.utilities import compile66 #if compile.can_use_C_extension('sparse_matrix_ext.c'):67 #from anuga.utilities import sparse_matrix_ext68 #else:69 # msg = "C implementation of sparse_matrix extension not avaliable"70 # raise Exception(msg)71 72 52 73 53 … … 87 67 Padarn Note 05/12/12: This documentation should probably 88 68 be updated to account for the fact that the fitting is now 89 done in c. I wasn't sure what details were neccesary though.69 done in C. I wasn't sure what details were neccesary though. 90 70 91 71 Fit data at points to the vertices of a mesh. … … 134 114 135 115 # NOTE PADARN: NEEDS FIXING - currently need smoothing matrix 136 # even if alpha is zero, due to cfunction expecting it. This116 # even if alpha is zero, due to C function expecting it. This 137 117 # could and should be removed. 138 118 if True: … … 206 186 207 187 # NOTE PADARN: This function was added to emulate behavior of the original 208 # class not using external cfunctions. This method is dangerous as D could188 # class not using external C functions. This method is dangerous as D could 209 189 # be very large - it was added as it is used in a unit test. 210 190 def get_D(self): … … 212 192 213 193 # NOTE PADARN: This function was added to emulate behavior of the original 214 # class so as to pass a unit test. It is completely un eeded.194 # class so as to pass a unit test. It is completely unneeded. 215 195 def build_fit_subset(self, point_coordinates, z=None, attribute_name=None, 216 196 verbose=False, output='dot'): … … 310 290 # PADARN NOTE: THe following block of code is translated from 311 291 # things that were being done in the Geospatial_data object 312 # which is no longer required if data from file in c.292 # which is no longer required if data from file in C. 313 293 #--------------------------------------------------------- 314 294 # Default attribute name here seems to only have possibility … … 358 338 359 339 Inputs: 360 point_coordinates: The co-ordinates of the data points. 340 point_coordinates_or_filename: The co-ordinates of the data points. 341 A filename of a .pts file or a 361 342 List of coordinate pairs [x, y] of 362 data points or an nx2 numeric array or a Geospatial_data object343 data points or an nx2 numeric array or a Geospatial_data object 363 344 or points file filename 364 345 z: Single 1d vector or array of data at the point_coordinates. … … 368 349 if point_coordinates_or_filename[-4:] != ".pts": 369 350 use_blocking_option2 = False 351 370 352 # NOTE PADARN 12/12/12: Currently trying to get all blocking to be done 371 # in c, but blocking option 1, which does everything using the python353 # in C, but blocking option 1, which does everything using the python 372 354 # interface can be used in the meantime (much slower). 355 373 356 #-----------------------BLOCKING OPTION 1---------------------------- 374 357 if use_blocking_option2 is False: … … 401 384 else: 402 385 point_coordinates = point_coordinates_or_filename 386 403 387 #-----------------------BLOCKING OPTION 2---------------------------- 404 388 else: -
trunk/anuga_core/source/anuga/fit_interpolate/fitsmooth.c
r8752 r8763 92 92 93 93 *x = (int)length; 94 95 if ((status = nc_close(ncid))) ERR(status); 96 97 return 0; 98 99 } 100 101 // Takes a netcdf file and gets the x and y corners 102 int _read_net_cdf_corners(char * filename,double *xllcorner, double *yllcorner){ 103 104 int status; /* error status */ 105 int ncid; 106 107 if ((status = nc_open(filename, NC_NOWRITE, &ncid))) ERR(status); 108 109 if ((status = nc_get_att_double(ncid, NC_GLOBAL, "xllcorner", xllcorner))) ERR(status); 110 if ((status = nc_get_att_double(ncid, NC_GLOBAL, "yllcorner", yllcorner))) ERR(status); 94 111 95 112 if ((status = nc_close(ncid))) ERR(status); … … 270 287 //n=10; 271 288 289 double xllcorner, yllcorner; 290 _read_net_cdf_corners(filename,&xllcorner,&yllcorner); 291 292 //printf(" xllcorner %g yllcorner %g\n",xllcorner,yllcorner); 293 294 272 295 double * point_coordinates = malloc(2*sizeof(double)*blocksize); 273 296 double * point_values = malloc(sizeof(double)*blocksize); … … 301 324 302 325 303 double x = point_coordinates[2*k] ;304 double y = point_coordinates[2*k+1] ;326 double x = point_coordinates[2*k]+xllcorner; 327 double y = point_coordinates[2*k+1]+yllcorner; 305 328 triangle * T = search(quadtree,x,y); 306 329 -
trunk/anuga_core/source/anuga_parallel/pymetis/Makefile
r8762 r8763 20 20 21 21 pymetis_module: 22 (cd pymetis; METIS_DIR=$(METIS_DIR) python setup.py build; sh ./get_module)22 (cd pymetis; METIS_DIR=$(METIS_DIR) python setup.py build; sh get_module) 23 23 24 24 for_win32: metis_win32 pymetis_module_win32 -
trunk/anuga_core/source/anuga_parallel/run_parallel_sw_merimbula.py
r8760 r8763 45 45 #mesh_filename = "merimbula_17156.tsh" ; x0 = 756000.0 ; x1 = 756500.0; yieldstep = 50; finaltime = 500 46 46 #mesh_filename = "merimbula_43200_1.tsh" ; x0 = 756000.0 ; x1 = 756500.0; yieldstep = 50; finaltime = 500 47 mesh_filename = "test-100.tsh" ; x0 = 200.0 ; x1 = 300.0; yieldstep = 1; finaltime = 5047 #mesh_filename = "test-100.tsh" ; x0 = 200.0 ; x1 = 300.0; yieldstep = 1; finaltime = 50 48 48 #mesh_filename = "test-20.tsh" ; x0 = 250.0 ; x1 = 350.0; yieldstep = 1; finaltime = 50 49 49 … … 88 88 domain.set_name('merimbula_new') 89 89 domain.set_store(True) 90 domain.set_store_vertices_smoothly( False)90 domain.set_store_vertices_smoothly(True) 91 91 #domain.set_quantity('elevation', Set_Elevation(500.0)) 92 92
Note: See TracChangeset
for help on using the changeset viewer.