Ignore:
Timestamp:
Mar 19, 2008, 8:02:05 PM (16 years ago)
Author:
steve
Message:

Ole and I seem to have got edge limiteri working.
Set domain.use_edge_limiter = True
to test the method

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/shallow_water/shallow_water_ext.c

    r5162 r5175  
    589589    // Calculate minimal depth across all three vertices
    590590    hmin = min(hv[0], min(hv[1], hv[2]));
     591
     592    //if (hmin < 0.0 ) {
     593    //  printf("hmin = %f\n",hmin);
     594    //}
    591595   
    592596
     
    647651      }
    648652
    649      
     653      //printf("alpha=%f, tight_slope_limiters=%d\n", alpha, tight_slope_limiters);
     654
    650655      /*     
    651656      // Experimental code for controlling velocities at vertices.
     
    704709
    705710        // 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)
    708724          // we need to do. Simple and efficient:
    709725       
     
    721737          hv[i] = wv[k3+i] - zv[k3+i]; // Recompute (balanced) vertex depth
    722738          xmomv[k3+i] = uc*hv[i];
    723           ymomv[k3+i] = vc*hv[i];       
     739          ymomv[k3+i] = vc*hv[i];
    724740        } else {
    725741          // Update momentum as a linear combination of
    726742          // xmomc and ymomc (shallow) and momentum
    727743          // 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
    729745          // instead?
    730746         
     
    11891205
    11901206      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);
    11931209      }
    11941210     
Note: See TracChangeset for help on using the changeset viewer.