Changeset 5474
- Timestamp:
- Jul 7, 2008, 4:03:14 PM (15 years ago)
- Location:
- anuga_core/source/anuga/shallow_water
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/shallow_water/data_manager.py
r5473 r5474 5061 5061 reference_header_split = reference_header.split(',') 5062 5062 for i in range(3): 5063 if not file_header[i] == reference_header_split[i]:5063 if not file_header[i].strip() == reference_header_split[i].strip(): 5064 5064 msg = 'File must contain header: '+reference_header+'\n' 5065 5065 raise Exception, msg -
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",nsta0-1,(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.