Changeset 4631
- Timestamp:
- Jul 18, 2007, 6:08:10 PM (17 years ago)
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/config.py
r4502 r4631 81 81 beta_h = 0.2 82 82 83 # beta_h can be safely put to zero esp if we are using limit2007= 1. This will83 # beta_h can be safely put to zero esp if we are using tight_slope_limiters = 1. This will 84 84 # also speed things up. 85 85 beta_h = 0.0 … … 94 94 95 95 # Flag use of new limiters. 96 # limit2007= 0 means use old limiters (e.g. for some tests)97 # limit2007= 1 means use new limiters that hug the bathymetry closer98 limit2007= 096 # tight_slope_limiters = 0 means use old limiters (e.g. for some tests) 97 # tight_slope_limiters = 1 means use new limiters that hug the bathymetry closer 98 tight_slope_limiters = 0 99 99 100 100 -
anuga_core/source/anuga/shallow_water/shallow_water_domain.py
r4554 r4631 100 100 from anuga.config import minimum_allowed_height, maximum_allowed_speed 101 101 from anuga.config import g, beta_h, beta_w, beta_w_dry,\ 102 beta_uh, beta_uh_dry, beta_vh, beta_vh_dry, limit2007102 beta_uh, beta_uh_dry, beta_vh, beta_vh_dry, tight_slope_limiters 103 103 from anuga.config import alpha_balance 104 104 … … 163 163 self.alpha_balance = alpha_balance 164 164 165 self. limit2007 = limit2007165 self.tight_slope_limiters = tight_slope_limiters 166 166 167 167 self.flux_function = flux_function_central … … 232 232 233 233 #FIXME (Ole): rename H0 to minimum_allowed_height_in_flux_computation 234 #rename limit2007to tight_slope_limiters.234 #rename tight_slope_limiters to tight_slope_limiters. 235 235 #Maybe use histogram to identify isolated extreme speeds and deal with them adaptively 236 236 #similarly to how we used to use 1 order steps to recover. -
anuga_core/source/anuga/shallow_water/shallow_water_ext.c
r4376 r4631 428 428 double* ymomv, 429 429 double H0, 430 int limit2007,430 int tight_slope_limiters, 431 431 double alpha_balance) { 432 432 … … 451 451 hmin = hv[k3]; 452 452 for (i=0; i<3; i++) { 453 if ( limit2007== 0) {453 if (tight_slope_limiters == 0) { 454 454 dz = max(dz, fabs(zv[k3+i]-zc[k])); 455 455 } … … 464 464 465 465 466 if ( limit2007== 0) {466 if (tight_slope_limiters == 0) { 467 467 //If hmin > dz/alpha_balance then alpha = 1 and the bed will have no 468 468 //effect … … 1639 1639 double H0; 1640 1640 1641 int N, limit2007; //, err;1641 int N, tight_slope_limiters; //, err; 1642 1642 1643 1643 // Convert Python arguments to C … … 1670 1670 1671 1671 1672 Tmp = PyObject_GetAttrString(domain, " limit2007");1672 Tmp = PyObject_GetAttrString(domain, "tight_slope_limiters"); 1673 1673 if (!Tmp) { 1674 PyErr_SetString(PyExc_RuntimeError, "shallow_water_ext.c: balance_deep_and_shallow could not obtain object limit2007from domain");1674 PyErr_SetString(PyExc_RuntimeError, "shallow_water_ext.c: balance_deep_and_shallow could not obtain object tight_slope_limiters from domain"); 1675 1675 return NULL; 1676 1676 } 1677 limit2007= PyInt_AsLong(Tmp);1677 tight_slope_limiters = PyInt_AsLong(Tmp); 1678 1678 Py_DECREF(Tmp); 1679 1679 … … 1696 1696 (double*) ymomv -> data, 1697 1697 H0, 1698 (int) limit2007,1698 (int) tight_slope_limiters, 1699 1699 alpha_balance); 1700 1700 -
anuga_core/source/anuga/shallow_water/test_data_manager.py
r4615 r4631 355 355 sww.store_connectivity() 356 356 sww.store_timestep('stage') 357 #self.domain. limit2007= 1357 #self.domain.tight_slope_limiters = 1 358 358 self.domain.evolve_to_end(finaltime = 0.01) 359 359 sww.store_timestep('stage') … … 412 412 sww.store_connectivity() 413 413 sww.store_timestep('stage') 414 #self.domain. limit2007= 1414 #self.domain.tight_slope_limiters = 1 415 415 self.domain.evolve_to_end(finaltime = 0.01) 416 416 sww.store_timestep('stage') … … 464 464 self.domain.store = True 465 465 self.domain.beta_h = 0 466 #self.domain. limit2007= 1466 #self.domain.tight_slope_limiters = 1 467 467 468 468 #Evolution … … 507 507 sww.store_timestep('stage') 508 508 509 #self.domain. limit2007= 1509 #self.domain.tight_slope_limiters = 1 510 510 self.domain.evolve_to_end(finaltime = 0.01) 511 511 sww.store_timestep('stage') … … 1137 1137 sww.store_timestep('stage') 1138 1138 1139 #self.domain. limit2007= 11139 #self.domain.tight_slope_limiters = 1 1140 1140 1141 1141 self.domain.evolve_to_end(finaltime = 0.01) … … 1851 1851 sww.store_timestep('stage') 1852 1852 1853 domain. limit2007= 11853 domain.tight_slope_limiters = 1 1854 1854 domain.evolve_to_end(finaltime = 0.01) 1855 1855 sww.store_timestep('stage') … … 2037 2037 sww.store_timestep('stage') 2038 2038 2039 #domain. limit2007= 12039 #domain.tight_slope_limiters = 1 2040 2040 domain.evolve_to_end(finaltime = 0.01) 2041 2041 sww.store_timestep('stage') … … 2186 2186 sww.store_timestep('stage') 2187 2187 2188 #self.domain. limit2007= 12188 #self.domain.tight_slope_limiters = 1 2189 2189 self.domain.evolve_to_end(finaltime = 0.01) 2190 2190 sww.store_timestep('stage') … … 2298 2298 sww.store_timestep('stage') 2299 2299 2300 #self.domain. limit2007= 12300 #self.domain.tight_slope_limiters = 1 2301 2301 self.domain.evolve_to_end(finaltime = 0.01) 2302 2302 sww.store_timestep('stage') … … 2557 2557 sww.store_timestep('stage') 2558 2558 2559 #self.domain. limit2007= 12559 #self.domain.tight_slope_limiters = 1 2560 2560 self.domain.evolve_to_end(finaltime = 0.01) 2561 2561 sww.store_timestep('stage') … … 2657 2657 sww.store_timestep('stage') 2658 2658 2659 #self.domain. limit2007= 12659 #self.domain.tight_slope_limiters = 1 2660 2660 self.domain.evolve_to_end(finaltime = 0.01) 2661 2661 sww.store_timestep('stage') … … 3409 3409 self.domain.reduction = mean 3410 3410 self.domain.set_datadir('.') 3411 #self.domain. limit2007= 13411 #self.domain.tight_slope_limiters = 1 3412 3412 3413 3413 … … 3481 3481 domain.check_integrity() 3482 3482 #Evolution 3483 #domain. limit2007= 13483 #domain.tight_slope_limiters = 1 3484 3484 for t in domain.evolve(yieldstep = yiel, finaltime = 0.05): 3485 3485 #domain.write_time() -
anuga_core/source/anuga/shallow_water/test_shallow_water_domain.py
r4588 r4631 976 976 domain = Domain(points, vertices, boundary) 977 977 domain.set_name('runup_test') 978 #domain. limit2007= 1 #FIXME: This works better with old limiters978 #domain.tight_slope_limiters = 1 #FIXME: This works better with old limiters 979 979 980 980 #-------------------------------------------------------------- … … 1169 1169 1170 1170 # FIXME (Ole): Need tests where this is commented out 1171 domain. limit2007= 0 # Backwards compatibility (14/4/7)1171 domain.tight_slope_limiters = 0 # Backwards compatibility (14/4/7) 1172 1172 domain.H0 = 0 # Backwards compatibility (6/2/7) 1173 1173 domain.beta_h = 0.2 # Backwards compatibility (14/2/7) … … 2084 2084 domain._order_ = 1 2085 2085 2086 domain. limit2007= 02086 domain.tight_slope_limiters = 0 2087 2087 domain.distribute_to_vertices_and_edges() 2088 2088 assert allclose(L[1], [0.1, 20.1, 20.1]) … … 2090 2090 assert allclose(volumes[i], sum(L[i])/3) 2091 2091 2092 domain. limit2007= 1 # Allow triangle to be flatter (closer to bed)2092 domain.tight_slope_limiters = 1 # Allow triangle to be flatter (closer to bed) 2093 2093 domain.distribute_to_vertices_and_edges() 2094 2094 assert allclose(L[1], [0.298, 20.001, 20.001]) … … 2098 2098 domain._order_ = 2 2099 2099 2100 domain. limit2007= 02100 domain.tight_slope_limiters = 0 2101 2101 domain.distribute_to_vertices_and_edges() 2102 2102 assert allclose(L[1], [0.1, 20.1, 20.1]) … … 2104 2104 assert allclose(volumes[i], sum(L[i])/3) 2105 2105 2106 domain. limit2007= 1 # Allow triangle to be flatter (closer to bed)2106 domain.tight_slope_limiters = 1 # Allow triangle to be flatter (closer to bed) 2107 2107 domain.distribute_to_vertices_and_edges() 2108 2108 assert allclose(L[1], [0.298, 20.001, 20.001]) … … 2154 2154 domain._order_ = 1 2155 2155 2156 domain. limit2007= 02156 domain.tight_slope_limiters = 0 2157 2157 domain.distribute_to_vertices_and_edges() 2158 2158 assert allclose(L[1], [4.1, 16.1, 20.1]) … … 2161 2161 2162 2162 2163 domain. limit2007= 1 # Allow triangle to be flatter (closer to bed)2163 domain.tight_slope_limiters = 1 # Allow triangle to be flatter (closer to bed) 2164 2164 domain.distribute_to_vertices_and_edges() 2165 2165 assert allclose(L[1], [4.2386, 16.0604, 20.001]) … … 2170 2170 domain._order_ = 2 2171 2171 2172 domain. limit2007= 02172 domain.tight_slope_limiters = 0 2173 2173 domain.distribute_to_vertices_and_edges() 2174 2174 assert allclose(L[1], [4.1, 16.1, 20.1]) … … 2176 2176 assert allclose(volumes[i], sum(L[i])/3) 2177 2177 2178 domain. limit2007= 1 # Allow triangle to be flatter (closer to bed)2178 domain.tight_slope_limiters = 1 # Allow triangle to be flatter (closer to bed) 2179 2179 domain.distribute_to_vertices_and_edges() 2180 2180 assert allclose(L[1], [4.23370103, 16.06529897, 20.001]) … … 2234 2234 2235 2235 # FIXME (Ole): Need tests where this is commented out 2236 domain. limit2007= 0 # Backwards compatibility (14/4/7)2236 domain.tight_slope_limiters = 0 # Backwards compatibility (14/4/7) 2237 2237 2238 2238 … … 2320 2320 2321 2321 #Also check that Python and C version produce the same 2322 # No longer applicable if limit2007== 12322 # No longer applicable if tight_slope_limiters == 1 2323 2323 #print stage.vertex_values 2324 2324 #assert allclose (stage.vertex_values, … … 3176 3176 # FIXME (Ole): Need tests where these two are commented out 3177 3177 domain.H0 = 0 # Backwards compatibility (6/2/7) 3178 domain. limit2007= 0 # Backwards compatibility (14/4/7)3178 domain.tight_slope_limiters = 0 # Backwards compatibility (14/4/7) 3179 3179 3180 3180 #Bed-slope and friction … … 3248 3248 3249 3249 # FIXME (Ole): Need tests where this is commented out 3250 domain. limit2007= 0 # Backwards compatibility (14/4/7)3250 domain.tight_slope_limiters = 0 # Backwards compatibility (14/4/7) 3251 3251 3252 3252 #Bed-slope and friction at vertices (and interpolated elsewhere) … … 3344 3344 3345 3345 # FIXME (Ole): Need tests where this is commented out 3346 domain. limit2007= 0 # Backwards compatibility (14/4/7)3346 domain.tight_slope_limiters = 0 # Backwards compatibility (14/4/7) 3347 3347 domain.H0 = 0 # Backwards compatibility (6/2/7) 3348 3348 … … 3446 3446 3447 3447 # FIXME (Ole): Need tests where this is commented out 3448 domain. limit2007= 0 # Backwards compatibility (14/4/7)3448 domain.tight_slope_limiters = 0 # Backwards compatibility (14/4/7) 3449 3449 domain.H0 = 0 # Backwards compatibility (6/2/7) 3450 3450 … … 3546 3546 # FIXME (Ole): Need tests where these two are commented out 3547 3547 domain.H0 = 0 # Backwards compatibility (6/2/7) 3548 domain. limit2007= 0 # Backwards compatibility (14/4/7)3548 domain.tight_slope_limiters = 0 # Backwards compatibility (14/4/7) 3549 3549 3550 3550 … … 3678 3678 domain.beta_h = 0.0 #Use first order in h-limiter 3679 3679 domain.H0 = 0.001 3680 domain. limit2007= 13680 domain.tight_slope_limiters = 1 3681 3681 3682 3682 #Bed-slope and friction at vertices (and interpolated elsewhere) … … 3806 3806 # FIXME (Ole): Need tests where these two are commented out 3807 3807 domain.H0 = 0 # Backwards compatibility (6/2/7) 3808 domain. limit2007= 0 # Backwards compatibility (14/4/7)3808 domain.tight_slope_limiters = 0 # Backwards compatibility (14/4/7) 3809 3809 3810 3810 … … 4537 4537 domain = Domain(points, vertices, boundary) 4538 4538 domain.default_order = 2 4539 domain. limit2007= 14539 domain.tight_slope_limiters = 1 4540 4540 domain.H0 = 0.01 4541 4541 -
anuga_validation/automated_validation_tests/okushiri_tank_validation/run_okushiri.py
r4491 r4631 61 61 # (this in planned to be the default!) 62 62 domain.beta_h = 0.0 63 domain. limit2007= 1 # Run time invariant in this case63 domain.tight_slope_limiters = 1 # Run time invariant in this case 64 64 65 65 #------------------------- -
anuga_validation/okushiri_2005/run_okushiri.py
r4260 r4631 57 57 domain.set_minimum_storable_height(0.001) # Don't store w < 0.001m 58 58 domain.set_maximum_allowed_speed(0.1) # Allow a little runoff (0.1 is OK) 59 domain. limit2007= 159 domain.tight_slope_limiters = 1 60 60 domain.beta_h = 0.0 61 61 62 62 #Timings on AMD64-242 (beta_h=0) 63 # limit2007= 0:63 # tight_slope_limiters = 0: 64 64 # 3035s - 3110s 65 # limit2007= 1:65 # tight_slope_limiters = 1: 66 66 # 3000s - 3008s 67 67 # -
anuga_validation/performance_tests/okushiri/run_okushiri_profile.py
r4578 r4631 63 63 # (this in planned to be the default!) 64 64 domain.beta_h = 0.0 65 domain. limit2007= 1 # Run time invariant in this case65 domain.tight_slope_limiters = 1 # Run time invariant in this case 66 66 67 67 #------------------------- -
anuga_validation/solitary_waves/solitary_wave_runup.py
r4362 r4631 87 87 #domain.set_minimum_allowed_height(0.01) 88 88 domain.beta_h = 0.0 89 domain. limit2007= 189 domain.tight_slope_limiters = 1 90 90 domain.set_name(simulation_name) 91 91 -
anuga_work/development/Rudy_vandrie_2007/run_example.py
r4440 r4631 61 61 # (this in planned to be the default!) 62 62 domain.beta_h = 0.0 63 domain. limit2007= 063 domain.tight_slope_limiters = 0 64 64 65 65 #------------------------- -
anuga_work/development/Rudy_vandrie_2007/run_hydro_example.py
r4440 r4631 31 31 domain.set_minimum_storable_height(0.0001) 32 32 domain.beta_h = 0.0 33 domain. limit2007= 133 domain.tight_slope_limiters = 1 34 34 35 35 -
anuga_work/development/dam_test_from_brad_2007/dam_sample.py
r4258 r4631 30 30 #domain.set_store_vertices_uniquely(True) # Look at the 'real' triangles 31 31 domain.beta_h = 0.0 32 domain. limit2007= 132 domain.tight_slope_limiters = 1 33 33 domain.set_minimum_allowed_height(0.01) 34 34 -
anuga_work/development/demos/island.py
r4539 r4631 64 64 65 65 domain.beta_h = 0.0 66 domain. limit2007= 166 domain.tight_slope_limiters = 1 67 67 68 68 #------------------------------------------------------------------------------ -
anuga_work/development/demos/limiter_test.py
r4539 r4631 27 27 domain.set_store_vertices_uniquely(True) 28 28 domain.set_default_order(2) 29 domain. limit2007= 129 domain.tight_slope_limiters = 1 30 30 31 31 #------------------------------------------------------------------------------ -
anuga_work/production/broome_2006/run_broome_urs.py
r4587 r4631 174 174 print 'domain id', id(domain) 175 175 domain.beta_h = 0 176 #domain. limit2007= 1176 #domain.tight_slope_limiters = 1 177 177 178 178 #------------------------------------------------------------------------- -
anuga_work/production/dampier_2006/run_dampier.py
r4430 r4631 160 160 print 'domain id', id(domain) 161 161 domain.beta_h = 0 162 #domain. limit2007= 1162 #domain.tight_slope_limiters = 1 163 163 164 164 #------------------------------------------------------------------------- -
anuga_work/production/dampier_2006/run_dampier_simple.py
r4357 r4631 233 233 print 'domain id', id(domain) 234 234 domain.beta_h = 0 235 domain. limit2007= 1235 domain.tight_slope_limiters = 1 236 236 ''' 237 237 #------------------------------------------------------------------------- -
anuga_work/production/dampier_2006/run_dampier_urs.py
r4587 r4631 169 169 print 'domain id', id(domain) 170 170 domain.beta_h = 0 171 #domain. limit2007= 1171 #domain.tight_slope_limiters = 1 172 172 173 173 #------------------------------------------------------------------------- -
anuga_work/production/exmouth_2006/run_exmouth.py
r4587 r4631 170 170 domain.beta_h = 0 #sets the surface of the triangle to follow the bathy 171 171 #domain.H0=0.01 #controls the flux limiter (limiter2007) 172 #domain. limit2007= 1 #minimises creep172 #domain.tight_slope_limiters = 1 #minimises creep 173 173 174 174 #------------------------------------------------------------------------- -
anuga_work/production/onslow_2006/run_onslow_urs.py
r4587 r4631 170 170 domain.beta_h = 0 #sets the surface of the triangle to follow the bathy 171 171 #domain.H0=0.01 #controls the flux limiter (limiter2007) 172 #domain. limit2007= 1 #minimises creep172 #domain.tight_slope_limiters = 1 #minimises creep 173 173 174 174 #------------------------------------------------------------------------- -
anuga_work/production/onslow_2006/ticket160_run.py
r4506 r4631 182 182 domain.set_maximum_allowed_speed(0.1) # Allow a little runoff (0.1 is OK) 183 183 domain.beta_h = 0 184 domain. limit2007= 1184 domain.tight_slope_limiters = 1 185 185 domain.H0=0.01 186 186 -
anuga_work/production/pt_hedland_2006/run_pt_hedland_urs.py
r4587 r4631 162 162 domain.beta_h = 0 #sets the surface of the triangle to follow the bathy 163 163 #domain.H0=0.01 #controls the flux limiter (limiter2007) 164 #domain. limit2007= 1 #minimises creep164 #domain.tight_slope_limiters = 1 #minimises creep 165 165 166 166 #------------------------------------------------------------------------- -
anuga_work/production/shark_bay_2007/run_shark_bay.py
r4630 r4631 170 170 print 'domain id', id(domain) 171 171 domain.beta_h = 0 172 #domain. limit2007= 1172 #domain.tight_slope_limiters = 1 173 173 174 174 -
anuga_work/production/shark_bay_2007/run_shark_bay_frequency_sweep.py
r4625 r4631 162 162 print 'domain id', id(domain) 163 163 domain.beta_h = 0 164 #domain. limit2007= 1164 #domain.tight_slope_limiters = 1 165 165 166 166
Note: See TracChangeset
for help on using the changeset viewer.