Changeset 5831
- Timestamp:
- Oct 10, 2008, 4:50:04 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/development/anuga_1d/comp_flux_ext.c
r5727 r5831 131 131 132 132 // Computational function for flux computation 133 double _compute_fluxes_ext(double timestep, 133 double _compute_fluxes_ext( 134 double cfl, 135 double timestep, 134 136 double epsilon, 135 137 double g, … … 152 154 double zl, zr, max_speed, normal; 153 155 int k, i, ki, n, m, nm=0; 156 154 157 155 158 for (k=0; k<number_of_elements; k++) { … … 187 190 // Original CFL calculation 188 191 189 timestep = min(timestep, 0.5* areas[k]/max_speed); //Here, CFL=1.0 is assumed. ?????????????????????????????????????????????192 timestep = min(timestep, 0.5*cfl*areas[k]/max_speed); //Here, CFL=1.0 is assumed. ????????????????????????????????????????????? 190 193 if (n>=0) { 191 timestep = min(timestep, 0.5* areas[n]/max_speed); //Here, CFL=1.0 is assumed. ?????????????????????????????????????????????194 timestep = min(timestep, 0.5*cfl*areas[n]/max_speed); //Here, CFL=1.0 is assumed. ????????????????????????????????????????????? 192 195 } 193 196 } … … 230 233 *max_speed_array; 231 234 232 double timestep, epsilon, g, h0 ;235 double timestep, epsilon, g, h0, cfl; 233 236 int number_of_elements; 234 237 235 238 // Convert Python arguments to C 236 if (!PyArg_ParseTuple(args, "ddddOOOOOOOOOOOiO", 239 if (!PyArg_ParseTuple(args, "dddddOOOOOOOOOOOiO", 240 &cfl, 237 241 ×tep, 238 242 &epsilon, … … 259 263 // Call underlying flux computation routine and update 260 264 // the explicit update arrays 261 timestep = _compute_fluxes_ext(timestep, 265 timestep = _compute_fluxes_ext( 266 cfl, 267 timestep, 262 268 epsilon, 263 269 g, … … 304 310 *max_speed_array; 305 311 306 double timestep, epsilon, g, h0 ;312 double timestep, epsilon, g, h0, cfl; 307 313 int number_of_elements; 308 314 … … 323 329 g = get_python_double(domain,"g"); 324 330 h0 = get_python_double(domain,"h0"); 331 cfl = get_python_double(domain,"cfl"); 325 332 326 333 … … 350 357 // Call underlying flux computation routine and update 351 358 // the explicit update arrays 352 timestep = _compute_fluxes_ext(timestep, 359 timestep = _compute_fluxes_ext( 360 cfl, 361 timestep, 353 362 epsilon, 354 363 g,
Note: See TracChangeset
for help on using the changeset viewer.