- Timestamp:
- Mar 19, 2008, 8:02:05 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/shallow_water/shallow_water_ext.c
r5162 r5175 589 589 // Calculate minimal depth across all three vertices 590 590 hmin = min(hv[0], min(hv[1], hv[2])); 591 592 //if (hmin < 0.0 ) { 593 // printf("hmin = %f\n",hmin); 594 //} 591 595 592 596 … … 647 651 } 648 652 649 653 //printf("alpha=%f, tight_slope_limiters=%d\n", alpha, tight_slope_limiters); 654 650 655 /* 651 656 // Experimental code for controlling velocities at vertices. … … 704 709 705 710 // Update momentum at vertices 706 if (tight_slope_limiters == 1) { 707 // FIXME(Ole): Here's what I think (as of 17 Nov 2007) 711 712 713 // Update momentum at vertices 714 // Update momentum as a linear combination of 715 // xmomc and ymomc (shallow) and momentum 716 // from extrapolator xmomv and ymomv (deep). 717 718 719 //xmomv[k3+i] = (1-alpha)*xmomc[k] + alpha*xmomv[k3+i]; 720 //ymomv[k3+i] = (1-alpha)*ymomc[k] + alpha*ymomv[k3+i]; 721 722 if (tight_slope_limiters == 1) { 723 // FIXME(Ole): Here's what I think (as of 17 Nov 2007) 708 724 // we need to do. Simple and efficient: 709 725 … … 721 737 hv[i] = wv[k3+i] - zv[k3+i]; // Recompute (balanced) vertex depth 722 738 xmomv[k3+i] = uc*hv[i]; 723 ymomv[k3+i] = vc*hv[i]; 739 ymomv[k3+i] = vc*hv[i]; 724 740 } else { 725 741 // Update momentum as a linear combination of 726 742 // xmomc and ymomc (shallow) and momentum 727 743 // from extrapolator xmomv and ymomv (deep). 728 // FIXME (Ole): Is this really needed? Could we use the above 744 // FIXME (Ole): Is this really needed? Could we use the above 729 745 // instead? 730 746 … … 1189 1205 1190 1206 hfactor = 0.0; 1191 if (hmin > 0. 1 ) {1192 hfactor = (hmin-0. 1)/(hmin+0.4);1207 if (hmin > 0.001 ) { 1208 hfactor = (hmin-0.001)/(hmin+0.004); 1193 1209 } 1194 1210
Note: See TracChangeset
for help on using the changeset viewer.