Changeset 8880
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/shallow_water/swb2_domain_ext.c
r8582 r8880 230 230 } 231 231 232 *pressure_flux = 0. 5*g*( s_max*h_left*h_left -s_min*h_right*h_right)*inverse_denominator;232 *pressure_flux = 0.;//0.5*g*( s_max*h_left*h_left -s_min*h_right*h_right)*inverse_denominator; 233 233 234 234 // Maximal wavespeed … … 294 294 double *max_bed_edgevalue, *min_bed_edgevalue; 295 295 296 max_bed_edgevalue = malloc(number_of_elements*sizeof(double));297 min_bed_edgevalue = malloc(number_of_elements*sizeof(double));296 //max_bed_edgevalue = malloc(number_of_elements*sizeof(double)); 297 //min_bed_edgevalue = malloc(number_of_elements*sizeof(double)); 298 298 // Start computation 299 299 call++; // Flag 'id' of flux calculation for this timestep … … 307 307 308 308 // Compute minimum bed edge value on each triangle 309 for (k = 0; k < number_of_elements; k++){310 max_bed_edgevalue[k] = max(bed_edge_values[3*k],311 max(bed_edge_values[3*k+1], bed_edge_values[3*k+2]));312 min_bed_edgevalue[k] = min(bed_edge_values[3*k],313 min(bed_edge_values[3*k+1], bed_edge_values[3*k+2]));314 315 }309 //for (k = 0; k < number_of_elements; k++){ 310 // max_bed_edgevalue[k] = max(bed_edge_values[3*k], 311 // max(bed_edge_values[3*k+1], bed_edge_values[3*k+2])); 312 // min_bed_edgevalue[k] = min(bed_edge_values[3*k], 313 // min(bed_edge_values[3*k+1], bed_edge_values[3*k+2])); 314 // 315 //} 316 316 317 317 … … 551 551 } // End triangle k 552 552 553 free(max_bed_edgevalue);554 free(min_bed_edgevalue);553 //free(max_bed_edgevalue); 554 //free(min_bed_edgevalue); 555 555 556 556 return timestep; … … 735 735 ymom_centroid_store = malloc(number_of_elements*sizeof(double)); 736 736 stage_centroid_store = malloc(number_of_elements*sizeof(double)); 737 min_elevation_edgevalue = malloc(number_of_elements*sizeof(double));737 //min_elevation_edgevalue = malloc(number_of_elements*sizeof(double)); 738 738 max_elevation_edgevalue = malloc(number_of_elements*sizeof(double)); 739 count_wet_neighbours = malloc(number_of_elements*sizeof(int));739 //count_wet_neighbours = malloc(number_of_elements*sizeof(int)); 740 740 741 741 if(extrapolate_velocity_second_order==1){ … … 751 751 ymom_centroid_values[k] = ymom_centroid_values[k]/dk; 752 752 753 min_elevation_edgevalue[k] = min(elevation_edge_values[3*k],754 min(elevation_edge_values[3*k+1],755 elevation_edge_values[3*k+2]));753 //min_elevation_edgevalue[k] = min(elevation_edge_values[3*k], 754 // min(elevation_edge_values[3*k+1], 755 // elevation_edge_values[3*k+2])); 756 756 max_elevation_edgevalue[k] = max(elevation_edge_values[3*k], 757 757 max(elevation_edge_values[3*k+1], … … 762 762 763 763 // Count how many 'fully submerged' neighbours the cell has 764 for(k=0; k<number_of_elements;k++){765 count_wet_neighbours[k]=0;766 for (i=0; i<3; i++){767 ktmp = surrogate_neighbours[3*k+i];768 if(stage_centroid_values[ktmp] > max_elevation_edgevalue[ktmp]){769 count_wet_neighbours[k]+=1;770 }771 }772 }764 //for(k=0; k<number_of_elements;k++){ 765 // count_wet_neighbours[k]=0; 766 // for (i=0; i<3; i++){ 767 // ktmp = surrogate_neighbours[3*k+i]; 768 // if(stage_centroid_values[ktmp] > max_elevation_edgevalue[ktmp]){ 769 // count_wet_neighbours[k]+=1; 770 // } 771 // } 772 //} 773 773 774 774 // Begin extrapolation routine … … 1266 1266 free(ymom_centroid_store); 1267 1267 free(stage_centroid_store); 1268 free(min_elevation_edgevalue);1268 //free(min_elevation_edgevalue); 1269 1269 free(max_elevation_edgevalue); 1270 free(count_wet_neighbours);1270 //free(count_wet_neighbours); 1271 1271 return 0; 1272 1272 } -
trunk/anuga_work/development/gareth/tests/parabolic/parabolic.py
r8547 r8880 8 8 import numpy 9 9 10 from balanced_dev import *10 #from balanced_dev import * 11 11 #from anuga_tsunami import * 12 12 #from balanced_basic import * 13 13 #from anuga.shallow_water_balanced2.swb2_domain import Domain as Domain 14 #from anuga.shallow_water.shallow_water_domain import Domain as Domain14 from anuga.shallow_water.shallow_water_domain import Domain as Domain 15 15 #--------- 16 16 #Setup computational domain … … 23 23 domain.set_quantities_to_be_stored({'stage': 2, 'xmomentum': 2, 'ymomentum': 2, 'elevation': 1}) 24 24 domain.set_minimum_allowed_height(0.001) 25 domain.set_flow_algorithm('tsunami') 25 26 # Time stepping 26 27 #domain.set_timestepping_method('euler') # Default -
trunk/anuga_work/development/gareth/tests/runup_sinusoid/runup_sinusoid.py
r8867 r8880 14 14 #from swb2_domain import * 15 15 #from balanced_basic import * 16 from balanced_dev import *16 #from balanced_dev import * 17 17 #from anuga_tsunami import * 18 18 … … 22 22 points, vertices, boundary = anuga.rectangular_cross(20,20, len1=1., len2=1.) 23 23 24 domain= Domain(points,vertices,boundary) # Create Domain24 domain=anuga.Domain(points,vertices,boundary) # Create Domain 25 25 domain.set_name('runup_sinusoid_v2') # Output to file runup.sww 26 26 #domain.set_timestepping_method('euler') 27 domain.set_flow_algorithm('tsunami') 27 28 #------------------ 28 29 # Define topography 29 30 #------------------ 30 31 31 ### Pathological 32 scale_me=100.0 33 boundary_ws=-0.1999 32 #### Pathological 33 #scale_me=100.0 34 #boundary_ws=-0.2 35 #init_ws=-0.2 36 #bumpiness=50. # Higher = shorter wavelength oscillations in topography 37 #tstep=0.002 38 #lasttime=1.1 39 40 ### Sensible 41 scale_me=1.0 42 boundary_ws=-0.1 34 43 init_ws=-0.2 35 44 bumpiness=50. # Higher = shorter wavelength oscillations in topography 36 tstep=0.002 37 lasttime=1.1 38 39 ### Sensible 40 #scale_me=1.0 41 #boundary_ws=-0.1 42 #init_ws=-0.2 43 #bumpiness=50. # Higher = shorter wavelength oscillations in topography 44 #tstep=0.2 45 #lasttime=40. 45 tstep=0.2 46 lasttime=40. 46 47 47 48 #domain.minimum_allowed_height=domain.minimum_allowed_height*scale_me # Seems needed to make the algorithms behave … … 108 109 print 'Peak velocity is: ', vv.max(), vv.argmax(), dd[vv.argmax()] 109 110 print 'Volume is', sum(dd_raw*domain.areas) 110 print 'Volume less flux int', sum(dd_raw*domain.areas) - domain.boundary_flux_integral111 #print 'Volume less flux int', sum(dd_raw*domain.areas) - domain.boundary_flux_integral 111 112 112 113
Note: See TracChangeset
for help on using the changeset viewer.