Changeset 766


Ignore:
Timestamp:
Jan 21, 2005, 10:53:26 AM (19 years ago)
Author:
ole
Message:

Cleanup

File:
1 edited

Legend:

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

    r765 r766  
    176176    x = centroid_values[k];
    177177    if (x == 0.0) {
    178       //FIXME: Is this right
    179178      semi_implicit_update[k] = 0.0;
    180179    } else {
     
    222221  explicit_update = get_consecutive_array(quantity, "explicit_update");   
    223222  semi_implicit_update = get_consecutive_array(quantity, "semi_implicit_update");     
    224  
    225  
    226   //centroid_values = (PyArrayObject*)
    227   //  PyObject_GetAttrString(quantity, "centroid_values");           
    228   //if (!centroid_values) return NULL;               
    229 
    230   //explicit_update = (PyArrayObject*)
    231   //  PyObject_GetAttrString(quantity, "explicit_update");   
    232   //if (!explicit_update) return NULL;         
    233  
    234   //semi_implicit_update = (PyArrayObject*)
    235   //  PyObject_GetAttrString(quantity, "semi_implicit_update");   
    236   //if (!semi_implicit_update) return NULL;           
    237223
    238224  N = centroid_values -> dimensions[0]; 
     
    274260  edge_values = get_consecutive_array(quantity, "edge_values"); 
    275261 
    276   /* 
    277   vertex_values = (PyArrayObject*)
    278     PyObject_GetAttrString(quantity, "vertex_values");           
    279   if (!vertex_values) return NULL;               
    280 
    281   edge_values = (PyArrayObject*)
    282     PyObject_GetAttrString(quantity, "edge_values");   
    283   if (!edge_values) return NULL;         
    284   */
    285 
    286262  N = vertex_values -> dimensions[0]; 
    287263 
     
    330306  number_of_boundaries = get_consecutive_array(domain, "number_of_boundaries");
    331307
    332   //centroids = (PyArrayObject*)
    333   //  PyArray_ContiguousFromObject(
    334   //                             PyObject_GetAttrString(domain, "centroid_coordinates"),
    335   //                             PyArray_DOUBLE, 0, 0);
    336     //  if (!centroids) return NULL;   
    337  
    338   /*
    339   centroid_values = (PyArrayObject*)
    340     PyArray_ContiguousFromObject(
    341                                  PyObject_GetAttrString(quantity,
    342                                                         "centroid_values"),
    343                                  PyArray_DOUBLE, 0, 0);
    344   if (!centroid_values) return NULL;       
    345   */
    346  
    347   /*
    348   surrogate_neighbours = (PyArrayObject*)
    349     PyArray_ContiguousFromObject(
    350                                  PyObject_GetAttrString(domain, "surrogate_neighbours"),
    351                                  PyArray_LONG, 0, 0);                           
    352   if (!surrogate_neighbours) return NULL;       
    353  
    354   number_of_boundaries = (PyArrayObject*)
    355     PyArray_ContiguousFromObject(
    356                                  PyObject_GetAttrString(domain, "number_of_boundaries"),
    357                                  PyArray_LONG, 0, 0);                           
    358   if (!number_of_boundaries) return NULL;           
    359 
    360   */
    361  
    362308  N = centroid_values -> dimensions[0];
    363309   
     
    432378  vertex_values = get_consecutive_array(quantity, "vertex_values");     
    433379 
    434  
    435   /*
    436   centroids = (PyArrayObject*)
    437     PyArray_ContiguousFromObject(
    438                                  PyObject_GetAttrString(domain, "centroid_coordinates"),
    439                                  PyArray_DOUBLE, 0, 0);
    440   if (!centroids) return NULL;   
    441  
    442  
    443   centroid_values = (PyArrayObject*)
    444     PyArray_ContiguousFromObject(
    445                                  PyObject_GetAttrString(quantity, "centroid_values"),
    446                                  PyArray_DOUBLE, 0, 0);
    447   if (!centroid_values) return NULL;       
    448  
    449   surrogate_neighbours = (PyArrayObject*)
    450     PyArray_ContiguousFromObject(
    451                                  PyObject_GetAttrString(domain, "surrogate_neighbours"),
    452                                  PyArray_LONG, 0, 0);
    453   if (!surrogate_neighbours) return NULL;       
    454  
    455   number_of_boundaries = (PyArrayObject*)
    456     PyArray_ContiguousFromObject(
    457                                  PyObject_GetAttrString(domain, "number_of_boundaries"),
    458                                  PyArray_LONG, 0, 0);
    459   if (!number_of_boundaries) return NULL;           
    460  
    461   vertex_coordinates = (PyArrayObject*)
    462     PyArray_ContiguousFromObject(
    463                                  PyObject_GetAttrString(domain, "vertex_coordinates"),
    464                                  PyArray_DOUBLE, 0, 0);
    465   if (!vertex_coordinates) return NULL;             
    466  
    467   vertex_values = (PyArrayObject*)
    468     PyArray_ContiguousFromObject( 
    469                                  PyObject_GetAttrString(quantity, "vertex_values"),
    470                                  PyArray_DOUBLE, 0, 0);
    471   if (!vertex_values) return NULL;               
    472   */
    473  
    474 
    475  
    476  
    477380  N = centroid_values -> dimensions[0];
    478381   
     
    513416                     (double*) a -> data,
    514417                     (double*) b -> data);                   
    515   //a, b);
    516418                     
    517419                     
     
    533435  Py_DECREF(a);                   
    534436  Py_DECREF(b);                     
    535   //free(a);     
    536   //free(b);       
    537437 
    538438  return Py_BuildValue("");   
     
    621521   interpolate_from_vertices_to_edges,
    622522   METH_VARARGS, "Print out"},           
    623   {NULL, NULL, 0, NULL}   /* sentinel */
     523  {NULL, NULL, 0, NULL}   // sentinel
    624524};
    625525
Note: See TracChangeset for help on using the changeset viewer.