Changeset 1636 for inundation/ga/storm_surge/pyvolution/shallow_water_ext.c
- Timestamp:
- Jul 25, 2005, 4:48:54 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/pyvolution/shallow_water_ext.c
r1594 r1636 279 279 int _protect(int N, 280 280 double minimum_allowed_height, 281 double epsilon, 281 282 double* wc, 282 283 double* zc, … … 293 294 294 295 if (hc < minimum_allowed_height) { 295 wc[k] = zc[k];296 if (hc < epsilon) wc[k] = zc[k]; //Contain 'lost mass' error 296 297 xmomc[k] = 0.0; 297 298 ymomc[k] = 0.0; … … 301 302 return 0; 302 303 } 303 304 305 306 307 304 308 305 … … 670 667 671 668 int N; 672 double minimum_allowed_height ;669 double minimum_allowed_height, epsilon; 673 670 674 671 // Convert Python arguments to C 675 if (!PyArg_ParseTuple(args, "d OOOO",672 if (!PyArg_ParseTuple(args, "ddOOOO", 676 673 &minimum_allowed_height, 674 &epsilon, 677 675 &wc, &zc, &xmomc, &ymomc)) 678 676 return NULL; … … 682 680 _protect(N, 683 681 minimum_allowed_height, 682 epsilon, 684 683 (double*) wc -> data, 685 684 (double*) zc -> data,
Note: See TracChangeset
for help on using the changeset viewer.