Ignore:
Timestamp:
May 30, 2006, 4:17:18 PM (19 years ago)
Author:
steve
Message:

updated timestep using only full cells

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/pyvolution/shallow_water_ext.c

    r2731 r3021  
    980980  PyArrayObject *neighbours, *neighbour_edges,
    981981    *normals, *edgelengths, *radii, *areas,
     982    *tri_full_flag,
    982983    *stage_edge_values,
    983984    *xmom_edge_values,
     
    10041005
    10051006  // Convert Python arguments to C
    1006   if (!PyArg_ParseTuple(args, "dddOOOOOOOOOOOOOOOOO",
     1007  if (!PyArg_ParseTuple(args, "dddOOOOOOOOOOOOOOOOOO",
    10071008                        &timestep,
    10081009                        &epsilon,
     
    10121013                        &normals,
    10131014                        &edgelengths, &radii, &areas,
     1015            &tri_full_flag,
    10141016                        &stage_edge_values,
    10151017                        &xmom_edge_values,
     
    10901092        //timestep = min(timestep, domain.radii[k]/max_speed)
    10911093        //FIXME: SR Add parameter for CFL condition
    1092         if (max_speed > epsilon) {
    1093           timestep = min(timestep, ((double *) radii -> data)[k]/max_speed);
    1094           //maxspeed in flux_function is calculated as max(|u+a|,|u-a|)
    1095           if (n>=0)
    1096             timestep = min(timestep, ((double *) radii -> data)[n]/max_speed);
    1097         }
     1094    if ( ((long *) tri_full_flag -> data)[k] == 1) {
     1095            if (max_speed > epsilon) {
     1096                timestep = min(timestep, ((double *) radii -> data)[k]/max_speed);
     1097                //maxspeed in flux_function is calculated as max(|u+a|,|u-a|)
     1098                if (n>=0)
     1099                    timestep = min(timestep, ((double *) radii -> data)[n]/max_speed);
     1100            }
     1101    }
    10981102    } // end for i
    10991103    //Normalise by area and store for when all conserved
Note: See TracChangeset for help on using the changeset viewer.