- Timestamp:
- Aug 23, 2007, 5:57:53 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/shallow_water/shallow_water_ext.c
r4681 r4682 1191 1191 // normal a Float numeric array of length 2. 1192 1192 1193 // FIXME(Ole): I don't think this is used anymore 1193 1194 1194 1195 PyObject *Q, *Normal; … … 1304 1305 *xmom_explicit_update, 1305 1306 *ymom_explicit_update, 1306 *already_computed_flux, //tracks whether the flux across an edge has already been computed1307 *already_computed_flux, //Tracks whether the flux across an edge has already been computed 1307 1308 *max_speed_array; //Keeps track of max speeds for each triangle 1308 1309 1309 1310 // Local variables 1310 double timestep, max_speed, epsilon, g, H0, length ;1311 double timestep, max_speed, epsilon, g, H0, length, area; 1311 1312 double normal[2], ql[3], qr[3], zl, zr; 1312 1313 double edgeflux[3]; // Work array for summing up fluxes 1313 1314 1314 int number_of_elements, k, i, m, n;1315 int number_of_elements, k, i, j, m, n, computation_needed; 1315 1316 int ki, nm=0, ki2; // Index shorthands 1316 1317 static long call=1; // Static local variable flagging already computed flux … … 1391 1392 } 1392 1393 1394 1395 // Check if flux calculation is necessary across this edge 1396 // FIXME (Ole): Work in progress! 1397 computation_needed = 0; 1398 //for (j=0; j<3; j++) { 1399 //if (ql[j] != qr[j]) computation_needed = 1; 1400 //} 1401 1402 //if (computation_needed == 0) { 1403 //printf("flux exemption identified\n"); 1404 1405 //((long *) already_computed_flux -> data)[ki] = call; // #k Done 1406 //if (n>=0) 1407 // ((long *) already_computed_flux -> data)[nm] = call; // #n Done 1408 1409 //max_speed = 0.0; 1410 //continue; 1411 //} 1412 1413 1414 1415 1393 1416 // Outward pointing normal vector (domain.normals[k, 2*i:2*i+2]) 1394 1417 ki2 = 2*ki; //k*6 + i*2 … … 1441 1464 // Normalise triangle k by area and store for when all conserved 1442 1465 // quantities get updated 1443 ((double *) stage_explicit_update -> data)[k] /= ((double *) areas -> data)[k]; 1444 ((double *) xmom_explicit_update -> data)[k] /= ((double *) areas -> data)[k]; 1445 ((double *) ymom_explicit_update -> data)[k] /= ((double *) areas -> data)[k]; 1466 area = ((double *) areas -> data)[k]; 1467 ((double *) stage_explicit_update -> data)[k] /= area; 1468 ((double *) xmom_explicit_update -> data)[k] /= area; 1469 ((double *) ymom_explicit_update -> data)[k] /= area; 1446 1470 1447 1471
Note: See TracChangeset
for help on using the changeset viewer.