Changeset 998 for inundation/ga/storm_surge/pyvolution/shallow_water_ext.c
- Timestamp:
- Mar 4, 2005, 11:51:07 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/pyvolution/shallow_water_ext.c
r992 r998 261 261 wv[k3+i] = zv[k3+i] + (1-alpha)*hvbar[k3+i] + alpha*hv[k3+i]; 262 262 263 264 263 //Update momentum as a linear combination of 265 264 //xmomc and ymomc (shallow) and momentum … … 772 771 dimensions[0] = N; 773 772 dimensions[1] = 3; 774 hvbar = (PyArrayObject *) PyArray_FromDims(2, dimensions, PyArray_DOUBLE); 775 776 773 //hvbar = (PyArrayObject *) PyArray_FromDims(2, dimensions, PyArray_DOUBLE); 774 777 775 778 776 //Find min and max of this and neighbour's centroid values … … 787 785 for (i=0; i<3; i++) { 788 786 n = ((long*) neighbours -> data)[k3+i]; 789 ((double*) hvbar -> data)[k3+i] = ((double*) hc -> data)[k];787 //((double*) hvbar -> data)[k3+i] = ((double*) hc -> data)[k]; 790 788 if (n >= 0) { 791 789 hn = ((double*) hc -> data)[n]; //Neighbour's centroid value … … 799 797 800 798 // Call underlying routine 801 _limit(N, beta_h, (double*) hc -> data, (double*) hv bar-> data, hmin, hmax);799 _limit(N, beta_h, (double*) hc -> data, (double*) hv -> data, hmin, hmax); 802 800 803 801 // // //Py_DECREF(domain); //FIXME: NEcessary? … … 806 804 807 805 //return result using PyArray to avoid memory leak 808 return PyArray_Return(hvbar); 806 //return PyArray_Return(hvbar); 807 return Py_BuildValue(""); 809 808 } 810 809
Note: See TracChangeset
for help on using the changeset viewer.