Changeset 5474 for anuga_core/source/anuga/shallow_water/urs_ext.c
 Timestamp:
 Jul 7, 2008, 4:03:14 PM (16 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

anuga_core/source/anuga/shallow_water/urs_ext.c
r5473 r5474 197 197 // Specifies the gauge numbers that for which data is to be extracted 198 198 permutation_array=(PyArrayObject *) PyArray_ContiguousFromObject(permutation,PyArray_INT,1,1); 199 N = permutation_array>dimensions[0]; //FIXME: this is overwritten below 200 for (ista=0; ista<N; ista++){ 201 if ((int)*(long *) (permutation_array > data+ista*permutation_array>strides[0])>=nsta0){ 202 printf("Maximum index = %d, you had %d\n",nsta01,(int)*(long *) (permutation_array > data+ista*permutation_array>strides[0])); 203 PyErr_SetString(PyExc_RuntimeError,"The permutation specified is out of bounds"); 204 return NULL; 205 } 206 } 199 207 } 200 208 if(permutation_array == NULL){ 201 PyErr_SetString(PyExc_RuntimeError," ERROR:Memory for permutation_array array could not be allocated");209 PyErr_SetString(PyExc_RuntimeError,"Memory for permutation_array array could not be allocated"); 202 210 return NULL; 203 211 }
Note: See TracChangeset
for help on using the changeset viewer.