Changeset 7782 for anuga_work/development/pipeflow/swb_comp_flux_ext.c
- Timestamp:
- Jun 5, 2010, 7:03:20 PM (15 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/development/pipeflow/swb_comp_flux_ext.c
r7780 r7782 7 7 8 8 //Innermost flux function (using w=z+h) 9 int _flux_function _wellbalanced(double *q_left,9 int _flux_function(double *q_left, 10 10 double *q_right, 11 11 double normals, … … 15 15 double *max_speed) { 16 16 int i; 17 double z_left, z_right;17 double z_left, z_right; 18 18 double flux_left[2], flux_right[2]; 19 19 double z_star, w_left, h_left, h_left_star, uh_left, soundspeed_left, u_left; … … 24 24 uh_left = q_left[1]; 25 25 uh_left = uh_left*normals; 26 z_left = q_left[2];26 z_left = q_left[2]; 27 27 h_left = q_left[3]; 28 28 u_left = q_left[4]; … … 31 31 uh_right = q_right[1]; 32 32 uh_right = uh_right*normals; 33 z_right = q_right[2];33 z_right = q_right[2]; 34 34 h_right = q_right[3]; 35 35 u_right = q_right[4]; … … 108 108 109 109 // Computational function for flux computation 110 double _compute_fluxes_ext _wellbalanced(double timestep,110 double _compute_fluxes_ext(double timestep, 111 111 double epsilon, 112 112 double g, … … 152 152 ql[1] = xmom_edge_values[ki]; 153 153 ql[2] = bed_edge_values[ki]; 154 ql[3] = height_edge_values[ki];154 ql[3] = height_edge_values[ki]; 155 155 ql[4] = vel_edge_values[ki]; 156 156 … … 176 176 177 177 normal = normals[ki]; 178 _flux_function _wellbalanced(ql, qr, normal, g, epsilon, edgeflux, &max_speed);178 _flux_function(ql, qr, normal, g, epsilon, edgeflux, &max_speed); 179 179 flux[0] -= edgeflux[0]; 180 180 flux[1] -= edgeflux[1]; … … 209 209 // Python Glue 210 210 //========================================================================= 211 PyObject *compute_fluxes_ext _wellbalanced(PyObject *self, PyObject *args) {211 PyObject *compute_fluxes_ext(PyObject *self, PyObject *args) { 212 212 213 213 PyArrayObject … … 271 271 &number_of_elements, 272 272 &max_speed_array)) { 273 PyErr_SetString(PyExc_RuntimeError, " comp_flux_ext_wellbalanced.c: compute_fluxes_ext_wellbalancedcould not parse input");273 PyErr_SetString(PyExc_RuntimeError, "swb_comp_flux_ext.c: compute_fluxes_ext could not parse input"); 274 274 return NULL; 275 275 } … … 278 278 // Call underlying flux computation routine and update 279 279 // the explicit update arrays 280 timestep = _compute_fluxes_ext _wellbalanced(timestep,280 timestep = _compute_fluxes_ext(timestep, 281 281 epsilon, 282 282 g, … … 319 319 320 320 static struct PyMethodDef MethodTable[] = { 321 {"compute_fluxes_ext _wellbalanced", compute_fluxes_ext_wellbalanced, METH_VARARGS, "Print out"},321 {"compute_fluxes_ext", compute_fluxes_ext, METH_VARARGS, "Print out"}, 322 322 {NULL, NULL} 323 323 }; 324 324 325 325 // Module initialisation 326 void init comp_flux_ext_wellbalanced(void){327 Py_InitModule(" comp_flux_ext_wellbalanced", MethodTable);326 void initswb_comp_flux_ext(void){ 327 Py_InitModule("swb_comp_flux_ext", MethodTable); 328 328 import_array(); 329 329 }
Note: See TracChangeset
for help on using the changeset viewer.