Changeset 4825
- Timestamp:
- Nov 17, 2007, 5:58:06 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/shallow_water/shallow_water_ext.c
r4823 r4825 558 558 double hv[3], h; // Depths at vertices 559 559 double Fx, Fy; // Froude numbers 560 double uc, vc; // Centroid speeds 560 561 561 562 // Compute linear combination between w-limited stages and … … 702 703 } 703 704 704 // Update momentum as a linear combination of 705 // xmomc and ymomc (shallow) and momentum 706 // from extrapolator xmomv and ymomv (deep). 707 // FIXME (Ole): Is this really needed? 708 xmomv[k3+i] = (1-alpha)*xmomc[k] + alpha*xmomv[k3+i]; 709 ymomv[k3+i] = (1-alpha)*ymomc[k] + alpha*ymomv[k3+i]; 705 // Update momentum at vertices 706 if (tight_slope_limiters == 1) { 707 // FIXME(Ole): Here's what I think (as of 17 Nov 2007) 708 // we need to do. Simple and efficient: 709 710 // Speeds at centroids 711 if (hc_k > epsilon) { 712 uc = xmomc[k]/hc_k; 713 vc = ymomc[k]/hc_k; 714 } else { 715 uc = 0.0; 716 vc = 0.0; 717 } 718 // Vertex momenta guaranteed to be consistent with depth guaranteeing 719 // controlled speed 720 xmomv[k3+i] = uc*hv[i]; 721 ymomv[k3+i] = vc*hv[i]; 722 } else { 723 // Update momentum as a linear combination of 724 // xmomc and ymomc (shallow) and momentum 725 // from extrapolator xmomv and ymomv (deep). 726 // FIXME (Ole): Is this really needed? 727 728 xmomv[k3+i] = (1-alpha)*xmomc[k] + alpha*xmomv[k3+i]; 729 ymomv[k3+i] = (1-alpha)*ymomc[k] + alpha*ymomv[k3+i]; 730 731 } 710 732 } 711 733 } … … 722 744 723 745 // FIXME (Ole): currently only used with tights_SL 746 747 // FIXME (Ole): may not be necessary now 724 748 725 749 excessive_froude_number=0;
Note: See TracChangeset
for help on using the changeset viewer.