- Timestamp:
- Jan 31, 2007, 12:07:32 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/shallow_water/shallow_water_ext.c
r4191 r4200 1217 1217 *xmom_explicit_update, 1218 1218 *ymom_explicit_update, 1219 *already_computed_flux ;//tracks whether the flux across an edge has already been computed1220 1219 *already_computed_flux,//tracks whether the flux across an edge has already been computed 1220 *max_speed_array; //Keeps track of max speeds for each triangle 1221 1221 1222 1222 //Local variables … … 1231 1231 1232 1232 // Convert Python arguments to C 1233 if (!PyArg_ParseTuple(args, "dddOOOOOOOOOOOOOOOOOO ",1233 if (!PyArg_ParseTuple(args, "dddOOOOOOOOOOOOOOOOOOO", 1234 1234 ×tep, 1235 1235 &epsilon, … … 1250 1250 &xmom_explicit_update, 1251 1251 &ymom_explicit_update, 1252 &already_computed_flux)) { 1252 &already_computed_flux, 1253 &max_speed_array)) { 1253 1254 PyErr_SetString(PyExc_RuntimeError, "Input arguments failed"); 1254 1255 return NULL; … … 1261 1262 ((double *) stage_explicit_update -> data)[k]=0.0; 1262 1263 ((double *) xmom_explicit_update -> data)[k]=0.0; 1263 ((double *) ymom_explicit_update -> data)[k]=0.0; 1264 } 1264 ((double *) ymom_explicit_update -> data)[k]=0.0; 1265 } 1266 1265 1267 //Loop through neighbours and compute edge flux for each 1266 1268 for (k=0; k<number_of_elements; k++) { … … 1327 1329 } 1328 1330 } // end for i 1331 1329 1332 //Normalise by area and store for when all conserved 1330 1333 //quantities get updated … … 1332 1335 ((double *) xmom_explicit_update -> data)[k] /= ((double *) areas -> data)[k]; 1333 1336 ((double *) ymom_explicit_update -> data)[k] /= ((double *) areas -> data)[k]; 1337 1338 1339 //Keep track of maximal speeds 1340 ((double *) max_speed_array -> data)[k] = max_speed; 1341 1334 1342 } //end for k 1335 1343 return Py_BuildValue("d", timestep);
Note: See TracChangeset
for help on using the changeset viewer.