Changeset 502
- Timestamp:
- Nov 8, 2004, 6:32:55 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/pyvolution/shallow_water_ext.c
r449 r502 156 156 157 157 void _manning_friction(double g, double eps, int N, 158 double* w, double* uh, double* vh,158 double* h, double* uh, double* vh, 159 159 double* eta, double* xmom, double* ymom) { 160 160 … … 163 163 164 164 for (k=0; k<N; k++) { 165 if ( w[k] >= eps) {165 if (h[k] >= eps) { 166 166 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); 168 168 169 169 //Update momentum … … 340 340 PyObject *manning_friction(PyObject *self, PyObject *args) { 341 341 // 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; 347 347 int N; 348 348 double g, eps; 349 349 350 350 if (!PyArg_ParseTuple(args, "ddOOOOOO", 351 &g, &eps, & w, &uh, &vh, &eta,351 &g, &eps, &h, &uh, &vh, &eta, 352 352 &xmom, &ymom)) 353 353 return NULL; 354 354 355 N = w-> dimensions[0];355 N = h -> dimensions[0]; 356 356 _manning_friction(g, eps, N, 357 (double*) w-> data,357 (double*) h -> data, 358 358 (double*) uh -> data, 359 359 (double*) vh -> data,
Note: See TracChangeset
for help on using the changeset viewer.