Changeset 502


Ignore:
Timestamp:
Nov 8, 2004, 6:32:55 PM (20 years ago)
Author:
ole
Message:

Changed from level to height in friction

File:
1 edited

Legend:

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

    r449 r502  
    156156       
    157157void _manning_friction(double g, double eps, int N,
    158                        double* w, double* uh, double* vh,
     158                       double* h, double* uh, double* vh,
    159159                       double* eta, double* xmom, double* ymom) {     
    160160
     
    163163 
    164164  for (k=0; k<N; k++) {
    165     if (w[k] >= eps) {
     165    if (h[k] >= eps) {
    166166      S = -g * eta[k]*eta[k] * sqrt((uh[k]*uh[k] + vh[k]*vh[k]));
    167       S /= pow(w[k], 7.0/3);     
     167      S /= pow(h[k], 7.0/3);     
    168168
    169169      //Update momentum
     
    340340PyObject *manning_friction(PyObject *self, PyObject *args) {
    341341  //
    342   // manning_friction(g, eps, w, uh, vh, eta, xmom_update, ymom_update)
    343   //
    344  
    345  
    346   PyArrayObject *w, *uh, *vh, *eta, *xmom, *ymom;
     342  // manning_friction(g, eps, h, uh, vh, eta, xmom_update, ymom_update)
     343  //
     344 
     345 
     346  PyArrayObject *h, *uh, *vh, *eta, *xmom, *ymom;
    347347  int N;
    348348  double g, eps;
    349349   
    350350  if (!PyArg_ParseTuple(args, "ddOOOOOO",
    351                         &g, &eps, &w, &uh, &vh, &eta,
     351                        &g, &eps, &h, &uh, &vh, &eta,
    352352                        &xmom, &ymom)) 
    353353    return NULL; 
    354354
    355   N = w -> dimensions[0];   
     355  N = h -> dimensions[0];   
    356356  _manning_friction(g, eps, N,
    357                     (double*) w -> data,
     357                    (double*) h -> data,
    358358                    (double*) uh -> data,
    359359                    (double*) vh -> data,
Note: See TracChangeset for help on using the changeset viewer.