Ignore:
Timestamp:
Jan 31, 2007, 12:07:32 PM (17 years ago)
Author:
ole
Message:

Added diagnosticts about which triangle is responsible for the largest computed speed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/shallow_water/shallow_water_ext.c

    r4191 r4200  
    12171217    *xmom_explicit_update,
    12181218    *ymom_explicit_update,
    1219     *already_computed_flux;//tracks whether the flux across an edge has already been computed
    1220 
     1219    *already_computed_flux,//tracks whether the flux across an edge has already been computed
     1220    *max_speed_array; //Keeps track of max speeds for each triangle
    12211221
    12221222  //Local variables
     
    12311231
    12321232  // Convert Python arguments to C
    1233   if (!PyArg_ParseTuple(args, "dddOOOOOOOOOOOOOOOOOO",
     1233  if (!PyArg_ParseTuple(args, "dddOOOOOOOOOOOOOOOOOOO",
    12341234                        &timestep,
    12351235                        &epsilon,
     
    12501250                        &xmom_explicit_update,
    12511251                        &ymom_explicit_update,
    1252                         &already_computed_flux)) {
     1252                        &already_computed_flux,
     1253                        &max_speed_array)) {
    12531254    PyErr_SetString(PyExc_RuntimeError, "Input arguments failed");
    12541255    return NULL;
     
    12611262    ((double *) stage_explicit_update -> data)[k]=0.0;
    12621263    ((double *) xmom_explicit_update -> data)[k]=0.0;
    1263     ((double *) ymom_explicit_update -> data)[k]=0.0;
    1264   }
     1264    ((double *) ymom_explicit_update -> data)[k]=0.0; 
     1265  }
     1266 
    12651267  //Loop through neighbours and compute edge flux for each
    12661268  for (k=0; k<number_of_elements; k++) {
     
    13271329    }
    13281330    } // end for i
     1331   
    13291332    //Normalise by area and store for when all conserved
    13301333    //quantities get updated
     
    13321335    ((double *) xmom_explicit_update -> data)[k] /= ((double *) areas -> data)[k];
    13331336    ((double *) ymom_explicit_update -> data)[k] /= ((double *) areas -> data)[k];
     1337   
     1338   
     1339    //Keep track of maximal speeds
     1340    ((double *) max_speed_array -> data)[k] = max_speed;   
     1341   
    13341342  } //end for k
    13351343  return Py_BuildValue("d", timestep);
Note: See TracChangeset for help on using the changeset viewer.