- Timestamp:
- Oct 27, 2010, 5:22:43 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_work/development/2010-projects/kv/kinematic_viscosity_ext.c
r8051 r8052 40 40 } 41 41 42 int build_geo_structure(int n, int tot_len, double *centroids, int *neighbours, double *edgelengths, double *edge_midpoints, int *geo_indices, double *geo_values) { 42 int build_geo_structure(int n, 43 int tot_len, 44 double *centroids, 45 long *neighbours, 46 double *edgelengths, 47 double *edge_midpoints, 48 long *geo_indices, 49 double *geo_values) { 43 50 int i, edge, edge_counted, j; 44 51 double dist, this_x, this_y, other_x, other_y, edge_length; … … 75 82 } 76 83 77 int build_operator_matrix(int n, int tot_len, int *geo_indices, double *geo_values, double *h, double *boundary_heights, double *data, int *colind) { 84 int build_operator_matrix(int n, 85 int tot_len, 86 long *geo_indices, 87 double *geo_values, 88 double *h, 89 double *boundary_heights, 90 double *data, 91 long *colind) { 78 92 int i, k, edge, j[4], *sorted_j, this_index; 79 93 double h_j, v[3], v_i; //v[k] = value of the interaction of edge k in a given triangle, v_i = (i,i) entry … … 151 165 Py_DECREF(mesh); 152 166 153 err = build_geo_structure(n,tot_len, (double *)centroid_coordinates -> data, (int *)neighbours -> data, (double *)edgelengths->data, (double *)edge_midpoint_coordinates -> data, (int *)geo_indices -> data, (double *)geo_values -> data); 167 err = build_geo_structure(n,tot_len, 168 (double *)centroid_coordinates -> data, 169 (long *)neighbours -> data, 170 (double *)edgelengths->data, 171 (double *)edge_midpoint_coordinates -> data, 172 (long *)geo_indices -> data, 173 (double *)geo_values -> data); 154 174 if (err != 0) { 155 175 PyErr_SetString(PyExc_RuntimeError, "Could not build geo structure"); … … 190 210 colind = get_consecutive_array(kv_operator,"operator_colind"); 191 211 192 err = build_operator_matrix(n,tot_len, (int *)geo_indices -> data, (double *)geo_values -> data, (double *)h -> data, (double *)boundary_heights -> data, (double *)_data -> data, (int *)colind -> data); 212 err = build_operator_matrix(n,tot_len, 213 (long *)geo_indices -> data, 214 (double *)geo_values -> data, 215 (double *)h -> data, 216 (double *)boundary_heights -> data, 217 (double *)_data -> data, 218 (long *)colind -> data); 193 219 if (err != 0) { 194 220 PyErr_SetString(PyExc_RuntimeError, "Could not get stage height interactions");
Note: See TracChangeset
for help on using the changeset viewer.