Ignore:
Timestamp:
Jun 8, 2005, 4:24:43 PM (19 years ago)
Author:
matthew
Message:

In manning_friction, the line S /= pow(h,7.0/3) has been replaced by S /= exp(7.0/3.0*log(h)). On run_pofile.py, with N=128, the running time is 59.21 secs (averaged over 3 runs). Making the above change to manning_friction means that the time consumed by manning_friction is reduced from 4.51 secs to 3.79 secs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/ga/storm_surge/pyvolution/shallow_water_ext.c

    r1387 r1505  
    170170      if (h >= eps) {
    171171        S = -g * eta[k]*eta[k] * sqrt((uh[k]*uh[k] + vh[k]*vh[k]));
    172         S /= pow(h, 7.0/3);      //Expensive (on Ole's home computer)
     172        //S /= pow(h, 7.0/3);      //Expensive (on Ole's home computer)
     173        S /= exp(7.0/3.0*log(h));      //seems to save about 15% over manning_friction
    173174        //S /= h*h*(1 + h/3.0 - h*h/9.0); //FIXME: Could use a Taylor expansion
    174175
Note: See TracChangeset for help on using the changeset viewer.