Changeset 3021 for inundation/pyvolution/shallow_water_ext.c
- Timestamp:
- May 30, 2006, 4:17:18 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/pyvolution/shallow_water_ext.c
r2731 r3021 980 980 PyArrayObject *neighbours, *neighbour_edges, 981 981 *normals, *edgelengths, *radii, *areas, 982 *tri_full_flag, 982 983 *stage_edge_values, 983 984 *xmom_edge_values, … … 1004 1005 1005 1006 // Convert Python arguments to C 1006 if (!PyArg_ParseTuple(args, "dddOOOOOOOOOOOOOOOOO ",1007 if (!PyArg_ParseTuple(args, "dddOOOOOOOOOOOOOOOOOO", 1007 1008 ×tep, 1008 1009 &epsilon, … … 1012 1013 &normals, 1013 1014 &edgelengths, &radii, &areas, 1015 &tri_full_flag, 1014 1016 &stage_edge_values, 1015 1017 &xmom_edge_values, … … 1090 1092 //timestep = min(timestep, domain.radii[k]/max_speed) 1091 1093 //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 } 1098 1102 } // end for i 1099 1103 //Normalise by area and store for when all conserved
Note: See TracChangeset
for help on using the changeset viewer.