Ignore:
Timestamp:
Mar 4, 2005, 11:51:07 AM (20 years ago)
Author:
ole
Message:

Playing with h_limiter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/ga/storm_surge/pyvolution/shallow_water_ext.c

    r992 r998  
    261261        wv[k3+i] = zv[k3+i] + (1-alpha)*hvbar[k3+i] + alpha*hv[k3+i];
    262262           
    263      
    264263        //Update momentum as a linear combination of
    265264        //xmomc and ymomc (shallow) and momentum
     
    772771  dimensions[0] = N;
    773772  dimensions[1] = 3; 
    774   hvbar = (PyArrayObject *) PyArray_FromDims(2, dimensions, PyArray_DOUBLE);
    775 
    776  
     773  //hvbar = (PyArrayObject *) PyArray_FromDims(2, dimensions, PyArray_DOUBLE);
     774 
    777775
    778776  //Find min and max of this and neighbour's centroid values
     
    787785    for (i=0; i<3; i++) {
    788786      n = ((long*) neighbours -> data)[k3+i];
    789       ((double*) hvbar -> data)[k3+i] = ((double*) hc -> data)[k]; 
     787      //((double*) hvbar -> data)[k3+i] = ((double*) hc -> data)[k]; 
    790788      if (n >= 0) {
    791789        hn = ((double*) hc -> data)[n]; //Neighbour's centroid value
     
    799797 
    800798  // Call underlying routine
    801   _limit(N, beta_h, (double*) hc -> data, (double*) hvbar -> data, hmin, hmax);
     799  _limit(N, beta_h, (double*) hc -> data, (double*) hv -> data, hmin, hmax);
    802800         
    803801  // // //Py_DECREF(domain); //FIXME: NEcessary?         
     
    806804 
    807805  //return result using PyArray to avoid memory leak 
    808   return PyArray_Return(hvbar);
     806  //return PyArray_Return(hvbar);
     807  return Py_BuildValue("");   
    809808}
    810809
Note: See TracChangeset for help on using the changeset viewer.