Changeset 766
- Timestamp:
- Jan 21, 2005, 10:53:26 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/pyvolution/quantity_ext.c
r765 r766 176 176 x = centroid_values[k]; 177 177 if (x == 0.0) { 178 //FIXME: Is this right179 178 semi_implicit_update[k] = 0.0; 180 179 } else { … … 222 221 explicit_update = get_consecutive_array(quantity, "explicit_update"); 223 222 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;237 223 238 224 N = centroid_values -> dimensions[0]; … … 274 260 edge_values = get_consecutive_array(quantity, "edge_values"); 275 261 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 286 262 N = vertex_values -> dimensions[0]; 287 263 … … 330 306 number_of_boundaries = get_consecutive_array(domain, "number_of_boundaries"); 331 307 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 362 308 N = centroid_values -> dimensions[0]; 363 309 … … 432 378 vertex_values = get_consecutive_array(quantity, "vertex_values"); 433 379 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 477 380 N = centroid_values -> dimensions[0]; 478 381 … … 513 416 (double*) a -> data, 514 417 (double*) b -> data); 515 //a, b);516 418 517 419 … … 533 435 Py_DECREF(a); 534 436 Py_DECREF(b); 535 //free(a);536 //free(b);537 437 538 438 return Py_BuildValue(""); … … 621 521 interpolate_from_vertices_to_edges, 622 522 METH_VARARGS, "Print out"}, 623 {NULL, NULL, 0, NULL} / * sentinel */523 {NULL, NULL, 0, NULL} // sentinel 624 524 }; 625 525
Note: See TracChangeset
for help on using the changeset viewer.