- Timestamp:
- Jun 19, 2011, 3:54:42 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_work/development/2010-projects/anuga_1d/pipe/pipe_domain_ext.c
r8187 r8188 230 230 double* width_edge_values, 231 231 double* top_edge_values, 232 double* state_edge_values, 232 233 double* area_boundary_values, 233 234 double* discharge_boundary_values, … … 237 238 double* width_boundary_values, 238 239 double* top_boundary_values, 240 double* state_boundary_values, 239 241 double* area_explicit_update, 240 242 double* discharge_explicit_update, … … 242 244 double* max_speed_array) { 243 245 244 double flux[2], qlm[ 7], qlp[7], qrm[7], qrp[7], edgeflux[2];246 double flux[2], qlm[8], qlp[8], qrm[8], qrp[8], edgeflux[2]; 245 247 double max_speed; 246 248 int k, ki, n, m, nm=0; … … 264 266 qlm[5] = width_boundary_values[m]; 265 267 qlm[6] = top_boundary_values[m]; 268 qlm[7] = state_boundary_values[m]; 266 269 267 270 } else { … … 277 280 qlm[5] = width_edge_values[nm]; 278 281 qlm[6] = top_edge_values[nm]; 282 qlm[7] = state_edge_values[nm]; 279 283 } 280 284 … … 286 290 qlp[5] = width_edge_values[ki]; 287 291 qlp[6] = top_edge_values[ki]; 292 qlp[7] = state_edge_values[ki]; 288 293 289 294 ki = k*2+1; … … 299 304 qrp[5] = width_boundary_values[m]; 300 305 qrp[6] = top_boundary_values[m]; 306 qrp[7] = state_boundary_values[m]; 301 307 } else { 302 308 m = neighbour_vertices[ki]; … … 311 317 qrp[5] = width_edge_values[nm]; 312 318 qrp[6] = top_edge_values[nm]; 319 qrp[7] = state_edge_values[nm]; 313 320 } 314 321 … … 320 327 qrm[5] = width_edge_values[ki]; 321 328 qrm[6] = top_edge_values[ki]; 329 qrm[7] = state_edge_values[ki]; 322 330 323 331 _flux_function_pipe(qlm,qlp,qrm,qrp,g,epsilon,h0,edgeflux,&max_speed); … … 367 375 *velocity, 368 376 *width, 369 *top; 377 *top, 378 *state; 370 379 371 380 PyArrayObject … … 381 390 *width_vertex_values, 382 391 *top_vertex_values, 392 *state_vertex_values, 383 393 *area_boundary_values, 384 394 *discharge_boundary_values, … … 388 398 *width_boundary_values, 389 399 *top_boundary_values, 400 *state_boundary_values, 390 401 *area_explicit_update, 391 402 *discharge_explicit_update, … … 397 408 398 409 // Convert Python arguments to C 399 if (!PyArg_ParseTuple(args, "dOOOOOOOO ",410 if (!PyArg_ParseTuple(args, "dOOOOOOOOO", 400 411 ×tep, 401 412 &domain, … … 406 417 &velocity, 407 418 &width, 408 &top)) { 419 &top, 420 &state)) { 409 421 PyErr_SetString(PyExc_RuntimeError, "comp_flux_pipe_ext.c: compute_fluxes_pipe_ext could not parse input"); 410 422 return NULL; … … 431 443 width_vertex_values = get_consecutive_array(width, "vertex_values"); 432 444 top_vertex_values = get_consecutive_array(top, "vertex_values"); 445 state_vertex_values = get_consecutive_array(state, "vertex_values"); 433 446 434 447 area_boundary_values = get_consecutive_array(area, "boundary_values"); … … 439 452 width_boundary_values = get_consecutive_array(width, "boundary_values"); 440 453 top_boundary_values = get_consecutive_array(top, "boundary_values"); 454 state_boundary_values = get_consecutive_array(state, "boundary_values"); 441 455 442 456 … … 464 478 (double*) width_vertex_values -> data, 465 479 (double*) top_vertex_values -> data, 480 (double*) state_vertex_values -> data, 466 481 (double*) area_boundary_values -> data, 467 482 (double*) discharge_boundary_values -> data, … … 471 486 (double*) width_boundary_values -> data, 472 487 (double*) top_boundary_values -> data, 488 (double*) state_boundary_values -> data, 473 489 (double*) area_explicit_update -> data, 474 490 (double*) discharge_explicit_update -> data, … … 488 504 Py_DECREF(width_vertex_values); 489 505 Py_DECREF(top_vertex_values); 506 Py_DECREF(state_vertex_values); 490 507 Py_DECREF(area_boundary_values); 491 508 Py_DECREF(discharge_boundary_values); … … 495 512 Py_DECREF(width_boundary_values); 496 513 Py_DECREF(top_boundary_values); 514 Py_DECREF(state_boundary_values); 497 515 Py_DECREF(area_explicit_update); 498 516 Py_DECREF(discharge_explicit_update);
Note: See TracChangeset
for help on using the changeset viewer.