- Timestamp:
- Mar 31, 2012, 2:47:12 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_work/development/gareth/experimental/balanced_dev/swb2_domain_ext.c
r8359 r8375 787 787 double dqv[3], qmin, qmax, hmin, hmax, bedmax, stagemin; 788 788 double hc, h0, h1, h2, beta_tmp, hfactor; 789 double xmom_centroid_store[number_of_elements], ymom_centroid_store[number_of_elements], dk, dv0, dv1, dv2, de[3]; 790 double stage_centroid_store[number_of_elements]; 791 789 double dk, dv0, dv1, dv2, de[3]; 790 //double xmom_centroid_store[number_of_elements], ymom_centroid_store[number_of_elements] 791 //double stage_centroid_store[number_of_elements]; 792 793 double *xmom_centroid_store, *ymom_centroid_store, *stage_centroid_store; 794 795 // Use malloc to avoid putting these variables on the stack, which can cause 796 // segfaults in large model runs 797 xmom_centroid_store = malloc(number_of_elements*sizeof(double)); 798 ymom_centroid_store = malloc(number_of_elements*sizeof(double)); 799 stage_centroid_store = malloc(number_of_elements*sizeof(double)); 800 792 801 if(extrapolate_velocity_second_order==1){ 793 802 // Replace momentum centroid with velocity centroid to allow velocity … … 819 828 820 829 if (number_of_boundaries[k]==3) 830 //if (0==0) 821 831 { 822 832 // No neighbours, set gradient on the triangle to zero … … 1366 1376 } 1367 1377 } 1378 1379 free(xmom_centroid_store); 1380 free(ymom_centroid_store); 1381 free(stage_centroid_store); 1368 1382 1369 1383 return 0; … … 1859 1873 number_of_elements = stage_centroid_values -> dimensions[0]; 1860 1874 1875 //printf("In C before Extrapolate"); 1876 //e=1; 1861 1877 // Call underlying computational routine 1862 1878 e = _extrapolate_second_order_edge_sw(number_of_elements, … … 1884 1900 extrapolate_velocity_second_order); 1885 1901 1902 //printf("In C before edges-to-vertices"); 1886 1903 1887 1904 //Extrapolate from edges to vertices … … 1896 1913 (double *) elevation_vertex_values -> data, 1897 1914 extrapolate_velocity_second_order); 1915 //printf("In C after edges-to-vertices"); 1898 1916 1899 1917 if (e == -1) {
Note: See TracChangeset
for help on using the changeset viewer.