[Yt-svn] yt-commit r1579 - in trunk/yt: . _amr_utils extensions/volume_rendering lagos
mturk at wrangler.dreamhost.com
mturk at wrangler.dreamhost.com
Thu Jan 21 14:03:08 PST 2010
Author: mturk
Date: Thu Jan 21 14:03:04 2010
New Revision: 1579
URL: http://yt.enzotools.org/changeset/1579
Log:
Backporting from hg.
Interim gradient calculation (Sam's working on a faster/better one) and initial
Bing-Phone shading support (off by default) for volume rendering.
Fixes for SUBling issues in the contour finder, culminating in a completely new
implementation. In my tests this implementation was substantially faster, as
in more than a factor of 2. Additionally, the issue (#233) of underfinding
contours should now be fixed. The underconnection issue should also be
fixed.
Added:
trunk/yt/_amr_utils/ContourFinding.pyx
Modified:
trunk/yt/_amr_utils/FixedInterpolator.c
trunk/yt/_amr_utils/FixedInterpolator.h
trunk/yt/_amr_utils/VolumeIntegrator.pyx
trunk/yt/amr_utils.c
trunk/yt/amr_utils.pyx
trunk/yt/extensions/volume_rendering/TransferFunction.py
trunk/yt/extensions/volume_rendering/grid_partitioner.py
trunk/yt/extensions/volume_rendering/software_sampler.py
trunk/yt/lagos/BaseDataTypes.py
trunk/yt/lagos/ContourFinder.py
Added: trunk/yt/_amr_utils/ContourFinding.pyx
==============================================================================
--- (empty file)
+++ trunk/yt/_amr_utils/ContourFinding.pyx Thu Jan 21 14:03:04 2010
@@ -0,0 +1,80 @@
+"""
+A two-pass contour finding algorithm
+
+Author: Matthew Turk <matthewturk at gmail.com>
+Affiliation: KIPAC/SLAC/Stanford
+Homepage: http://yt.enzotools.org/
+License:
+ Copyright (C) 2010 Matthew Turk. All Rights Reserved.
+
+ This file is part of yt.
+
+ yt is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+"""
+
+import numpy as np
+cimport numpy as np
+cimport cython
+
+cdef inline np.int64_t i64max(np.int64_t i0, np.int64_t i1):
+ if i0 > i1: return i0
+ return i1
+
+cdef inline np.int64_t i64min(np.int64_t i0, np.int64_t i1):
+ if i0 < i1: return i0
+ return i1
+
+ at cython.boundscheck(False)
+def construct_boundary_relationships(
+ np.ndarray[dtype=np.int64_t, ndim=3] contour_ids):
+ # We only look at the boundary and one cell in
+ cdef int i, j, nx, ny, nz
+ cdef np.int64_t c1, c2
+ tree = []
+ nx = contour_ids.shape[0]
+ ny = contour_ids.shape[1]
+ nz = contour_ids.shape[2]
+ # First x-pass
+ for i in range(ny):
+ for j in range(nz):
+ c1 = contour_ids[0, i, j]
+ c2 = contour_ids[1, i, j]
+ if c1 > -1 and c2 > -1:
+ tree.append((i64max(c1,c2), i64min(c1,c2)))
+ c1 = contour_ids[nx-1, i, j]
+ c2 = contour_ids[nx-2, i, j]
+ if c1 > -1 and c2 > -1:
+ tree.append((i64max(c1,c2), i64min(c1,c2)))
+ # Now y-pass
+ for i in range(nx):
+ for j in range(nz):
+ c1 = contour_ids[i, 0, j]
+ c2 = contour_ids[i, 1, j]
+ if c1 > -1 and c2 > -1:
+ tree.append((i64max(c1,c2), i64min(c1,c2)))
+ c1 = contour_ids[i, ny-1, j]
+ c2 = contour_ids[i, ny-2, j]
+ if c1 > -1 and c2 > -1:
+ tree.append((i64max(c1,c2), i64min(c1,c2)))
+ for i in range(nx):
+ for j in range(ny):
+ c1 = contour_ids[i, j, 0]
+ c2 = contour_ids[i, j, 1]
+ if c1 > -1 and c2 > -1:
+ tree.append((i64max(c1,c2), i64min(c1,c2)))
+ c1 = contour_ids[i, j, nz-1]
+ c2 = contour_ids[i, j, nz-2]
+ if c1 > -1 and c2 > -1:
+ tree.append((i64max(c1,c2), i64min(c1,c2)))
+ return tree
Modified: trunk/yt/_amr_utils/FixedInterpolator.c
==============================================================================
--- trunk/yt/_amr_utils/FixedInterpolator.c (original)
+++ trunk/yt/_amr_utils/FixedInterpolator.c Thu Jan 21 14:03:04 2010
@@ -72,3 +72,33 @@
/*assert(dv < -20);*/
return vz[0];
}
+
+npy_float64 eval_gradient(int *ds, int *ci, npy_float64 *dp,
+ npy_float64 *data, npy_float64 *grad)
+{
+ // We just take some small value
+
+ int i;
+ npy_float64 denom, plus, minus, backup, normval;
+
+ normval = 0.0;
+ for (i = 0; i < 3; i++) {
+ backup = dp[i];
+ grad[i] = 0.0;
+ if (dp[i] >= 0.95) {plus = dp[i]; minus = dp[i] - 0.05;}
+ else if (dp[i] <= 0.05) {plus = dp[i] + 0.05; minus = 0.0;}
+ else {plus = dp[i] + 0.05; minus = dp[i] - 0.05;}
+ //fprintf(stderr, "DIM: %d %0.3lf %0.3lf\n", i, plus, minus);
+ denom = plus - minus;
+ dp[i] = plus;
+ grad[i] += trilinear_interpolate(ds, ci, dp, data) / denom;
+ dp[i] = minus;
+ grad[i] -= trilinear_interpolate(ds, ci, dp, data) / denom;
+ dp[i] = backup;
+ normval += grad[i]*grad[i];
+ }
+ normval = sqrt(normval);
+ for (i = 0; i < 3; i++) grad[i] /= -normval;
+ //fprintf(stderr, "Normval: %0.3lf %0.3lf %0.3lf %0.3lf\n",
+ // normval, grad[0], grad[1], grad[2]);
+}
Modified: trunk/yt/_amr_utils/FixedInterpolator.h
==============================================================================
--- trunk/yt/_amr_utils/FixedInterpolator.h (original)
+++ trunk/yt/_amr_utils/FixedInterpolator.h Thu Jan 21 14:03:04 2010
@@ -38,3 +38,6 @@
npy_float64 trilinear_interpolate(int ds[3], int ci[3], npy_float64 dp[3],
npy_float64 *data);
+
+npy_float64 eval_gradient(int ds[3], int ci[3], npy_float64 dp[3],
+ npy_float64 *data, npy_float64 *grad);
Modified: trunk/yt/_amr_utils/VolumeIntegrator.pyx
==============================================================================
--- trunk/yt/_amr_utils/VolumeIntegrator.pyx (original)
+++ trunk/yt/_amr_utils/VolumeIntegrator.pyx Thu Jan 21 14:03:04 2010
@@ -66,6 +66,8 @@
cdef extern from "FixedInterpolator.h":
np.float64_t trilinear_interpolate(int *ds, int *ci, np.float64_t *dp,
np.float64_t *data)
+ np.float64_t eval_gradient(int *ds, int *ci, np.float64_t *dp,
+ np.float64_t *data, np.float64_t *grad)
cdef class VectorPlane
@@ -74,6 +76,9 @@
cdef np.float64_t *vs[4]
cdef int nbins
cdef np.float64_t dbin
+ cdef np.float64_t light_color[3]
+ cdef np.float64_t light_dir[3]
+ cdef int use_light
cdef public object tf_obj
def __cinit__(self, tf_obj):
self.tf_obj = tf_obj
@@ -90,12 +95,23 @@
self.x_bounds[1] = tf_obj.x_bounds[1]
self.nbins = tf_obj.nbins
self.dbin = (self.x_bounds[1] - self.x_bounds[0])/self.nbins
+ self.light_color[0] = tf_obj.light_color[0]
+ self.light_color[1] = tf_obj.light_color[1]
+ self.light_color[2] = tf_obj.light_color[2]
+ self.light_dir[0] = tf_obj.light_dir[0]
+ self.light_dir[1] = tf_obj.light_dir[1]
+ self.light_dir[2] = tf_obj.light_dir[2]
+ cdef np.float64_t normval = 0.0
+ for i in range(3): normval += self.light_dir[i]**2
+ normval = normval**0.5
+ for i in range(3): self.light_dir[i] /= normval
+ self.use_light = tf_obj.use_light
cdef void eval_transfer(self, np.float64_t dt, np.float64_t dv,
- np.float64_t *rgba):
+ np.float64_t *rgba, np.float64_t *grad):
cdef int i
cdef int bin_id
- cdef np.float64_t tf, trgba[4], bv, dx, dy, dd,ta
+ cdef np.float64_t tf, trgba[4], bv, dx, dy, dd, ta, dot_prod
dx = self.dbin
# get source alpha first
@@ -109,18 +125,22 @@
# This is our final value for transfer function on the entering face
tf = bv+dd*(dy/dx)
ta = tf # Store the source alpha
+ dot_prod = 0.0
+ for i in range(3):
+ dot_prod += self.light_dir[i] * grad[i]
+ #print dot_prod, grad[0], grad[1], grad[2]
+ dot_prod = fmax(0.0, dot_prod)
for i in range(3):
# Recall that linear interpolation is y0 + (x-x0) * dx/dy
bv = self.vs[i][bin_id] # This is x0
dy = self.vs[i][bin_id+1]-bv # dy
dd = dv-(self.x_bounds[0] + bin_id * dx) # x - x0
# This is our final value for transfer function on the entering face
- tf = bv+dd*(dy/dx)
+ tf = bv+dd*(dy/dx) + dot_prod * self.light_color[i]
# alpha blending
rgba[i] += (1. - rgba[3])*ta*tf*dt
#update alpha
rgba[3] += (1. - rgba[3])*ta*dt
-
# We should really do some alpha blending.
# Front to back blending is defined as:
# dst.rgb = dst.rgb + (1 - dst.a) * src.a * src.rgb
@@ -374,6 +394,7 @@
np.float64_t *rgba,
TransferFunctionProxy tf):
cdef np.float64_t cp[3], dp[3], temp, dt, t, dv
+ cdef np.float64_t grad[3]
cdef int dti, i
dt = (exit_t - enter_t) / (self.ns-1) # five samples, so divide by four
for dti in range(self.ns - 1):
@@ -382,7 +403,9 @@
cp[i] = v_pos[i] + t * v_dir[i]
dp[i] = fclip(fmod(cp[i], self.dds[i])/self.dds[i], 0, 1.0)
dv = trilinear_interpolate(self.dims, ci, dp, self.data)
- tf.eval_transfer(dt, dv, rgba)
+ if tf.use_light == 1:
+ eval_gradient(self.dims, ci, dp, self.data, grad)
+ tf.eval_transfer(dt, dv, rgba, grad)
cdef class GridFace:
cdef int direction
Modified: trunk/yt/amr_utils.c
==============================================================================
--- trunk/yt/amr_utils.c (original)
+++ trunk/yt/amr_utils.c Thu Jan 21 14:03:04 2010
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.11.3 on Thu Jan 14 00:00:38 2010 */
+/* Generated by Cython 0.11.3 on Thu Jan 21 14:00:51 2010 */
#define PY_SSIZE_T_CLEAN
#include "Python.h"
@@ -495,6 +495,22 @@
static INLINE PyObject *__Pyx_PyInt_to_py_npy_int64(npy_int64);
+static INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
+ if (likely(PyList_CheckExact(L))) {
+ if (PyList_Append(L, x) < 0) return NULL;
+ Py_INCREF(Py_None);
+ return Py_None; /* this is just to have an accurate signature */
+ }
+ else {
+ PyObject *r, *m;
+ m = __Pyx_GetAttrString(L, "append");
+ if (!m) return NULL;
+ r = PyObject_CallFunctionObjArgs(m, x, NULL);
+ Py_DECREF(m);
+ return r;
+ }
+}
+
#if __PYX_USE_C99_COMPLEX
#define __Pyx_REAL_PART(z) __real__(z)
#define __Pyx_IMAG_PART(z) __imag__(z)
@@ -799,7 +815,7 @@
typedef npy_cdouble __pyx_t_5numpy_complex_t;
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":72
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":74
* cdef class VectorPlane
*
* cdef class TransferFunctionProxy: # <<<<<<<<<<<<<<
@@ -814,6 +830,9 @@
__pyx_t_5numpy_float64_t *vs[4];
int nbins;
__pyx_t_5numpy_float64_t dbin;
+ __pyx_t_5numpy_float64_t light_color[3];
+ __pyx_t_5numpy_float64_t light_dir[3];
+ int use_light;
PyObject *tf_obj;
};
@@ -848,7 +867,7 @@
PyObject *grids;
};
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":419
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":442
* return 1
*
* cdef class ProtoPrism: # <<<<<<<<<<<<<<
@@ -880,8 +899,8 @@
int refined_pos;
};
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":387
- * tf.eval_transfer(dt, dv, rgba)
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":410
+ * tf.eval_transfer(dt, dv, rgba, grad)
*
* cdef class GridFace: # <<<<<<<<<<<<<<
* cdef int direction
@@ -897,8 +916,8 @@
__pyx_t_5numpy_float64_t right_edge[3];
};
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":70
- * np.float64_t *data)
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":72
+ * np.float64_t *data, np.float64_t *grad)
*
* cdef class VectorPlane # <<<<<<<<<<<<<<
*
@@ -926,7 +945,7 @@
__pyx_t_5numpy_float64_t *y_vec;
};
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":189
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":209
* tv[(((k*self.nv)+j)*self.nv+i)] = fv[k]
*
* cdef class PartitionedGrid: # <<<<<<<<<<<<<<
@@ -950,7 +969,7 @@
};
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":419
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":442
* return 1
*
* cdef class ProtoPrism: # <<<<<<<<<<<<<<
@@ -964,7 +983,7 @@
static struct __pyx_vtabstruct_2yt_9amr_utils_ProtoPrism *__pyx_vtabptr_2yt_9amr_utils_ProtoPrism;
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":129
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":149
* # dst.a = dst.a + (1 - dst.a) * src.a
*
* cdef class VectorPlane: # <<<<<<<<<<<<<<
@@ -980,7 +999,7 @@
static struct __pyx_vtabstruct_2yt_9amr_utils_VectorPlane *__pyx_vtabptr_2yt_9amr_utils_VectorPlane;
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":189
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":209
* tv[(((k*self.nv)+j)*self.nv+i)] = fv[k]
*
* cdef class PartitionedGrid: # <<<<<<<<<<<<<<
@@ -996,8 +1015,8 @@
static struct __pyx_vtabstruct_2yt_9amr_utils_PartitionedGrid *__pyx_vtabptr_2yt_9amr_utils_PartitionedGrid;
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":387
- * tf.eval_transfer(dt, dv, rgba)
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":410
+ * tf.eval_transfer(dt, dv, rgba, grad)
*
* cdef class GridFace: # <<<<<<<<<<<<<<
* cdef int direction
@@ -1010,7 +1029,7 @@
static struct __pyx_vtabstruct_2yt_9amr_utils_GridFace *__pyx_vtabptr_2yt_9amr_utils_GridFace;
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":72
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":74
* cdef class VectorPlane
*
* cdef class TransferFunctionProxy: # <<<<<<<<<<<<<<
@@ -1019,7 +1038,7 @@
*/
struct __pyx_vtabstruct_2yt_9amr_utils_TransferFunctionProxy {
- void (*eval_transfer)(struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t *);
+ void (*eval_transfer)(struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *);
};
static struct __pyx_vtabstruct_2yt_9amr_utils_TransferFunctionProxy *__pyx_vtabptr_2yt_9amr_utils_TransferFunctionProxy;
/* Module declarations from python_buffer */
@@ -1055,6 +1074,8 @@
static INLINE __pyx_t_5numpy_float64_t __pyx_f_2yt_9amr_utils_fmin(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /*proto*/
static INLINE int __pyx_f_2yt_9amr_utils_iclip(int, int, int); /*proto*/
static INLINE __pyx_t_5numpy_float64_t __pyx_f_2yt_9amr_utils_fclip(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /*proto*/
+static INLINE __pyx_t_5numpy_int64_t __pyx_f_2yt_9amr_utils_i64max(__pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t); /*proto*/
+static INLINE __pyx_t_5numpy_int64_t __pyx_f_2yt_9amr_utils_i64min(__pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t); /*proto*/
static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t = { "numpy.int32_t", NULL, sizeof(__pyx_t_5numpy_int32_t), 'I' };
static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t = { "numpy.float64_t", NULL, sizeof(__pyx_t_5numpy_float64_t), 'R' };
static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int_t = { "numpy.int_t", NULL, sizeof(__pyx_t_5numpy_int_t), 'I' };
@@ -1255,6 +1276,8 @@
static PyObject *__pyx_kp_gridDimension;
static char __pyx_k_cellSize[] = "cellSize";
static PyObject *__pyx_kp_cellSize;
+static char __pyx_k_contour_ids[] = "contour_ids";
+static PyObject *__pyx_kp_contour_ids;
static char __pyx_k_numpy[] = "numpy";
static PyObject *__pyx_kp_numpy;
static char __pyx_k_np[] = "np";
@@ -1299,6 +1322,12 @@
static PyObject *__pyx_kp_x_bounds;
static char __pyx_k_nbins[] = "nbins";
static PyObject *__pyx_kp_nbins;
+static char __pyx_k_light_color[] = "light_color";
+static PyObject *__pyx_kp_light_color;
+static char __pyx_k_light_dir[] = "light_dir";
+static PyObject *__pyx_kp_light_dir;
+static char __pyx_k_use_light[] = "use_light";
+static PyObject *__pyx_kp_use_light;
static char __pyx_k_LeftEdge[] = "LeftEdge";
static PyObject *__pyx_kp_LeftEdge;
static char __pyx_k_RightEdge[] = "RightEdge";
@@ -1309,6 +1338,8 @@
static PyObject *__pyx_kp_copy;
static char __pyx_k_37[] = "int64";
static PyObject *__pyx_kp_37;
+static char __pyx_k_append[] = "append";
+static PyObject *__pyx_kp_append;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_xrange;
static PyObject *__pyx_builtin_RuntimeError;
@@ -10733,8 +10764,8 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":78
- * cdef np.float64_t dbin
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":83
+ * cdef int use_light
* cdef public object tf_obj
* def __cinit__(self, tf_obj): # <<<<<<<<<<<<<<
* self.tf_obj = tf_obj
@@ -10745,6 +10776,8 @@
static int __pyx_pf_2yt_9amr_utils_21TransferFunctionProxy___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_tf_obj = 0;
PyArrayObject *__pyx_v_temp;
+ __pyx_t_5numpy_float64_t __pyx_v_normval;
+ PyObject *__pyx_v_i;
Py_buffer __pyx_bstruct_temp;
Py_ssize_t __pyx_bstride_0_temp = 0;
Py_ssize_t __pyx_bshape_0_temp = 0;
@@ -10758,6 +10791,8 @@
PyObject *__pyx_t_6 = NULL;
PyObject *__pyx_t_7 = NULL;
__pyx_t_5numpy_float64_t __pyx_t_8;
+ Py_ssize_t __pyx_t_9;
+ Py_ssize_t __pyx_t_10;
static PyObject **__pyx_pyargnames[] = {&__pyx_kp_tf_obj,0};
__Pyx_SetupRefcountContext("__cinit__");
if (unlikely(__pyx_kwds)) {
@@ -10775,7 +10810,7 @@
else goto __pyx_L5_argtuple_error;
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__cinit__") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__cinit__") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
__pyx_v_tf_obj = values[0];
} else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
@@ -10785,15 +10820,16 @@
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.TransferFunctionProxy.__cinit__");
return -1;
__pyx_L4_argument_unpacking_done:;
__pyx_v_temp = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
+ __pyx_v_i = Py_None; __Pyx_INCREF(Py_None);
__pyx_bstruct_temp.buf = NULL;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":79
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":84
* cdef public object tf_obj
* def __cinit__(self, tf_obj):
* self.tf_obj = tf_obj # <<<<<<<<<<<<<<
@@ -10806,19 +10842,19 @@
__Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->tf_obj);
((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->tf_obj = __pyx_v_tf_obj;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":81
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":86
* self.tf_obj = tf_obj
* cdef np.ndarray[np.float64_t, ndim=1] temp
* temp = tf_obj.red.y # <<<<<<<<<<<<<<
* self.vs[0] = <np.float64_t *> temp.data
* temp = tf_obj.green.y
*/
- __pyx_t_1 = PyObject_GetAttr(__pyx_v_tf_obj, __pyx_kp_red); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(__pyx_v_tf_obj, __pyx_kp_red); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_kp_y); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_kp_y); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (!(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_3 = ((PyArrayObject *)__pyx_t_2);
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
@@ -10835,14 +10871,14 @@
}
__pyx_bstride_0_temp = __pyx_bstruct_temp.strides[0];
__pyx_bshape_0_temp = __pyx_bstruct_temp.shape[0];
- if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_t_3 = 0;
__Pyx_DECREF(((PyObject *)__pyx_v_temp));
__pyx_v_temp = ((PyArrayObject *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":82
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":87
* cdef np.ndarray[np.float64_t, ndim=1] temp
* temp = tf_obj.red.y
* self.vs[0] = <np.float64_t *> temp.data # <<<<<<<<<<<<<<
@@ -10851,19 +10887,19 @@
*/
(((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->vs[0]) = ((__pyx_t_5numpy_float64_t *)__pyx_v_temp->data);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":83
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":88
* temp = tf_obj.red.y
* self.vs[0] = <np.float64_t *> temp.data
* temp = tf_obj.green.y # <<<<<<<<<<<<<<
* self.vs[1] = <np.float64_t *> temp.data
* temp = tf_obj.blue.y
*/
- __pyx_t_2 = PyObject_GetAttr(__pyx_v_tf_obj, __pyx_kp_green); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(__pyx_v_tf_obj, __pyx_kp_green); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_kp_y); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_kp_y); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (!(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_3 = ((PyArrayObject *)__pyx_t_1);
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
@@ -10880,14 +10916,14 @@
}
__pyx_bstride_0_temp = __pyx_bstruct_temp.strides[0];
__pyx_bshape_0_temp = __pyx_bstruct_temp.shape[0];
- if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_t_3 = 0;
__Pyx_DECREF(((PyObject *)__pyx_v_temp));
__pyx_v_temp = ((PyArrayObject *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":84
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":89
* self.vs[0] = <np.float64_t *> temp.data
* temp = tf_obj.green.y
* self.vs[1] = <np.float64_t *> temp.data # <<<<<<<<<<<<<<
@@ -10896,19 +10932,19 @@
*/
(((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->vs[1]) = ((__pyx_t_5numpy_float64_t *)__pyx_v_temp->data);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":85
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":90
* temp = tf_obj.green.y
* self.vs[1] = <np.float64_t *> temp.data
* temp = tf_obj.blue.y # <<<<<<<<<<<<<<
* self.vs[2] = <np.float64_t *> temp.data
* temp = tf_obj.alpha.y
*/
- __pyx_t_1 = PyObject_GetAttr(__pyx_v_tf_obj, __pyx_kp_blue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(__pyx_v_tf_obj, __pyx_kp_blue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_kp_y); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_kp_y); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (!(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_3 = ((PyArrayObject *)__pyx_t_2);
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
@@ -10925,14 +10961,14 @@
}
__pyx_bstride_0_temp = __pyx_bstruct_temp.strides[0];
__pyx_bshape_0_temp = __pyx_bstruct_temp.shape[0];
- if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_t_3 = 0;
__Pyx_DECREF(((PyObject *)__pyx_v_temp));
__pyx_v_temp = ((PyArrayObject *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":86
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":91
* self.vs[1] = <np.float64_t *> temp.data
* temp = tf_obj.blue.y
* self.vs[2] = <np.float64_t *> temp.data # <<<<<<<<<<<<<<
@@ -10941,19 +10977,19 @@
*/
(((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->vs[2]) = ((__pyx_t_5numpy_float64_t *)__pyx_v_temp->data);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":87
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":92
* temp = tf_obj.blue.y
* self.vs[2] = <np.float64_t *> temp.data
* temp = tf_obj.alpha.y # <<<<<<<<<<<<<<
* self.vs[3] = <np.float64_t *> temp.data
* self.x_bounds[0] = tf_obj.x_bounds[0]
*/
- __pyx_t_2 = PyObject_GetAttr(__pyx_v_tf_obj, __pyx_kp_alpha); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(__pyx_v_tf_obj, __pyx_kp_alpha); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_kp_y); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_kp_y); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (!(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_3 = ((PyArrayObject *)__pyx_t_1);
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
@@ -10970,14 +11006,14 @@
}
__pyx_bstride_0_temp = __pyx_bstruct_temp.strides[0];
__pyx_bshape_0_temp = __pyx_bstruct_temp.shape[0];
- if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_t_3 = 0;
__Pyx_DECREF(((PyObject *)__pyx_v_temp));
__pyx_v_temp = ((PyArrayObject *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":88
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":93
* self.vs[2] = <np.float64_t *> temp.data
* temp = tf_obj.alpha.y
* self.vs[3] = <np.float64_t *> temp.data # <<<<<<<<<<<<<<
@@ -10986,59 +11022,276 @@
*/
(((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->vs[3]) = ((__pyx_t_5numpy_float64_t *)__pyx_v_temp->data);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":89
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":94
* temp = tf_obj.alpha.y
* self.vs[3] = <np.float64_t *> temp.data
* self.x_bounds[0] = tf_obj.x_bounds[0] # <<<<<<<<<<<<<<
* self.x_bounds[1] = tf_obj.x_bounds[1]
* self.nbins = tf_obj.nbins
*/
- __pyx_t_1 = PyObject_GetAttr(__pyx_v_tf_obj, __pyx_kp_x_bounds); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(__pyx_v_tf_obj, __pyx_kp_x_bounds); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_1 = __Pyx_GetItemInt(__pyx_t_1, 0, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_1 = __Pyx_GetItemInt(__pyx_t_1, 0, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_1);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
(((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->x_bounds[0]) = __pyx_t_8;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":90
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":95
* self.vs[3] = <np.float64_t *> temp.data
* self.x_bounds[0] = tf_obj.x_bounds[0]
* self.x_bounds[1] = tf_obj.x_bounds[1] # <<<<<<<<<<<<<<
* self.nbins = tf_obj.nbins
* self.dbin = (self.x_bounds[1] - self.x_bounds[0])/self.nbins
*/
- __pyx_t_1 = PyObject_GetAttr(__pyx_v_tf_obj, __pyx_kp_x_bounds); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(__pyx_v_tf_obj, __pyx_kp_x_bounds); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_1 = __Pyx_GetItemInt(__pyx_t_1, 1, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_1 = __Pyx_GetItemInt(__pyx_t_1, 1, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_1);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
(((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->x_bounds[1]) = __pyx_t_8;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":91
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":96
* self.x_bounds[0] = tf_obj.x_bounds[0]
* self.x_bounds[1] = tf_obj.x_bounds[1]
* self.nbins = tf_obj.nbins # <<<<<<<<<<<<<<
* self.dbin = (self.x_bounds[1] - self.x_bounds[0])/self.nbins
- *
+ * self.light_color[0] = tf_obj.light_color[0]
*/
- __pyx_t_1 = PyObject_GetAttr(__pyx_v_tf_obj, __pyx_kp_nbins); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(__pyx_v_tf_obj, __pyx_kp_nbins); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->nbins = __pyx_t_4;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":92
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":97
* self.x_bounds[1] = tf_obj.x_bounds[1]
* self.nbins = tf_obj.nbins
* self.dbin = (self.x_bounds[1] - self.x_bounds[0])/self.nbins # <<<<<<<<<<<<<<
+ * self.light_color[0] = tf_obj.light_color[0]
+ * self.light_color[1] = tf_obj.light_color[1]
+ */
+ ((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->dbin = (((((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->x_bounds[1]) - (((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->x_bounds[0])) / ((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->nbins);
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":98
+ * self.nbins = tf_obj.nbins
+ * self.dbin = (self.x_bounds[1] - self.x_bounds[0])/self.nbins
+ * self.light_color[0] = tf_obj.light_color[0] # <<<<<<<<<<<<<<
+ * self.light_color[1] = tf_obj.light_color[1]
+ * self.light_color[2] = tf_obj.light_color[2]
+ */
+ __pyx_t_1 = PyObject_GetAttr(__pyx_v_tf_obj, __pyx_kp_light_color); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_1 = __Pyx_GetItemInt(__pyx_t_1, 0, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+ (((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->light_color[0]) = __pyx_t_8;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":99
+ * self.dbin = (self.x_bounds[1] - self.x_bounds[0])/self.nbins
+ * self.light_color[0] = tf_obj.light_color[0]
+ * self.light_color[1] = tf_obj.light_color[1] # <<<<<<<<<<<<<<
+ * self.light_color[2] = tf_obj.light_color[2]
+ * self.light_dir[0] = tf_obj.light_dir[0]
+ */
+ __pyx_t_1 = PyObject_GetAttr(__pyx_v_tf_obj, __pyx_kp_light_color); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_1 = __Pyx_GetItemInt(__pyx_t_1, 1, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+ (((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->light_color[1]) = __pyx_t_8;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":100
+ * self.light_color[0] = tf_obj.light_color[0]
+ * self.light_color[1] = tf_obj.light_color[1]
+ * self.light_color[2] = tf_obj.light_color[2] # <<<<<<<<<<<<<<
+ * self.light_dir[0] = tf_obj.light_dir[0]
+ * self.light_dir[1] = tf_obj.light_dir[1]
+ */
+ __pyx_t_1 = PyObject_GetAttr(__pyx_v_tf_obj, __pyx_kp_light_color); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_1 = __Pyx_GetItemInt(__pyx_t_1, 2, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+ (((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->light_color[2]) = __pyx_t_8;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":101
+ * self.light_color[1] = tf_obj.light_color[1]
+ * self.light_color[2] = tf_obj.light_color[2]
+ * self.light_dir[0] = tf_obj.light_dir[0] # <<<<<<<<<<<<<<
+ * self.light_dir[1] = tf_obj.light_dir[1]
+ * self.light_dir[2] = tf_obj.light_dir[2]
+ */
+ __pyx_t_1 = PyObject_GetAttr(__pyx_v_tf_obj, __pyx_kp_light_dir); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_1 = __Pyx_GetItemInt(__pyx_t_1, 0, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+ (((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->light_dir[0]) = __pyx_t_8;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":102
+ * self.light_color[2] = tf_obj.light_color[2]
+ * self.light_dir[0] = tf_obj.light_dir[0]
+ * self.light_dir[1] = tf_obj.light_dir[1] # <<<<<<<<<<<<<<
+ * self.light_dir[2] = tf_obj.light_dir[2]
+ * cdef np.float64_t normval = 0.0
+ */
+ __pyx_t_1 = PyObject_GetAttr(__pyx_v_tf_obj, __pyx_kp_light_dir); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_1 = __Pyx_GetItemInt(__pyx_t_1, 1, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+ (((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->light_dir[1]) = __pyx_t_8;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":103
+ * self.light_dir[0] = tf_obj.light_dir[0]
+ * self.light_dir[1] = tf_obj.light_dir[1]
+ * self.light_dir[2] = tf_obj.light_dir[2] # <<<<<<<<<<<<<<
+ * cdef np.float64_t normval = 0.0
+ * for i in range(3): normval += self.light_dir[i]**2
+ */
+ __pyx_t_1 = PyObject_GetAttr(__pyx_v_tf_obj, __pyx_kp_light_dir); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_1 = __Pyx_GetItemInt(__pyx_t_1, 2, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+ (((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->light_dir[2]) = __pyx_t_8;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":104
+ * self.light_dir[1] = tf_obj.light_dir[1]
+ * self.light_dir[2] = tf_obj.light_dir[2]
+ * cdef np.float64_t normval = 0.0 # <<<<<<<<<<<<<<
+ * for i in range(3): normval += self.light_dir[i]**2
+ * normval = normval**0.5
+ */
+ __pyx_v_normval = 0.0;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":105
+ * self.light_dir[2] = tf_obj.light_dir[2]
+ * cdef np.float64_t normval = 0.0
+ * for i in range(3): normval += self.light_dir[i]**2 # <<<<<<<<<<<<<<
+ * normval = normval**0.5
+ * for i in range(3): self.light_dir[i] /= normval
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+ __Pyx_INCREF(__pyx_int_3);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_int_3);
+ __Pyx_GIVEREF(__pyx_int_3);
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+ if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
+ __pyx_t_9 = 0; __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1);
+ } else {
+ __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ for (;;) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++;
+ } else if (likely(PyTuple_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++;
+ } else {
+ __pyx_t_2 = PyIter_Next(__pyx_t_1);
+ if (!__pyx_t_2) {
+ if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ }
+ __Pyx_DECREF(__pyx_v_i);
+ __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = 0;
+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_v_normval += pow((((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->light_dir[__pyx_t_10]), 2);
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":106
+ * cdef np.float64_t normval = 0.0
+ * for i in range(3): normval += self.light_dir[i]**2
+ * normval = normval**0.5 # <<<<<<<<<<<<<<
+ * for i in range(3): self.light_dir[i] /= normval
+ * self.use_light = tf_obj.use_light
+ */
+ __pyx_v_normval = pow(__pyx_v_normval, 0.5);
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":107
+ * for i in range(3): normval += self.light_dir[i]**2
+ * normval = normval**0.5
+ * for i in range(3): self.light_dir[i] /= normval # <<<<<<<<<<<<<<
+ * self.use_light = tf_obj.use_light
+ *
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+ __Pyx_INCREF(__pyx_int_3);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_int_3);
+ __Pyx_GIVEREF(__pyx_int_3);
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+ if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
+ __pyx_t_9 = 0; __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1);
+ } else {
+ __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ for (;;) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++;
+ } else if (likely(PyTuple_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++;
+ } else {
+ __pyx_t_2 = PyIter_Next(__pyx_t_1);
+ if (!__pyx_t_2) {
+ if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ }
+ __Pyx_DECREF(__pyx_v_i);
+ __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = 0;
+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ (((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->light_dir[__pyx_t_10]) /= __pyx_v_normval;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":108
+ * normval = normval**0.5
+ * for i in range(3): self.light_dir[i] /= normval
+ * self.use_light = tf_obj.use_light # <<<<<<<<<<<<<<
*
* cdef void eval_transfer(self, np.float64_t dt, np.float64_t dv,
*/
- ((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->dbin = (((((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->x_bounds[1]) - (((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->x_bounds[0])) / ((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->nbins);
+ __pyx_t_1 = PyObject_GetAttr(__pyx_v_tf_obj, __pyx_kp_use_light); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ ((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->use_light = __pyx_t_4;
__pyx_r = 0;
goto __pyx_L0;
@@ -11057,19 +11310,20 @@
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_temp);
__pyx_L2:;
__Pyx_DECREF((PyObject *)__pyx_v_temp);
+ __Pyx_DECREF(__pyx_v_i);
__Pyx_FinishRefcountContext();
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":94
- * self.dbin = (self.x_bounds[1] - self.x_bounds[0])/self.nbins
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":110
+ * self.use_light = tf_obj.use_light
*
* cdef void eval_transfer(self, np.float64_t dt, np.float64_t dv, # <<<<<<<<<<<<<<
- * np.float64_t *rgba):
+ * np.float64_t *rgba, np.float64_t *grad):
* cdef int i
*/
-static void __pyx_f_2yt_9amr_utils_21TransferFunctionProxy_eval_transfer(struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *__pyx_v_self, __pyx_t_5numpy_float64_t __pyx_v_dt, __pyx_t_5numpy_float64_t __pyx_v_dv, __pyx_t_5numpy_float64_t *__pyx_v_rgba) {
+static void __pyx_f_2yt_9amr_utils_21TransferFunctionProxy_eval_transfer(struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *__pyx_v_self, __pyx_t_5numpy_float64_t __pyx_v_dt, __pyx_t_5numpy_float64_t __pyx_v_dv, __pyx_t_5numpy_float64_t *__pyx_v_rgba, __pyx_t_5numpy_float64_t *__pyx_v_grad) {
int __pyx_v_i;
int __pyx_v_bin_id;
__pyx_t_5numpy_float64_t __pyx_v_tf;
@@ -11078,19 +11332,20 @@
__pyx_t_5numpy_float64_t __pyx_v_dy;
__pyx_t_5numpy_float64_t __pyx_v_dd;
__pyx_t_5numpy_float64_t __pyx_v_ta;
+ __pyx_t_5numpy_float64_t __pyx_v_dot_prod;
int __pyx_t_1;
__Pyx_SetupRefcountContext("eval_transfer");
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":99
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":115
* cdef int bin_id
- * cdef np.float64_t tf, trgba[4], bv, dx, dy, dd,ta
+ * cdef np.float64_t tf, trgba[4], bv, dx, dy, dd, ta, dot_prod
* dx = self.dbin # <<<<<<<<<<<<<<
*
* # get source alpha first
*/
__pyx_v_dx = __pyx_v_self->dbin;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":104
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":120
* # First locate our points
* bin_id = iclip(<int> floor((dv - self.x_bounds[0]) / dx),
* 0, self.nbins-2) # <<<<<<<<<<<<<<
@@ -11099,7 +11354,7 @@
*/
__pyx_v_bin_id = __pyx_f_2yt_9amr_utils_iclip(((int)floor(((__pyx_v_dv - (__pyx_v_self->x_bounds[0])) / __pyx_v_dx))), 0, (__pyx_v_self->nbins - 2));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":106
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":122
* 0, self.nbins-2)
* # Recall that linear interpolation is y0 + (x-x0) * dx/dy
* bv = self.vs[3][bin_id] # This is x0 # <<<<<<<<<<<<<<
@@ -11108,7 +11363,7 @@
*/
__pyx_v_bv = ((__pyx_v_self->vs[3])[__pyx_v_bin_id]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":107
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":123
* # Recall that linear interpolation is y0 + (x-x0) * dx/dy
* bv = self.vs[3][bin_id] # This is x0
* dy = self.vs[3][bin_id+1]-bv # dy # <<<<<<<<<<<<<<
@@ -11117,7 +11372,7 @@
*/
__pyx_v_dy = (((__pyx_v_self->vs[3])[(__pyx_v_bin_id + 1)]) - __pyx_v_bv);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":108
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":124
* bv = self.vs[3][bin_id] # This is x0
* dy = self.vs[3][bin_id+1]-bv # dy
* dd = dv-(self.x_bounds[0] + bin_id * dx) # x - x0 # <<<<<<<<<<<<<<
@@ -11126,27 +11381,65 @@
*/
__pyx_v_dd = (__pyx_v_dv - ((__pyx_v_self->x_bounds[0]) + (__pyx_v_bin_id * __pyx_v_dx)));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":110
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":126
* dd = dv-(self.x_bounds[0] + bin_id * dx) # x - x0
* # This is our final value for transfer function on the entering face
* tf = bv+dd*(dy/dx) # <<<<<<<<<<<<<<
* ta = tf # Store the source alpha
- * for i in range(3):
+ * dot_prod = 0.0
*/
__pyx_v_tf = (__pyx_v_bv + (__pyx_v_dd * (__pyx_v_dy / __pyx_v_dx)));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":111
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":127
* # This is our final value for transfer function on the entering face
* tf = bv+dd*(dy/dx)
* ta = tf # Store the source alpha # <<<<<<<<<<<<<<
+ * dot_prod = 0.0
* for i in range(3):
- * # Recall that linear interpolation is y0 + (x-x0) * dx/dy
*/
__pyx_v_ta = __pyx_v_tf;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":112
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":128
* tf = bv+dd*(dy/dx)
* ta = tf # Store the source alpha
+ * dot_prod = 0.0 # <<<<<<<<<<<<<<
+ * for i in range(3):
+ * dot_prod += self.light_dir[i] * grad[i]
+ */
+ __pyx_v_dot_prod = 0.0;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":129
+ * ta = tf # Store the source alpha
+ * dot_prod = 0.0
+ * for i in range(3): # <<<<<<<<<<<<<<
+ * dot_prod += self.light_dir[i] * grad[i]
+ * #print dot_prod, grad[0], grad[1], grad[2]
+ */
+ for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
+ __pyx_v_i = __pyx_t_1;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":130
+ * dot_prod = 0.0
+ * for i in range(3):
+ * dot_prod += self.light_dir[i] * grad[i] # <<<<<<<<<<<<<<
+ * #print dot_prod, grad[0], grad[1], grad[2]
+ * dot_prod = fmax(0.0, dot_prod)
+ */
+ __pyx_v_dot_prod += ((__pyx_v_self->light_dir[__pyx_v_i]) * (__pyx_v_grad[__pyx_v_i]));
+ }
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":132
+ * dot_prod += self.light_dir[i] * grad[i]
+ * #print dot_prod, grad[0], grad[1], grad[2]
+ * dot_prod = fmax(0.0, dot_prod) # <<<<<<<<<<<<<<
+ * for i in range(3):
+ * # Recall that linear interpolation is y0 + (x-x0) * dx/dy
+ */
+ __pyx_v_dot_prod = __pyx_f_2yt_9amr_utils_fmax(0.0, __pyx_v_dot_prod);
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":133
+ * #print dot_prod, grad[0], grad[1], grad[2]
+ * dot_prod = fmax(0.0, dot_prod)
* for i in range(3): # <<<<<<<<<<<<<<
* # Recall that linear interpolation is y0 + (x-x0) * dx/dy
* bv = self.vs[i][bin_id] # This is x0
@@ -11154,7 +11447,7 @@
for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
__pyx_v_i = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":114
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":135
* for i in range(3):
* # Recall that linear interpolation is y0 + (x-x0) * dx/dy
* bv = self.vs[i][bin_id] # This is x0 # <<<<<<<<<<<<<<
@@ -11163,7 +11456,7 @@
*/
__pyx_v_bv = ((__pyx_v_self->vs[__pyx_v_i])[__pyx_v_bin_id]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":115
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":136
* # Recall that linear interpolation is y0 + (x-x0) * dx/dy
* bv = self.vs[i][bin_id] # This is x0
* dy = self.vs[i][bin_id+1]-bv # dy # <<<<<<<<<<<<<<
@@ -11172,26 +11465,26 @@
*/
__pyx_v_dy = (((__pyx_v_self->vs[__pyx_v_i])[(__pyx_v_bin_id + 1)]) - __pyx_v_bv);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":116
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":137
* bv = self.vs[i][bin_id] # This is x0
* dy = self.vs[i][bin_id+1]-bv # dy
* dd = dv-(self.x_bounds[0] + bin_id * dx) # x - x0 # <<<<<<<<<<<<<<
* # This is our final value for transfer function on the entering face
- * tf = bv+dd*(dy/dx)
+ * tf = bv+dd*(dy/dx) + dot_prod * self.light_color[i]
*/
__pyx_v_dd = (__pyx_v_dv - ((__pyx_v_self->x_bounds[0]) + (__pyx_v_bin_id * __pyx_v_dx)));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":118
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":139
* dd = dv-(self.x_bounds[0] + bin_id * dx) # x - x0
* # This is our final value for transfer function on the entering face
- * tf = bv+dd*(dy/dx) # <<<<<<<<<<<<<<
+ * tf = bv+dd*(dy/dx) + dot_prod * self.light_color[i] # <<<<<<<<<<<<<<
* # alpha blending
* rgba[i] += (1. - rgba[3])*ta*tf*dt
*/
- __pyx_v_tf = (__pyx_v_bv + (__pyx_v_dd * (__pyx_v_dy / __pyx_v_dx)));
+ __pyx_v_tf = ((__pyx_v_bv + (__pyx_v_dd * (__pyx_v_dy / __pyx_v_dx))) + (__pyx_v_dot_prod * (__pyx_v_self->light_color[__pyx_v_i])));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":120
- * tf = bv+dd*(dy/dx)
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":141
+ * tf = bv+dd*(dy/dx) + dot_prod * self.light_color[i]
* # alpha blending
* rgba[i] += (1. - rgba[3])*ta*tf*dt # <<<<<<<<<<<<<<
* #update alpha
@@ -11200,19 +11493,19 @@
(__pyx_v_rgba[__pyx_v_i]) += ((((1.0 - (__pyx_v_rgba[3])) * __pyx_v_ta) * __pyx_v_tf) * __pyx_v_dt);
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":122
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":143
* rgba[i] += (1. - rgba[3])*ta*tf*dt
* #update alpha
* rgba[3] += (1. - rgba[3])*ta*dt # <<<<<<<<<<<<<<
- *
* # We should really do some alpha blending.
+ * # Front to back blending is defined as:
*/
(__pyx_v_rgba[3]) += (((1.0 - (__pyx_v_rgba[3])) * __pyx_v_ta) * __pyx_v_dt);
__Pyx_FinishRefcountContext();
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":137
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":157
* cdef np.float64_t *x_vec, *y_vec
*
* def __cinit__(self, # <<<<<<<<<<<<<<
@@ -11285,41 +11578,41 @@
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_vp_dir);
if (likely(values[1])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 1); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 1); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
values[2] = PyDict_GetItem(__pyx_kwds, __pyx_kp_center);
if (likely(values[2])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 2); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 2); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 3:
values[3] = PyDict_GetItem(__pyx_kwds, __pyx_kp_bounds);
if (likely(values[3])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 3); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 3); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 4:
values[4] = PyDict_GetItem(__pyx_kwds, __pyx_kp_image);
if (likely(values[4])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 4); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 4); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 5:
values[5] = PyDict_GetItem(__pyx_kwds, __pyx_kp_x_vec);
if (likely(values[5])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 5); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 5); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 6:
values[6] = PyDict_GetItem(__pyx_kwds, __pyx_kp_y_vec);
if (likely(values[6])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 6); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 6); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__cinit__") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__cinit__") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
__pyx_v_vp_pos = ((PyArrayObject *)values[0]);
__pyx_v_vp_dir = ((PyArrayObject *)values[1]);
@@ -11341,7 +11634,7 @@
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.VectorPlane.__cinit__");
return -1;
@@ -11352,50 +11645,50 @@
__pyx_bstruct_image.buf = NULL;
__pyx_bstruct_x_vec.buf = NULL;
__pyx_bstruct_y_vec.buf = NULL;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vp_pos), __pyx_ptype_5numpy_ndarray, 1, "vp_pos", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vp_dir), __pyx_ptype_5numpy_ndarray, 1, "vp_dir", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_center), __pyx_ptype_5numpy_ndarray, 1, "center", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_image), __pyx_ptype_5numpy_ndarray, 1, "image", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x_vec), __pyx_ptype_5numpy_ndarray, 1, "x_vec", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y_vec), __pyx_ptype_5numpy_ndarray, 1, "y_vec", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vp_pos), __pyx_ptype_5numpy_ndarray, 1, "vp_pos", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vp_dir), __pyx_ptype_5numpy_ndarray, 1, "vp_dir", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_center), __pyx_ptype_5numpy_ndarray, 1, "center", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_image), __pyx_ptype_5numpy_ndarray, 1, "image", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x_vec), __pyx_ptype_5numpy_ndarray, 1, "x_vec", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y_vec), __pyx_ptype_5numpy_ndarray, 1, "y_vec", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_vp_pos, (PyObject*)__pyx_v_vp_pos, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_vp_pos, (PyObject*)__pyx_v_vp_pos, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_bstride_0_vp_pos = __pyx_bstruct_vp_pos.strides[0]; __pyx_bstride_1_vp_pos = __pyx_bstruct_vp_pos.strides[1]; __pyx_bstride_2_vp_pos = __pyx_bstruct_vp_pos.strides[2];
__pyx_bshape_0_vp_pos = __pyx_bstruct_vp_pos.shape[0]; __pyx_bshape_1_vp_pos = __pyx_bstruct_vp_pos.shape[1]; __pyx_bshape_2_vp_pos = __pyx_bstruct_vp_pos.shape[2];
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_vp_dir, (PyObject*)__pyx_v_vp_dir, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_vp_dir, (PyObject*)__pyx_v_vp_dir, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_bstride_0_vp_dir = __pyx_bstruct_vp_dir.strides[0];
__pyx_bshape_0_vp_dir = __pyx_bstruct_vp_dir.shape[0];
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_center, (PyObject*)__pyx_v_center, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_center, (PyObject*)__pyx_v_center, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_bstride_0_center = __pyx_bstruct_center.strides[0];
__pyx_bshape_0_center = __pyx_bstruct_center.shape[0];
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_image, (PyObject*)__pyx_v_image, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_image, (PyObject*)__pyx_v_image, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_bstride_0_image = __pyx_bstruct_image.strides[0]; __pyx_bstride_1_image = __pyx_bstruct_image.strides[1]; __pyx_bstride_2_image = __pyx_bstruct_image.strides[2];
__pyx_bshape_0_image = __pyx_bstruct_image.shape[0]; __pyx_bshape_1_image = __pyx_bstruct_image.shape[1]; __pyx_bshape_2_image = __pyx_bstruct_image.shape[2];
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_x_vec, (PyObject*)__pyx_v_x_vec, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_x_vec, (PyObject*)__pyx_v_x_vec, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_bstride_0_x_vec = __pyx_bstruct_x_vec.strides[0];
__pyx_bshape_0_x_vec = __pyx_bstruct_x_vec.shape[0];
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_y_vec, (PyObject*)__pyx_v_y_vec, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_y_vec, (PyObject*)__pyx_v_y_vec, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_bstride_0_y_vec = __pyx_bstruct_y_vec.strides[0];
__pyx_bshape_0_y_vec = __pyx_bstruct_y_vec.shape[0];
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":146
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":166
* np.ndarray[np.float64_t, ndim=1] y_vec):
* cdef int i, j
* self.avp_pos = vp_pos # <<<<<<<<<<<<<<
@@ -11408,7 +11701,7 @@
__Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->avp_pos);
((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->avp_pos = ((PyObject *)__pyx_v_vp_pos);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":147
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":167
* cdef int i, j
* self.avp_pos = vp_pos
* self.avp_dir = vp_dir # <<<<<<<<<<<<<<
@@ -11421,7 +11714,7 @@
__Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->avp_dir);
((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->avp_dir = ((PyObject *)__pyx_v_vp_dir);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":148
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":168
* self.avp_pos = vp_pos
* self.avp_dir = vp_dir
* self.acenter = center # <<<<<<<<<<<<<<
@@ -11434,7 +11727,7 @@
__Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->acenter);
((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->acenter = ((PyObject *)__pyx_v_center);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":149
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":169
* self.avp_dir = vp_dir
* self.acenter = center
* self.aimage = image # <<<<<<<<<<<<<<
@@ -11447,7 +11740,7 @@
__Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->aimage);
((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->aimage = ((PyObject *)__pyx_v_image);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":150
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":170
* self.acenter = center
* self.aimage = image
* self.ax_vec = x_vec # <<<<<<<<<<<<<<
@@ -11460,7 +11753,7 @@
__Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->ax_vec);
((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->ax_vec = ((PyObject *)__pyx_v_x_vec);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":151
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":171
* self.aimage = image
* self.ax_vec = x_vec
* self.ay_vec = y_vec # <<<<<<<<<<<<<<
@@ -11473,7 +11766,7 @@
__Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->ay_vec);
((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->ay_vec = ((PyObject *)__pyx_v_y_vec);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":152
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":172
* self.ax_vec = x_vec
* self.ay_vec = y_vec
* self.vp_pos = <np.float64_t *> vp_pos.data # <<<<<<<<<<<<<<
@@ -11482,7 +11775,7 @@
*/
((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->vp_pos = ((__pyx_t_5numpy_float64_t *)__pyx_v_vp_pos->data);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":153
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":173
* self.ay_vec = y_vec
* self.vp_pos = <np.float64_t *> vp_pos.data
* self.vp_dir = <np.float64_t *> vp_dir.data # <<<<<<<<<<<<<<
@@ -11491,7 +11784,7 @@
*/
((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->vp_dir = ((__pyx_t_5numpy_float64_t *)__pyx_v_vp_dir->data);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":154
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":174
* self.vp_pos = <np.float64_t *> vp_pos.data
* self.vp_dir = <np.float64_t *> vp_dir.data
* self.center = <np.float64_t *> center.data # <<<<<<<<<<<<<<
@@ -11500,7 +11793,7 @@
*/
((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->center = ((__pyx_t_5numpy_float64_t *)__pyx_v_center->data);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":155
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":175
* self.vp_dir = <np.float64_t *> vp_dir.data
* self.center = <np.float64_t *> center.data
* self.image = <np.float64_t *> image.data # <<<<<<<<<<<<<<
@@ -11509,7 +11802,7 @@
*/
((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->image = ((__pyx_t_5numpy_float64_t *)__pyx_v_image->data);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":156
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":176
* self.center = <np.float64_t *> center.data
* self.image = <np.float64_t *> image.data
* self.x_vec = <np.float64_t *> x_vec.data # <<<<<<<<<<<<<<
@@ -11518,7 +11811,7 @@
*/
((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->x_vec = ((__pyx_t_5numpy_float64_t *)__pyx_v_x_vec->data);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":157
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":177
* self.image = <np.float64_t *> image.data
* self.x_vec = <np.float64_t *> x_vec.data
* self.y_vec = <np.float64_t *> y_vec.data # <<<<<<<<<<<<<<
@@ -11527,7 +11820,7 @@
*/
((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->y_vec = ((__pyx_t_5numpy_float64_t *)__pyx_v_y_vec->data);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":158
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":178
* self.x_vec = <np.float64_t *> x_vec.data
* self.y_vec = <np.float64_t *> y_vec.data
* self.nv = vp_pos.shape[0] # <<<<<<<<<<<<<<
@@ -11536,7 +11829,7 @@
*/
((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->nv = (__pyx_v_vp_pos->dimensions[0]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":159
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":179
* self.y_vec = <np.float64_t *> y_vec.data
* self.nv = vp_pos.shape[0]
* for i in range(4): self.bounds[i] = bounds[i] # <<<<<<<<<<<<<<
@@ -11545,14 +11838,14 @@
*/
for (__pyx_t_1 = 0; __pyx_t_1 < 4; __pyx_t_1+=1) {
__pyx_v_i = __pyx_t_1;
- __pyx_1 = __Pyx_GetItemInt(__pyx_v_bounds, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_1 = __Pyx_GetItemInt(__pyx_v_bounds, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_1);
- __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->bounds[__pyx_v_i]) = __pyx_t_2;
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":160
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":180
* self.nv = vp_pos.shape[0]
* for i in range(4): self.bounds[i] = bounds[i]
* self.pdx = (self.bounds[1] - self.bounds[0])/self.nv # <<<<<<<<<<<<<<
@@ -11561,7 +11854,7 @@
*/
((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->pdx = (((((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->bounds[1]) - (((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->bounds[0])) / ((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->nv);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":161
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":181
* for i in range(4): self.bounds[i] = bounds[i]
* self.pdx = (self.bounds[1] - self.bounds[0])/self.nv
* self.pdy = (self.bounds[3] - self.bounds[2])/self.nv # <<<<<<<<<<<<<<
@@ -11598,7 +11891,7 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":163
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":183
* self.pdy = (self.bounds[3] - self.bounds[2])/self.nv
*
* cdef void get_start_stop(self, np.float64_t *ex, int *rv): # <<<<<<<<<<<<<<
@@ -11618,7 +11911,7 @@
__Pyx_SetupRefcountContext("get_start_stop");
__pyx_v_i = Py_None; __Pyx_INCREF(Py_None);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":166
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":186
* # Extrema need to be re-centered
* cdef np.float64_t cx, cy
* cx = cy = 0.0 # <<<<<<<<<<<<<<
@@ -11628,25 +11921,25 @@
__pyx_v_cx = 0.0;
__pyx_v_cy = 0.0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":167
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":187
* cdef np.float64_t cx, cy
* cx = cy = 0.0
* for i in range(3): # <<<<<<<<<<<<<<
* cx += self.center[i] * self.x_vec[i]
* cy += self.center[i] * self.y_vec[i]
*/
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
__Pyx_INCREF(__pyx_int_3);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_3);
__Pyx_GIVEREF(__pyx_int_3);
- __pyx_t_3 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) {
__pyx_t_1 = 0; __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2);
} else {
- __pyx_t_1 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
@@ -11660,7 +11953,7 @@
} else {
__pyx_t_3 = PyIter_Next(__pyx_t_2);
if (!__pyx_t_3) {
- if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
break;
}
__Pyx_GOTREF(__pyx_t_3);
@@ -11669,31 +11962,31 @@
__pyx_v_i = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":168
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":188
* cx = cy = 0.0
* for i in range(3):
* cx += self.center[i] * self.x_vec[i] # <<<<<<<<<<<<<<
* cy += self.center[i] * self.y_vec[i]
* rv[0] = <int> floor((ex[0] - cx - self.bounds[0])/self.pdx)
*/
- __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_cx += ((__pyx_v_self->center[__pyx_t_4]) * (__pyx_v_self->x_vec[__pyx_t_5]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":169
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":189
* for i in range(3):
* cx += self.center[i] * self.x_vec[i]
* cy += self.center[i] * self.y_vec[i] # <<<<<<<<<<<<<<
* rv[0] = <int> floor((ex[0] - cx - self.bounds[0])/self.pdx)
* rv[1] = rv[0] + <int> ceil((ex[1] - ex[0])/self.pdx)
*/
- __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_cy += ((__pyx_v_self->center[__pyx_t_5]) * (__pyx_v_self->y_vec[__pyx_t_4]));
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":170
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":190
* cx += self.center[i] * self.x_vec[i]
* cy += self.center[i] * self.y_vec[i]
* rv[0] = <int> floor((ex[0] - cx - self.bounds[0])/self.pdx) # <<<<<<<<<<<<<<
@@ -11702,7 +11995,7 @@
*/
(__pyx_v_rv[0]) = ((int)floor(((((__pyx_v_ex[0]) - __pyx_v_cx) - (__pyx_v_self->bounds[0])) / __pyx_v_self->pdx)));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":171
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":191
* cy += self.center[i] * self.y_vec[i]
* rv[0] = <int> floor((ex[0] - cx - self.bounds[0])/self.pdx)
* rv[1] = rv[0] + <int> ceil((ex[1] - ex[0])/self.pdx) # <<<<<<<<<<<<<<
@@ -11711,7 +12004,7 @@
*/
(__pyx_v_rv[1]) = ((__pyx_v_rv[0]) + ((int)ceil((((__pyx_v_ex[1]) - (__pyx_v_ex[0])) / __pyx_v_self->pdx))));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":172
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":192
* rv[0] = <int> floor((ex[0] - cx - self.bounds[0])/self.pdx)
* rv[1] = rv[0] + <int> ceil((ex[1] - ex[0])/self.pdx)
* rv[2] = <int> floor((ex[2] - cy - self.bounds[2])/self.pdy) # <<<<<<<<<<<<<<
@@ -11720,7 +12013,7 @@
*/
(__pyx_v_rv[2]) = ((int)floor(((((__pyx_v_ex[2]) - __pyx_v_cy) - (__pyx_v_self->bounds[2])) / __pyx_v_self->pdy)));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":173
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":193
* rv[1] = rv[0] + <int> ceil((ex[1] - ex[0])/self.pdx)
* rv[2] = <int> floor((ex[2] - cy - self.bounds[2])/self.pdy)
* rv[3] = rv[2] + <int> ceil((ex[3] - ex[2])/self.pdy) # <<<<<<<<<<<<<<
@@ -11739,7 +12032,7 @@
__Pyx_FinishRefcountContext();
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":175
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":195
* rv[3] = rv[2] + <int> ceil((ex[3] - ex[2])/self.pdy)
*
* cdef inline void copy_into(self, np.float64_t *fv, np.float64_t *tv, # <<<<<<<<<<<<<<
@@ -11752,7 +12045,7 @@
int __pyx_t_1;
__Pyx_SetupRefcountContext("copy_into");
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":180
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":200
* # to-vector is flat and 'ni' long
* cdef int k
* for k in range(nk): # <<<<<<<<<<<<<<
@@ -11762,7 +12055,7 @@
for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_v_nk; __pyx_t_1+=1) {
__pyx_v_k = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":181
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":201
* cdef int k
* for k in range(nk):
* tv[k] = fv[(((k*self.nv)+j)*self.nv+i)] # <<<<<<<<<<<<<<
@@ -11775,7 +12068,7 @@
__Pyx_FinishRefcountContext();
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":183
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":203
* tv[k] = fv[(((k*self.nv)+j)*self.nv+i)]
*
* cdef inline void copy_back(self, np.float64_t *fv, np.float64_t *tv, # <<<<<<<<<<<<<<
@@ -11788,7 +12081,7 @@
int __pyx_t_1;
__Pyx_SetupRefcountContext("copy_back");
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":186
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":206
* int i, int j, int nk):
* cdef int k
* for k in range(nk): # <<<<<<<<<<<<<<
@@ -11798,7 +12091,7 @@
for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_v_nk; __pyx_t_1+=1) {
__pyx_v_k = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":187
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":207
* cdef int k
* for k in range(nk):
* tv[(((k*self.nv)+j)*self.nv+i)] = fv[k] # <<<<<<<<<<<<<<
@@ -11811,7 +12104,7 @@
__Pyx_FinishRefcountContext();
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":203
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":223
* @cython.boundscheck(False)
* @cython.wraparound(False)
* def __cinit__(self, # <<<<<<<<<<<<<<
@@ -11870,23 +12163,23 @@
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_left_edge);
if (likely(values[1])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, 1); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, 1); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
values[2] = PyDict_GetItem(__pyx_kwds, __pyx_kp_right_edge);
if (likely(values[2])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, 2); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, 2); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 3:
values[3] = PyDict_GetItem(__pyx_kwds, __pyx_kp_dims);
if (likely(values[3])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, 3); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, 3); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__cinit__") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__cinit__") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
__pyx_v_data = ((PyArrayObject *)values[0]);
__pyx_v_left_edge = ((PyArrayObject *)values[1]);
@@ -11902,7 +12195,7 @@
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.PartitionedGrid.__cinit__");
return -1;
@@ -11911,36 +12204,36 @@
__pyx_bstruct_left_edge.buf = NULL;
__pyx_bstruct_right_edge.buf = NULL;
__pyx_bstruct_dims.buf = NULL;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), __pyx_ptype_5numpy_ndarray, 1, "data", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left_edge), __pyx_ptype_5numpy_ndarray, 1, "left_edge", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right_edge), __pyx_ptype_5numpy_ndarray, 1, "right_edge", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dims), __pyx_ptype_5numpy_ndarray, 1, "dims", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), __pyx_ptype_5numpy_ndarray, 1, "data", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left_edge), __pyx_ptype_5numpy_ndarray, 1, "left_edge", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right_edge), __pyx_ptype_5numpy_ndarray, 1, "right_edge", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dims), __pyx_ptype_5numpy_ndarray, 1, "dims", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_data, (PyObject*)__pyx_v_data, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_data, (PyObject*)__pyx_v_data, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_bstride_0_data = __pyx_bstruct_data.strides[0]; __pyx_bstride_1_data = __pyx_bstruct_data.strides[1]; __pyx_bstride_2_data = __pyx_bstruct_data.strides[2];
__pyx_bshape_0_data = __pyx_bstruct_data.shape[0]; __pyx_bshape_1_data = __pyx_bstruct_data.shape[1]; __pyx_bshape_2_data = __pyx_bstruct_data.shape[2];
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_left_edge, (PyObject*)__pyx_v_left_edge, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_left_edge, (PyObject*)__pyx_v_left_edge, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_bstride_0_left_edge = __pyx_bstruct_left_edge.strides[0];
__pyx_bshape_0_left_edge = __pyx_bstruct_left_edge.shape[0];
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_right_edge, (PyObject*)__pyx_v_right_edge, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_right_edge, (PyObject*)__pyx_v_right_edge, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_bstride_0_right_edge = __pyx_bstruct_right_edge.strides[0];
__pyx_bshape_0_right_edge = __pyx_bstruct_right_edge.shape[0];
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_dims, (PyObject*)__pyx_v_dims, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_dims, (PyObject*)__pyx_v_dims, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_bstride_0_dims = __pyx_bstruct_dims.strides[0];
__pyx_bshape_0_dims = __pyx_bstruct_dims.shape[0];
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":210
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":230
* # The data is likely brought in via a slice, so we copy it
* cdef int i, j, k, size
* self.LeftEdge = left_edge # <<<<<<<<<<<<<<
@@ -11953,7 +12246,7 @@
__Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->LeftEdge);
((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->LeftEdge = ((PyObject *)__pyx_v_left_edge);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":211
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":231
* cdef int i, j, k, size
* self.LeftEdge = left_edge
* self.RightEdge = right_edge # <<<<<<<<<<<<<<
@@ -11966,7 +12259,7 @@
__Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->RightEdge);
((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->RightEdge = ((PyObject *)__pyx_v_right_edge);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":212
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":232
* self.LeftEdge = left_edge
* self.RightEdge = right_edge
* for i in range(3): # <<<<<<<<<<<<<<
@@ -11976,7 +12269,7 @@
for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
__pyx_v_i = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":213
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":233
* self.RightEdge = right_edge
* for i in range(3):
* self.left_edge[i] = left_edge[i] # <<<<<<<<<<<<<<
@@ -11986,7 +12279,7 @@
__pyx_t_2 = __pyx_v_i;
(((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->left_edge[__pyx_v_i]) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_2, __pyx_bstride_0_left_edge));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":214
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":234
* for i in range(3):
* self.left_edge[i] = left_edge[i]
* self.right_edge[i] = right_edge[i] # <<<<<<<<<<<<<<
@@ -11996,7 +12289,7 @@
__pyx_t_3 = __pyx_v_i;
(((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->right_edge[__pyx_v_i]) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_3, __pyx_bstride_0_right_edge));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":215
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":235
* self.left_edge[i] = left_edge[i]
* self.right_edge[i] = right_edge[i]
* self.dims[i] = dims[i] # <<<<<<<<<<<<<<
@@ -12006,7 +12299,7 @@
__pyx_t_4 = __pyx_v_i;
(((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->dims[__pyx_v_i]) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_dims.buf, __pyx_t_4, __pyx_bstride_0_dims));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":216
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":236
* self.right_edge[i] = right_edge[i]
* self.dims[i] = dims[i]
* self.dds[i] = (self.right_edge[i] - self.left_edge[i])/dims[i] # <<<<<<<<<<<<<<
@@ -12017,7 +12310,7 @@
(((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->dds[__pyx_v_i]) = (((((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->right_edge[__pyx_v_i]) - (((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->left_edge[__pyx_v_i])) / (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_dims.buf, __pyx_t_5, __pyx_bstride_0_dims)));
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":217
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":237
* self.dims[i] = dims[i]
* self.dds[i] = (self.right_edge[i] - self.left_edge[i])/dims[i]
* self.my_data = data # <<<<<<<<<<<<<<
@@ -12030,7 +12323,7 @@
__Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->my_data);
((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->my_data = ((PyObject *)__pyx_v_data);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":218
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":238
* self.dds[i] = (self.right_edge[i] - self.left_edge[i])/dims[i]
* self.my_data = data
* self.data = <np.float64_t*> data.data # <<<<<<<<<<<<<<
@@ -12062,7 +12355,7 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":222
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":242
* @cython.boundscheck(False)
* @cython.wraparound(False)
* def cast_plane(self, TransferFunctionProxy tf, VectorPlane vp): # <<<<<<<<<<<<<<
@@ -12106,11 +12399,11 @@
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_vp);
if (likely(values[1])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("cast_plane", 1, 2, 2, 1); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("cast_plane", 1, 2, 2, 1); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "cast_plane") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "cast_plane") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
__pyx_v_tf = ((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)values[0]);
__pyx_v_vp = ((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)values[1]);
@@ -12122,15 +12415,15 @@
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("cast_plane", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("cast_plane", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.PartitionedGrid.cast_plane");
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tf), __pyx_ptype_2yt_9amr_utils_TransferFunctionProxy, 1, "tf", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vp), __pyx_ptype_2yt_9amr_utils_VectorPlane, 1, "vp", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tf), __pyx_ptype_2yt_9amr_utils_TransferFunctionProxy, 1, "tf", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vp), __pyx_ptype_2yt_9amr_utils_VectorPlane, 1, "vp", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":227
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":247
* # like http://courses.csusm.edu/cs697exz/ray_box.htm
* cdef int vi, vj, hit, i, ni, nj, nn
* self.ns = 5 #* (1 + <int> log2(self.dds[0] / self.min_dds)) # <<<<<<<<<<<<<<
@@ -12139,7 +12432,7 @@
*/
((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->ns = 5;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":230
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":250
* cdef int iter[4]
* cdef np.float64_t v_pos[3], v_dir[3], rgba[4], extrema[4]
* self.calculate_extent(vp, extrema) # <<<<<<<<<<<<<<
@@ -12148,7 +12441,7 @@
*/
((struct __pyx_vtabstruct_2yt_9amr_utils_PartitionedGrid *)((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->__pyx_vtab)->calculate_extent(((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self), __pyx_v_vp, __pyx_v_extrema);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":231
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":251
* cdef np.float64_t v_pos[3], v_dir[3], rgba[4], extrema[4]
* self.calculate_extent(vp, extrema)
* vp.get_start_stop(extrema, iter) # <<<<<<<<<<<<<<
@@ -12157,7 +12450,7 @@
*/
((struct __pyx_vtabstruct_2yt_9amr_utils_VectorPlane *)__pyx_v_vp->__pyx_vtab)->get_start_stop(__pyx_v_vp, __pyx_v_extrema, __pyx_v_iter);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":232
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":252
* self.calculate_extent(vp, extrema)
* vp.get_start_stop(extrema, iter)
* for i in range(4): iter[i] = iclip(iter[i], 0, vp.nv) # <<<<<<<<<<<<<<
@@ -12169,7 +12462,7 @@
(__pyx_v_iter[__pyx_v_i]) = __pyx_f_2yt_9amr_utils_iclip((__pyx_v_iter[__pyx_v_i]), 0, __pyx_v_vp->nv);
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":233
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":253
* vp.get_start_stop(extrema, iter)
* for i in range(4): iter[i] = iclip(iter[i], 0, vp.nv)
* hit = 0 # <<<<<<<<<<<<<<
@@ -12178,7 +12471,7 @@
*/
__pyx_v_hit = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":234
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":254
* for i in range(4): iter[i] = iclip(iter[i], 0, vp.nv)
* hit = 0
* for vj in range(iter[0], iter[1]): # <<<<<<<<<<<<<<
@@ -12188,7 +12481,7 @@
for (__pyx_t_1 = (__pyx_v_iter[0]); __pyx_t_1 < (__pyx_v_iter[1]); __pyx_t_1+=1) {
__pyx_v_vj = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":235
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":255
* hit = 0
* for vj in range(iter[0], iter[1]):
* for vi in range(iter[2], iter[3]): # <<<<<<<<<<<<<<
@@ -12198,7 +12491,7 @@
for (__pyx_t_2 = (__pyx_v_iter[2]); __pyx_t_2 < (__pyx_v_iter[3]); __pyx_t_2+=1) {
__pyx_v_vi = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":236
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":256
* for vj in range(iter[0], iter[1]):
* for vi in range(iter[2], iter[3]):
* vp.copy_into(vp.vp_pos, v_pos, vi, vj, 3) # <<<<<<<<<<<<<<
@@ -12207,7 +12500,7 @@
*/
((struct __pyx_vtabstruct_2yt_9amr_utils_VectorPlane *)__pyx_v_vp->__pyx_vtab)->copy_into(__pyx_v_vp, __pyx_v_vp->vp_pos, __pyx_v_v_pos, __pyx_v_vi, __pyx_v_vj, 3);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":237
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":257
* for vi in range(iter[2], iter[3]):
* vp.copy_into(vp.vp_pos, v_pos, vi, vj, 3)
* vp.copy_into(vp.image, rgba, vi, vj, 4) # <<<<<<<<<<<<<<
@@ -12216,7 +12509,7 @@
*/
((struct __pyx_vtabstruct_2yt_9amr_utils_VectorPlane *)__pyx_v_vp->__pyx_vtab)->copy_into(__pyx_v_vp, __pyx_v_vp->image, __pyx_v_rgba, __pyx_v_vi, __pyx_v_vj, 4);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":238
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":258
* vp.copy_into(vp.vp_pos, v_pos, vi, vj, 3)
* vp.copy_into(vp.image, rgba, vi, vj, 4)
* self.integrate_ray(v_pos, vp.vp_dir, rgba, tf) # <<<<<<<<<<<<<<
@@ -12225,7 +12518,7 @@
*/
((struct __pyx_vtabstruct_2yt_9amr_utils_PartitionedGrid *)((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->__pyx_vtab)->integrate_ray(((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self), __pyx_v_v_pos, __pyx_v_vp->vp_dir, __pyx_v_rgba, __pyx_v_tf);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":239
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":259
* vp.copy_into(vp.image, rgba, vi, vj, 4)
* self.integrate_ray(v_pos, vp.vp_dir, rgba, tf)
* vp.copy_back(rgba, vp.image, vi, vj, 4) # <<<<<<<<<<<<<<
@@ -12236,7 +12529,7 @@
}
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":240
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":260
* self.integrate_ray(v_pos, vp.vp_dir, rgba, tf)
* vp.copy_back(rgba, vp.image, vi, vj, 4)
* return hit # <<<<<<<<<<<<<<
@@ -12244,7 +12537,7 @@
* @cython.boundscheck(False)
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_3 = PyInt_FromLong(__pyx_v_hit); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(__pyx_v_hit); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
@@ -12262,7 +12555,7 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":244
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":264
* @cython.boundscheck(False)
* @cython.wraparound(False)
* cdef void calculate_extent(self, VectorPlane vp, # <<<<<<<<<<<<<<
@@ -12283,7 +12576,7 @@
int __pyx_t_5;
__Pyx_SetupRefcountContext("calculate_extent");
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":248
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":268
* # We do this for all eight corners
* cdef np.float64_t *edges[2], temp
* edges[0] = self.left_edge # <<<<<<<<<<<<<<
@@ -12292,7 +12585,7 @@
*/
(__pyx_v_edges[0]) = __pyx_v_self->left_edge;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":249
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":269
* cdef np.float64_t *edges[2], temp
* edges[0] = self.left_edge
* edges[1] = self.right_edge # <<<<<<<<<<<<<<
@@ -12301,7 +12594,7 @@
*/
(__pyx_v_edges[1]) = __pyx_v_self->right_edge;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":250
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":270
* edges[0] = self.left_edge
* edges[1] = self.right_edge
* extrema[0] = extrema[2] = 1e300; extrema[1] = extrema[3] = -1e300 # <<<<<<<<<<<<<<
@@ -12314,7 +12607,7 @@
(__pyx_v_extrema[1]) = __pyx_t_1;
(__pyx_v_extrema[3]) = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":252
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":272
* extrema[0] = extrema[2] = 1e300; extrema[1] = extrema[3] = -1e300
* cdef int i, j, k
* for i in range(2): # <<<<<<<<<<<<<<
@@ -12324,7 +12617,7 @@
for (__pyx_t_2 = 0; __pyx_t_2 < 2; __pyx_t_2+=1) {
__pyx_v_i = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":253
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":273
* cdef int i, j, k
* for i in range(2):
* for j in range(2): # <<<<<<<<<<<<<<
@@ -12334,7 +12627,7 @@
for (__pyx_t_3 = 0; __pyx_t_3 < 2; __pyx_t_3+=1) {
__pyx_v_j = __pyx_t_3;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":254
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":274
* for i in range(2):
* for j in range(2):
* for k in range(2): # <<<<<<<<<<<<<<
@@ -12344,7 +12637,7 @@
for (__pyx_t_4 = 0; __pyx_t_4 < 2; __pyx_t_4+=1) {
__pyx_v_k = __pyx_t_4;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":256
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":276
* for k in range(2):
* # This should rotate it into the vector plane
* temp = edges[i][0] * vp.x_vec[0] # <<<<<<<<<<<<<<
@@ -12353,7 +12646,7 @@
*/
__pyx_v_temp = (((__pyx_v_edges[__pyx_v_i])[0]) * (__pyx_v_vp->x_vec[0]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":257
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":277
* # This should rotate it into the vector plane
* temp = edges[i][0] * vp.x_vec[0]
* temp += edges[j][1] * vp.x_vec[1] # <<<<<<<<<<<<<<
@@ -12362,7 +12655,7 @@
*/
__pyx_v_temp += (((__pyx_v_edges[__pyx_v_j])[1]) * (__pyx_v_vp->x_vec[1]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":258
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":278
* temp = edges[i][0] * vp.x_vec[0]
* temp += edges[j][1] * vp.x_vec[1]
* temp += edges[k][2] * vp.x_vec[2] # <<<<<<<<<<<<<<
@@ -12371,7 +12664,7 @@
*/
__pyx_v_temp += (((__pyx_v_edges[__pyx_v_k])[2]) * (__pyx_v_vp->x_vec[2]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":259
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":279
* temp += edges[j][1] * vp.x_vec[1]
* temp += edges[k][2] * vp.x_vec[2]
* if temp < extrema[0]: extrema[0] = temp # <<<<<<<<<<<<<<
@@ -12385,7 +12678,7 @@
}
__pyx_L9:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":260
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":280
* temp += edges[k][2] * vp.x_vec[2]
* if temp < extrema[0]: extrema[0] = temp
* if temp > extrema[1]: extrema[1] = temp # <<<<<<<<<<<<<<
@@ -12399,7 +12692,7 @@
}
__pyx_L10:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":261
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":281
* if temp < extrema[0]: extrema[0] = temp
* if temp > extrema[1]: extrema[1] = temp
* temp = edges[i][0] * vp.y_vec[0] # <<<<<<<<<<<<<<
@@ -12408,7 +12701,7 @@
*/
__pyx_v_temp = (((__pyx_v_edges[__pyx_v_i])[0]) * (__pyx_v_vp->y_vec[0]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":262
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":282
* if temp > extrema[1]: extrema[1] = temp
* temp = edges[i][0] * vp.y_vec[0]
* temp += edges[j][1] * vp.y_vec[1] # <<<<<<<<<<<<<<
@@ -12417,7 +12710,7 @@
*/
__pyx_v_temp += (((__pyx_v_edges[__pyx_v_j])[1]) * (__pyx_v_vp->y_vec[1]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":263
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":283
* temp = edges[i][0] * vp.y_vec[0]
* temp += edges[j][1] * vp.y_vec[1]
* temp += edges[k][2] * vp.y_vec[2] # <<<<<<<<<<<<<<
@@ -12426,7 +12719,7 @@
*/
__pyx_v_temp += (((__pyx_v_edges[__pyx_v_k])[2]) * (__pyx_v_vp->y_vec[2]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":264
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":284
* temp += edges[j][1] * vp.y_vec[1]
* temp += edges[k][2] * vp.y_vec[2]
* if temp < extrema[2]: extrema[2] = temp # <<<<<<<<<<<<<<
@@ -12440,7 +12733,7 @@
}
__pyx_L11:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":265
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":285
* temp += edges[k][2] * vp.y_vec[2]
* if temp < extrema[2]: extrema[2] = temp
* if temp > extrema[3]: extrema[3] = temp # <<<<<<<<<<<<<<
@@ -12460,7 +12753,7 @@
__Pyx_FinishRefcountContext();
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":270
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":290
* @cython.boundscheck(False)
* @cython.wraparound(False)
* cdef int integrate_ray(self, np.float64_t v_pos[3], # <<<<<<<<<<<<<<
@@ -12494,7 +12787,7 @@
int __pyx_t_5;
__Pyx_SetupRefcountContext("integrate_ray");
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":275
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":295
* TransferFunctionProxy tf):
* cdef int cur_ind[3], step[3], x, y, i, n, flat_ind, hit, direction
* cdef np.float64_t intersect_t = 1.0 # <<<<<<<<<<<<<<
@@ -12503,7 +12796,7 @@
*/
__pyx_v_intersect_t = 1.0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":279
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":299
* cdef np.float64_t enter_t, dist, alpha, dt
* cdef np.float64_t tr, tl, temp_x, temp_y, dv
* for i in range(3): # <<<<<<<<<<<<<<
@@ -12513,7 +12806,7 @@
for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
__pyx_v_i = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":280
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":300
* cdef np.float64_t tr, tl, temp_x, temp_y, dv
* for i in range(3):
* if (v_dir[i] < 0): # <<<<<<<<<<<<<<
@@ -12523,7 +12816,7 @@
__pyx_t_2 = ((__pyx_v_v_dir[__pyx_v_i]) < 0);
if (__pyx_t_2) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":281
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":301
* for i in range(3):
* if (v_dir[i] < 0):
* step[i] = -1 # <<<<<<<<<<<<<<
@@ -12535,7 +12828,7 @@
}
/*else*/ {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":283
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":303
* step[i] = -1
* else:
* step[i] = 1 # <<<<<<<<<<<<<<
@@ -12546,7 +12839,7 @@
}
__pyx_L5:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":284
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":304
* else:
* step[i] = 1
* x = (i+1) % 3 # <<<<<<<<<<<<<<
@@ -12555,7 +12848,7 @@
*/
__pyx_v_x = ((__pyx_v_i + 1) % 3);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":285
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":305
* step[i] = 1
* x = (i+1) % 3
* y = (i+2) % 3 # <<<<<<<<<<<<<<
@@ -12564,7 +12857,7 @@
*/
__pyx_v_y = ((__pyx_v_i + 2) % 3);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":286
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":306
* x = (i+1) % 3
* y = (i+2) % 3
* tl = (self.left_edge[i] - v_pos[i])/v_dir[i] # <<<<<<<<<<<<<<
@@ -12573,7 +12866,7 @@
*/
__pyx_v_tl = (((__pyx_v_self->left_edge[__pyx_v_i]) - (__pyx_v_v_pos[__pyx_v_i])) / (__pyx_v_v_dir[__pyx_v_i]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":287
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":307
* y = (i+2) % 3
* tl = (self.left_edge[i] - v_pos[i])/v_dir[i]
* tr = (self.right_edge[i] - v_pos[i])/v_dir[i] # <<<<<<<<<<<<<<
@@ -12582,7 +12875,7 @@
*/
__pyx_v_tr = (((__pyx_v_self->right_edge[__pyx_v_i]) - (__pyx_v_v_pos[__pyx_v_i])) / (__pyx_v_v_dir[__pyx_v_i]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":288
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":308
* tl = (self.left_edge[i] - v_pos[i])/v_dir[i]
* tr = (self.right_edge[i] - v_pos[i])/v_dir[i]
* temp_x = (v_pos[x] + tl*v_dir[x]) # <<<<<<<<<<<<<<
@@ -12591,7 +12884,7 @@
*/
__pyx_v_temp_x = ((__pyx_v_v_pos[__pyx_v_x]) + (__pyx_v_tl * (__pyx_v_v_dir[__pyx_v_x])));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":289
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":309
* tr = (self.right_edge[i] - v_pos[i])/v_dir[i]
* temp_x = (v_pos[x] + tl*v_dir[x])
* temp_y = (v_pos[y] + tl*v_dir[y]) # <<<<<<<<<<<<<<
@@ -12600,7 +12893,7 @@
*/
__pyx_v_temp_y = ((__pyx_v_v_pos[__pyx_v_y]) + (__pyx_v_tl * (__pyx_v_v_dir[__pyx_v_y])));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":290
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":310
* temp_x = (v_pos[x] + tl*v_dir[x])
* temp_y = (v_pos[y] + tl*v_dir[y])
* if self.left_edge[x] <= temp_x and temp_x <= self.right_edge[x] and \ # <<<<<<<<<<<<<<
@@ -12610,7 +12903,7 @@
if (((__pyx_v_self->left_edge[__pyx_v_x]) <= __pyx_v_temp_x)) {
if ((__pyx_v_temp_x <= (__pyx_v_self->right_edge[__pyx_v_x]))) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":291
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":311
* temp_y = (v_pos[y] + tl*v_dir[y])
* if self.left_edge[x] <= temp_x and temp_x <= self.right_edge[x] and \
* self.left_edge[y] <= temp_y and temp_y <= self.right_edge[y] and \ # <<<<<<<<<<<<<<
@@ -12620,7 +12913,7 @@
if (((__pyx_v_self->left_edge[__pyx_v_y]) <= __pyx_v_temp_y)) {
if ((__pyx_v_temp_y <= (__pyx_v_self->right_edge[__pyx_v_y]))) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":292
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":312
* if self.left_edge[x] <= temp_x and temp_x <= self.right_edge[x] and \
* self.left_edge[y] <= temp_y and temp_y <= self.right_edge[y] and \
* 0.0 <= tl and tl < intersect_t: # <<<<<<<<<<<<<<
@@ -12650,7 +12943,7 @@
}
if (__pyx_t_2) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":293
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":313
* self.left_edge[y] <= temp_y and temp_y <= self.right_edge[y] and \
* 0.0 <= tl and tl < intersect_t:
* direction = i # <<<<<<<<<<<<<<
@@ -12659,7 +12952,7 @@
*/
__pyx_v_direction = __pyx_v_i;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":294
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":314
* 0.0 <= tl and tl < intersect_t:
* direction = i
* intersect_t = tl # <<<<<<<<<<<<<<
@@ -12671,7 +12964,7 @@
}
__pyx_L6:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":295
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":315
* direction = i
* intersect_t = tl
* temp_x = (v_pos[x] + tr*v_dir[x]) # <<<<<<<<<<<<<<
@@ -12680,7 +12973,7 @@
*/
__pyx_v_temp_x = ((__pyx_v_v_pos[__pyx_v_x]) + (__pyx_v_tr * (__pyx_v_v_dir[__pyx_v_x])));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":296
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":316
* intersect_t = tl
* temp_x = (v_pos[x] + tr*v_dir[x])
* temp_y = (v_pos[y] + tr*v_dir[y]) # <<<<<<<<<<<<<<
@@ -12689,7 +12982,7 @@
*/
__pyx_v_temp_y = ((__pyx_v_v_pos[__pyx_v_y]) + (__pyx_v_tr * (__pyx_v_v_dir[__pyx_v_y])));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":297
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":317
* temp_x = (v_pos[x] + tr*v_dir[x])
* temp_y = (v_pos[y] + tr*v_dir[y])
* if self.left_edge[x] <= temp_x and temp_x <= self.right_edge[x] and \ # <<<<<<<<<<<<<<
@@ -12699,7 +12992,7 @@
if (((__pyx_v_self->left_edge[__pyx_v_x]) <= __pyx_v_temp_x)) {
if ((__pyx_v_temp_x <= (__pyx_v_self->right_edge[__pyx_v_x]))) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":298
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":318
* temp_y = (v_pos[y] + tr*v_dir[y])
* if self.left_edge[x] <= temp_x and temp_x <= self.right_edge[x] and \
* self.left_edge[y] <= temp_y and temp_y <= self.right_edge[y] and \ # <<<<<<<<<<<<<<
@@ -12709,7 +13002,7 @@
if (((__pyx_v_self->left_edge[__pyx_v_y]) <= __pyx_v_temp_y)) {
if ((__pyx_v_temp_y <= (__pyx_v_self->right_edge[__pyx_v_y]))) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":299
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":319
* if self.left_edge[x] <= temp_x and temp_x <= self.right_edge[x] and \
* self.left_edge[y] <= temp_y and temp_y <= self.right_edge[y] and \
* 0.0 <= tr and tr < intersect_t: # <<<<<<<<<<<<<<
@@ -12739,7 +13032,7 @@
}
if (__pyx_t_2) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":300
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":320
* self.left_edge[y] <= temp_y and temp_y <= self.right_edge[y] and \
* 0.0 <= tr and tr < intersect_t:
* direction = i # <<<<<<<<<<<<<<
@@ -12748,7 +13041,7 @@
*/
__pyx_v_direction = __pyx_v_i;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":301
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":321
* 0.0 <= tr and tr < intersect_t:
* direction = i
* intersect_t = tr # <<<<<<<<<<<<<<
@@ -12761,7 +13054,7 @@
__pyx_L7:;
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":302
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":322
* direction = i
* intersect_t = tr
* if self.left_edge[0] <= v_pos[0] and v_pos[0] <= self.right_edge[0] and \ # <<<<<<<<<<<<<<
@@ -12771,7 +13064,7 @@
if (((__pyx_v_self->left_edge[0]) <= (__pyx_v_v_pos[0]))) {
if (((__pyx_v_v_pos[0]) <= (__pyx_v_self->right_edge[0]))) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":303
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":323
* intersect_t = tr
* if self.left_edge[0] <= v_pos[0] and v_pos[0] <= self.right_edge[0] and \
* self.left_edge[1] <= v_pos[1] and v_pos[1] <= self.right_edge[1] and \ # <<<<<<<<<<<<<<
@@ -12781,7 +13074,7 @@
if (((__pyx_v_self->left_edge[1]) <= (__pyx_v_v_pos[1]))) {
if (((__pyx_v_v_pos[1]) <= (__pyx_v_self->right_edge[1]))) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":304
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":324
* if self.left_edge[0] <= v_pos[0] and v_pos[0] <= self.right_edge[0] and \
* self.left_edge[1] <= v_pos[1] and v_pos[1] <= self.right_edge[1] and \
* self.left_edge[2] <= v_pos[2] and v_pos[2] <= self.right_edge[2]: # <<<<<<<<<<<<<<
@@ -12811,7 +13104,7 @@
}
if (__pyx_t_2) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":305
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":325
* self.left_edge[1] <= v_pos[1] and v_pos[1] <= self.right_edge[1] and \
* self.left_edge[2] <= v_pos[2] and v_pos[2] <= self.right_edge[2]:
* intersect_t = 0.0 # <<<<<<<<<<<<<<
@@ -12823,7 +13116,7 @@
}
__pyx_L8:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":306
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":326
* self.left_edge[2] <= v_pos[2] and v_pos[2] <= self.right_edge[2]:
* intersect_t = 0.0
* if not ((0.0 <= intersect_t) and (intersect_t < 1.0)): return 0 # <<<<<<<<<<<<<<
@@ -12843,7 +13136,7 @@
}
__pyx_L9:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":307
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":327
* intersect_t = 0.0
* if not ((0.0 <= intersect_t) and (intersect_t < 1.0)): return 0
* for i in range(3): # <<<<<<<<<<<<<<
@@ -12853,7 +13146,7 @@
for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
__pyx_v_i = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":308
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":328
* if not ((0.0 <= intersect_t) and (intersect_t < 1.0)): return 0
* for i in range(3):
* intersect[i] = v_pos[i] + intersect_t * v_dir[i] # <<<<<<<<<<<<<<
@@ -12862,7 +13155,7 @@
*/
(__pyx_v_intersect[__pyx_v_i]) = ((__pyx_v_v_pos[__pyx_v_i]) + (__pyx_v_intersect_t * (__pyx_v_v_dir[__pyx_v_i])));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":309
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":329
* for i in range(3):
* intersect[i] = v_pos[i] + intersect_t * v_dir[i]
* cur_ind[i] = <int> floor((intersect[i] + # <<<<<<<<<<<<<<
@@ -12871,7 +13164,7 @@
*/
(__pyx_v_cur_ind[__pyx_v_i]) = ((int)floor(((((__pyx_v_intersect[__pyx_v_i]) + (((__pyx_v_step[__pyx_v_i]) * 1e-08) * (__pyx_v_self->dds[__pyx_v_i]))) - (__pyx_v_self->left_edge[__pyx_v_i])) / (__pyx_v_self->dds[__pyx_v_i]))));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":312
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":332
* step[i]*1e-8*self.dds[i] -
* self.left_edge[i])/self.dds[i])
* tmax[i] = (((cur_ind[i]+step[i])*self.dds[i])+ # <<<<<<<<<<<<<<
@@ -12880,7 +13173,7 @@
*/
(__pyx_v_tmax[__pyx_v_i]) = ((((((__pyx_v_cur_ind[__pyx_v_i]) + (__pyx_v_step[__pyx_v_i])) * (__pyx_v_self->dds[__pyx_v_i])) + (__pyx_v_self->left_edge[__pyx_v_i])) - (__pyx_v_v_pos[__pyx_v_i])) / (__pyx_v_v_dir[__pyx_v_i]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":314
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":334
* tmax[i] = (((cur_ind[i]+step[i])*self.dds[i])+
* self.left_edge[i]-v_pos[i])/v_dir[i]
* if cur_ind[i] == self.dims[i] and step[i] < 0: # <<<<<<<<<<<<<<
@@ -12894,7 +13187,7 @@
}
if (__pyx_t_3) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":315
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":335
* self.left_edge[i]-v_pos[i])/v_dir[i]
* if cur_ind[i] == self.dims[i] and step[i] < 0:
* cur_ind[i] = self.dims[i] - 1 # <<<<<<<<<<<<<<
@@ -12906,7 +13199,7 @@
}
__pyx_L12:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":316
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":336
* if cur_ind[i] == self.dims[i] and step[i] < 0:
* cur_ind[i] = self.dims[i] - 1
* if cur_ind[i] < 0 or cur_ind[i] >= self.dims[i]: return 0 # <<<<<<<<<<<<<<
@@ -12925,7 +13218,7 @@
}
__pyx_L13:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":317
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":337
* cur_ind[i] = self.dims[i] - 1
* if cur_ind[i] < 0 or cur_ind[i] >= self.dims[i]: return 0
* if step[i] > 0: # <<<<<<<<<<<<<<
@@ -12935,7 +13228,7 @@
__pyx_t_3 = ((__pyx_v_step[__pyx_v_i]) > 0);
if (__pyx_t_3) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":318
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":338
* if cur_ind[i] < 0 or cur_ind[i] >= self.dims[i]: return 0
* if step[i] > 0:
* tmax[i] = (((cur_ind[i]+1)*self.dds[i]) # <<<<<<<<<<<<<<
@@ -12947,7 +13240,7 @@
}
__pyx_L14:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":320
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":340
* tmax[i] = (((cur_ind[i]+1)*self.dds[i])
* +self.left_edge[i]-v_pos[i])/v_dir[i]
* if step[i] < 0: # <<<<<<<<<<<<<<
@@ -12957,7 +13250,7 @@
__pyx_t_3 = ((__pyx_v_step[__pyx_v_i]) < 0);
if (__pyx_t_3) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":321
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":341
* +self.left_edge[i]-v_pos[i])/v_dir[i]
* if step[i] < 0:
* tmax[i] = (((cur_ind[i]+0)*self.dds[i]) # <<<<<<<<<<<<<<
@@ -12969,7 +13262,7 @@
}
__pyx_L15:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":323
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":343
* tmax[i] = (((cur_ind[i]+0)*self.dds[i])
* +self.left_edge[i]-v_pos[i])/v_dir[i]
* tdelta[i] = (self.dds[i]/v_dir[i]) # <<<<<<<<<<<<<<
@@ -12978,7 +13271,7 @@
*/
(__pyx_v_tdelta[__pyx_v_i]) = ((__pyx_v_self->dds[__pyx_v_i]) / (__pyx_v_v_dir[__pyx_v_i]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":324
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":344
* +self.left_edge[i]-v_pos[i])/v_dir[i]
* tdelta[i] = (self.dds[i]/v_dir[i])
* if tdelta[i] < 0: tdelta[i] *= -1 # <<<<<<<<<<<<<<
@@ -12993,7 +13286,7 @@
__pyx_L16:;
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":326
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":346
* if tdelta[i] < 0: tdelta[i] *= -1
* # We have to jumpstart our calculation
* enter_t = intersect_t # <<<<<<<<<<<<<<
@@ -13002,7 +13295,7 @@
*/
__pyx_v_enter_t = __pyx_v_intersect_t;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":327
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":347
* # We have to jumpstart our calculation
* enter_t = intersect_t
* while 1: # <<<<<<<<<<<<<<
@@ -13013,7 +13306,7 @@
__pyx_t_3 = 1;
if (!__pyx_t_3) break;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":330
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":350
* # dims here is one less than the dimensions of the data,
* # but we are tracing on the grid, not on the data...
* if (not (0 <= cur_ind[0] < self.dims[0])) or \ # <<<<<<<<<<<<<<
@@ -13027,7 +13320,7 @@
}
if (!(!__pyx_t_3)) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":331
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":351
* # but we are tracing on the grid, not on the data...
* if (not (0 <= cur_ind[0] < self.dims[0])) or \
* (not (0 <= cur_ind[1] < self.dims[1])) or \ # <<<<<<<<<<<<<<
@@ -13041,7 +13334,7 @@
}
if (!(!__pyx_t_2)) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":332
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":352
* if (not (0 <= cur_ind[0] < self.dims[0])) or \
* (not (0 <= cur_ind[1] < self.dims[1])) or \
* (not (0 <= cur_ind[2] < self.dims[2])): # <<<<<<<<<<<<<<
@@ -13063,7 +13356,7 @@
}
if (__pyx_t_2) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":333
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":353
* (not (0 <= cur_ind[1] < self.dims[1])) or \
* (not (0 <= cur_ind[2] < self.dims[2])):
* break # <<<<<<<<<<<<<<
@@ -13075,7 +13368,7 @@
}
__pyx_L19:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":334
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":354
* (not (0 <= cur_ind[2] < self.dims[2])):
* break
* hit += 1 # <<<<<<<<<<<<<<
@@ -13084,7 +13377,7 @@
*/
__pyx_v_hit += 1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":335
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":355
* break
* hit += 1
* if tmax[0] < tmax[1]: # <<<<<<<<<<<<<<
@@ -13094,7 +13387,7 @@
__pyx_t_2 = ((__pyx_v_tmax[0]) < (__pyx_v_tmax[1]));
if (__pyx_t_2) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":336
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":356
* hit += 1
* if tmax[0] < tmax[1]:
* if tmax[0] < tmax[2]: # <<<<<<<<<<<<<<
@@ -13104,7 +13397,7 @@
__pyx_t_2 = ((__pyx_v_tmax[0]) < (__pyx_v_tmax[2]));
if (__pyx_t_2) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":338
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":358
* if tmax[0] < tmax[2]:
* self.sample_values(v_pos, v_dir, enter_t, tmax[0], cur_ind,
* rgba, tf) # <<<<<<<<<<<<<<
@@ -13113,7 +13406,7 @@
*/
((struct __pyx_vtabstruct_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self->__pyx_vtab)->sample_values(__pyx_v_self, __pyx_v_v_pos, __pyx_v_v_dir, __pyx_v_enter_t, (__pyx_v_tmax[0]), __pyx_v_cur_ind, __pyx_v_rgba, __pyx_v_tf);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":339
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":359
* self.sample_values(v_pos, v_dir, enter_t, tmax[0], cur_ind,
* rgba, tf)
* cur_ind[0] += step[0] # <<<<<<<<<<<<<<
@@ -13122,7 +13415,7 @@
*/
(__pyx_v_cur_ind[0]) += (__pyx_v_step[0]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":340
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":360
* rgba, tf)
* cur_ind[0] += step[0]
* dt = fmin(tmax[0], 1.0) - enter_t # <<<<<<<<<<<<<<
@@ -13131,7 +13424,7 @@
*/
__pyx_v_dt = (__pyx_f_2yt_9amr_utils_fmin((__pyx_v_tmax[0]), 1.0) - __pyx_v_enter_t);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":341
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":361
* cur_ind[0] += step[0]
* dt = fmin(tmax[0], 1.0) - enter_t
* enter_t = tmax[0] # <<<<<<<<<<<<<<
@@ -13140,7 +13433,7 @@
*/
__pyx_v_enter_t = (__pyx_v_tmax[0]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":342
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":362
* dt = fmin(tmax[0], 1.0) - enter_t
* enter_t = tmax[0]
* tmax[0] += tdelta[0] # <<<<<<<<<<<<<<
@@ -13152,7 +13445,7 @@
}
/*else*/ {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":345
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":365
* else:
* self.sample_values(v_pos, v_dir, enter_t, tmax[2], cur_ind,
* rgba, tf) # <<<<<<<<<<<<<<
@@ -13161,7 +13454,7 @@
*/
((struct __pyx_vtabstruct_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self->__pyx_vtab)->sample_values(__pyx_v_self, __pyx_v_v_pos, __pyx_v_v_dir, __pyx_v_enter_t, (__pyx_v_tmax[2]), __pyx_v_cur_ind, __pyx_v_rgba, __pyx_v_tf);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":346
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":366
* self.sample_values(v_pos, v_dir, enter_t, tmax[2], cur_ind,
* rgba, tf)
* cur_ind[2] += step[2] # <<<<<<<<<<<<<<
@@ -13170,7 +13463,7 @@
*/
(__pyx_v_cur_ind[2]) += (__pyx_v_step[2]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":347
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":367
* rgba, tf)
* cur_ind[2] += step[2]
* dt = fmin(tmax[2], 1.0) - enter_t # <<<<<<<<<<<<<<
@@ -13179,7 +13472,7 @@
*/
__pyx_v_dt = (__pyx_f_2yt_9amr_utils_fmin((__pyx_v_tmax[2]), 1.0) - __pyx_v_enter_t);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":348
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":368
* cur_ind[2] += step[2]
* dt = fmin(tmax[2], 1.0) - enter_t
* enter_t = tmax[2] # <<<<<<<<<<<<<<
@@ -13188,7 +13481,7 @@
*/
__pyx_v_enter_t = (__pyx_v_tmax[2]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":349
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":369
* dt = fmin(tmax[2], 1.0) - enter_t
* enter_t = tmax[2]
* tmax[2] += tdelta[2] # <<<<<<<<<<<<<<
@@ -13202,7 +13495,7 @@
}
/*else*/ {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":351
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":371
* tmax[2] += tdelta[2]
* else:
* if tmax[1] < tmax[2]: # <<<<<<<<<<<<<<
@@ -13212,7 +13505,7 @@
__pyx_t_2 = ((__pyx_v_tmax[1]) < (__pyx_v_tmax[2]));
if (__pyx_t_2) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":353
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":373
* if tmax[1] < tmax[2]:
* self.sample_values(v_pos, v_dir, enter_t, tmax[1], cur_ind,
* rgba, tf) # <<<<<<<<<<<<<<
@@ -13221,7 +13514,7 @@
*/
((struct __pyx_vtabstruct_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self->__pyx_vtab)->sample_values(__pyx_v_self, __pyx_v_v_pos, __pyx_v_v_dir, __pyx_v_enter_t, (__pyx_v_tmax[1]), __pyx_v_cur_ind, __pyx_v_rgba, __pyx_v_tf);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":354
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":374
* self.sample_values(v_pos, v_dir, enter_t, tmax[1], cur_ind,
* rgba, tf)
* cur_ind[1] += step[1] # <<<<<<<<<<<<<<
@@ -13230,7 +13523,7 @@
*/
(__pyx_v_cur_ind[1]) += (__pyx_v_step[1]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":355
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":375
* rgba, tf)
* cur_ind[1] += step[1]
* dt = fmin(tmax[1], 1.0) - enter_t # <<<<<<<<<<<<<<
@@ -13239,7 +13532,7 @@
*/
__pyx_v_dt = (__pyx_f_2yt_9amr_utils_fmin((__pyx_v_tmax[1]), 1.0) - __pyx_v_enter_t);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":356
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":376
* cur_ind[1] += step[1]
* dt = fmin(tmax[1], 1.0) - enter_t
* enter_t = tmax[1] # <<<<<<<<<<<<<<
@@ -13248,7 +13541,7 @@
*/
__pyx_v_enter_t = (__pyx_v_tmax[1]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":357
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":377
* dt = fmin(tmax[1], 1.0) - enter_t
* enter_t = tmax[1]
* tmax[1] += tdelta[1] # <<<<<<<<<<<<<<
@@ -13260,7 +13553,7 @@
}
/*else*/ {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":360
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":380
* else:
* self.sample_values(v_pos, v_dir, enter_t, tmax[2], cur_ind,
* rgba, tf) # <<<<<<<<<<<<<<
@@ -13269,7 +13562,7 @@
*/
((struct __pyx_vtabstruct_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self->__pyx_vtab)->sample_values(__pyx_v_self, __pyx_v_v_pos, __pyx_v_v_dir, __pyx_v_enter_t, (__pyx_v_tmax[2]), __pyx_v_cur_ind, __pyx_v_rgba, __pyx_v_tf);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":361
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":381
* self.sample_values(v_pos, v_dir, enter_t, tmax[2], cur_ind,
* rgba, tf)
* cur_ind[2] += step[2] # <<<<<<<<<<<<<<
@@ -13278,7 +13571,7 @@
*/
(__pyx_v_cur_ind[2]) += (__pyx_v_step[2]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":362
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":382
* rgba, tf)
* cur_ind[2] += step[2]
* dt = fmin(tmax[2], 1.0) - enter_t # <<<<<<<<<<<<<<
@@ -13287,7 +13580,7 @@
*/
__pyx_v_dt = (__pyx_f_2yt_9amr_utils_fmin((__pyx_v_tmax[2]), 1.0) - __pyx_v_enter_t);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":363
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":383
* cur_ind[2] += step[2]
* dt = fmin(tmax[2], 1.0) - enter_t
* enter_t = tmax[2] # <<<<<<<<<<<<<<
@@ -13296,7 +13589,7 @@
*/
__pyx_v_enter_t = (__pyx_v_tmax[2]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":364
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":384
* dt = fmin(tmax[2], 1.0) - enter_t
* enter_t = tmax[2]
* tmax[2] += tdelta[2] # <<<<<<<<<<<<<<
@@ -13309,7 +13602,7 @@
}
__pyx_L20:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":365
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":385
* enter_t = tmax[2]
* tmax[2] += tdelta[2]
* if enter_t > 1.0: break # <<<<<<<<<<<<<<
@@ -13325,7 +13618,7 @@
}
__pyx_L18_break:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":366
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":386
* tmax[2] += tdelta[2]
* if enter_t > 1.0: break
* return hit # <<<<<<<<<<<<<<
@@ -13341,7 +13634,7 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":368
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":388
* return hit
*
* cdef void sample_values(self, # <<<<<<<<<<<<<<
@@ -13355,14 +13648,16 @@
__pyx_t_5numpy_float64_t __pyx_v_dt;
__pyx_t_5numpy_float64_t __pyx_v_t;
__pyx_t_5numpy_float64_t __pyx_v_dv;
+ __pyx_t_5numpy_float64_t __pyx_v_grad[3];
int __pyx_v_dti;
int __pyx_v_i;
int __pyx_t_1;
int __pyx_t_2;
+ int __pyx_t_3;
__Pyx_SetupRefcountContext("sample_values");
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":378
- * cdef np.float64_t cp[3], dp[3], temp, dt, t, dv
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":399
+ * cdef np.float64_t grad[3]
* cdef int dti, i
* dt = (exit_t - enter_t) / (self.ns-1) # five samples, so divide by four # <<<<<<<<<<<<<<
* for dti in range(self.ns - 1):
@@ -13370,7 +13665,7 @@
*/
__pyx_v_dt = ((__pyx_v_exit_t - __pyx_v_enter_t) / (__pyx_v_self->ns - 1));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":379
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":400
* cdef int dti, i
* dt = (exit_t - enter_t) / (self.ns-1) # five samples, so divide by four
* for dti in range(self.ns - 1): # <<<<<<<<<<<<<<
@@ -13380,7 +13675,7 @@
for (__pyx_t_1 = 0; __pyx_t_1 < (__pyx_v_self->ns - 1); __pyx_t_1+=1) {
__pyx_v_dti = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":380
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":401
* dt = (exit_t - enter_t) / (self.ns-1) # five samples, so divide by four
* for dti in range(self.ns - 1):
* t = enter_t + dt * dti # <<<<<<<<<<<<<<
@@ -13389,7 +13684,7 @@
*/
__pyx_v_t = (__pyx_v_enter_t + (__pyx_v_dt * __pyx_v_dti));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":381
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":402
* for dti in range(self.ns - 1):
* t = enter_t + dt * dti
* for i in range(3): # <<<<<<<<<<<<<<
@@ -13399,7 +13694,7 @@
for (__pyx_t_2 = 0; __pyx_t_2 < 3; __pyx_t_2+=1) {
__pyx_v_i = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":382
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":403
* t = enter_t + dt * dti
* for i in range(3):
* cp[i] = v_pos[i] + t * v_dir[i] # <<<<<<<<<<<<<<
@@ -13408,39 +13703,61 @@
*/
(__pyx_v_cp[__pyx_v_i]) = ((__pyx_v_v_pos[__pyx_v_i]) + (__pyx_v_t * (__pyx_v_v_dir[__pyx_v_i])));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":383
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":404
* for i in range(3):
* cp[i] = v_pos[i] + t * v_dir[i]
* dp[i] = fclip(fmod(cp[i], self.dds[i])/self.dds[i], 0, 1.0) # <<<<<<<<<<<<<<
* dv = trilinear_interpolate(self.dims, ci, dp, self.data)
- * tf.eval_transfer(dt, dv, rgba)
+ * if tf.use_light == 1:
*/
(__pyx_v_dp[__pyx_v_i]) = __pyx_f_2yt_9amr_utils_fclip((fmod((__pyx_v_cp[__pyx_v_i]), (__pyx_v_self->dds[__pyx_v_i])) / (__pyx_v_self->dds[__pyx_v_i])), 0, 1.0);
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":384
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":405
* cp[i] = v_pos[i] + t * v_dir[i]
* dp[i] = fclip(fmod(cp[i], self.dds[i])/self.dds[i], 0, 1.0)
* dv = trilinear_interpolate(self.dims, ci, dp, self.data) # <<<<<<<<<<<<<<
- * tf.eval_transfer(dt, dv, rgba)
- *
+ * if tf.use_light == 1:
+ * eval_gradient(self.dims, ci, dp, self.data, grad)
*/
__pyx_v_dv = trilinear_interpolate(__pyx_v_self->dims, __pyx_v_ci, __pyx_v_dp, __pyx_v_self->data);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":385
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":406
* dp[i] = fclip(fmod(cp[i], self.dds[i])/self.dds[i], 0, 1.0)
* dv = trilinear_interpolate(self.dims, ci, dp, self.data)
- * tf.eval_transfer(dt, dv, rgba) # <<<<<<<<<<<<<<
+ * if tf.use_light == 1: # <<<<<<<<<<<<<<
+ * eval_gradient(self.dims, ci, dp, self.data, grad)
+ * tf.eval_transfer(dt, dv, rgba, grad)
+ */
+ __pyx_t_3 = (__pyx_v_tf->use_light == 1);
+ if (__pyx_t_3) {
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":407
+ * dv = trilinear_interpolate(self.dims, ci, dp, self.data)
+ * if tf.use_light == 1:
+ * eval_gradient(self.dims, ci, dp, self.data, grad) # <<<<<<<<<<<<<<
+ * tf.eval_transfer(dt, dv, rgba, grad)
+ *
+ */
+ eval_gradient(__pyx_v_self->dims, __pyx_v_ci, __pyx_v_dp, __pyx_v_self->data, __pyx_v_grad);
+ goto __pyx_L7;
+ }
+ __pyx_L7:;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":408
+ * if tf.use_light == 1:
+ * eval_gradient(self.dims, ci, dp, self.data, grad)
+ * tf.eval_transfer(dt, dv, rgba, grad) # <<<<<<<<<<<<<<
*
* cdef class GridFace:
*/
- ((struct __pyx_vtabstruct_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_tf->__pyx_vtab)->eval_transfer(__pyx_v_tf, __pyx_v_dt, __pyx_v_dv, __pyx_v_rgba);
+ ((struct __pyx_vtabstruct_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_tf->__pyx_vtab)->eval_transfer(__pyx_v_tf, __pyx_v_dt, __pyx_v_dv, __pyx_v_rgba, __pyx_v_grad);
}
__Pyx_FinishRefcountContext();
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":395
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":418
* @cython.boundscheck(False)
* @cython.wraparound(False)
* def __init__(self, grid, int direction, int left): # <<<<<<<<<<<<<<
@@ -13481,37 +13798,37 @@
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_direction);
if (likely(values[1])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
values[2] = PyDict_GetItem(__pyx_kwds, __pyx_kp_left);
if (likely(values[2])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
__pyx_v_grid = values[0];
- __pyx_v_direction = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_direction == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- __pyx_v_left = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_left == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_direction = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_direction == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_left = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_left == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
goto __pyx_L5_argtuple_error;
} else {
__pyx_v_grid = PyTuple_GET_ITEM(__pyx_args, 0);
- __pyx_v_direction = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_direction == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- __pyx_v_left = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((__pyx_v_left == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_direction = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_direction == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_left = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((__pyx_v_left == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.GridFace.__init__");
return -1;
__pyx_L4_argument_unpacking_done:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":396
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":419
* @cython.wraparound(False)
* def __init__(self, grid, int direction, int left):
* self.direction = direction # <<<<<<<<<<<<<<
@@ -13520,7 +13837,7 @@
*/
((struct __pyx_obj_2yt_9amr_utils_GridFace *)__pyx_v_self)->direction = __pyx_v_direction;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":397
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":420
* def __init__(self, grid, int direction, int left):
* self.direction = direction
* if left == 1: # <<<<<<<<<<<<<<
@@ -13530,44 +13847,44 @@
__pyx_t_1 = (__pyx_v_left == 1);
if (__pyx_t_1) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":398
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":421
* self.direction = direction
* if left == 1:
* self.coord = grid.LeftEdge[direction] # <<<<<<<<<<<<<<
* else:
* self.coord = grid.RightEdge[direction]
*/
- __pyx_t_2 = PyObject_GetAttr(__pyx_v_grid, __pyx_kp_LeftEdge); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(__pyx_v_grid, __pyx_kp_LeftEdge); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_1 = __Pyx_GetItemInt(__pyx_t_2, __pyx_v_direction, sizeof(int), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_1 = __Pyx_GetItemInt(__pyx_t_2, __pyx_v_direction, sizeof(int), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
((struct __pyx_obj_2yt_9amr_utils_GridFace *)__pyx_v_self)->coord = __pyx_t_3;
goto __pyx_L6;
}
/*else*/ {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":400
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":423
* self.coord = grid.LeftEdge[direction]
* else:
* self.coord = grid.RightEdge[direction] # <<<<<<<<<<<<<<
* cdef int i
* for i in range(3):
*/
- __pyx_t_2 = PyObject_GetAttr(__pyx_v_grid, __pyx_kp_RightEdge); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(__pyx_v_grid, __pyx_kp_RightEdge); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_1 = __Pyx_GetItemInt(__pyx_t_2, __pyx_v_direction, sizeof(int), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_1 = __Pyx_GetItemInt(__pyx_t_2, __pyx_v_direction, sizeof(int), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
((struct __pyx_obj_2yt_9amr_utils_GridFace *)__pyx_v_self)->coord = __pyx_t_3;
}
__pyx_L6:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":402
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":425
* self.coord = grid.RightEdge[direction]
* cdef int i
* for i in range(3): # <<<<<<<<<<<<<<
@@ -13577,40 +13894,40 @@
for (__pyx_t_4 = 0; __pyx_t_4 < 3; __pyx_t_4+=1) {
__pyx_v_i = __pyx_t_4;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":403
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":426
* cdef int i
* for i in range(3):
* self.left_edge[i] = grid.LeftEdge[i] # <<<<<<<<<<<<<<
* self.right_edge[i] = grid.RightEdge[i]
* self.left_edge[direction] = self.right_edge[direction] = self.coord
*/
- __pyx_t_2 = PyObject_GetAttr(__pyx_v_grid, __pyx_kp_LeftEdge); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(__pyx_v_grid, __pyx_kp_LeftEdge); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_1 = __Pyx_GetItemInt(__pyx_t_2, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_1 = __Pyx_GetItemInt(__pyx_t_2, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
(((struct __pyx_obj_2yt_9amr_utils_GridFace *)__pyx_v_self)->left_edge[__pyx_v_i]) = __pyx_t_3;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":404
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":427
* for i in range(3):
* self.left_edge[i] = grid.LeftEdge[i]
* self.right_edge[i] = grid.RightEdge[i] # <<<<<<<<<<<<<<
* self.left_edge[direction] = self.right_edge[direction] = self.coord
*
*/
- __pyx_t_2 = PyObject_GetAttr(__pyx_v_grid, __pyx_kp_RightEdge); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(__pyx_v_grid, __pyx_kp_RightEdge); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_1 = __Pyx_GetItemInt(__pyx_t_2, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_1 = __Pyx_GetItemInt(__pyx_t_2, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
(((struct __pyx_obj_2yt_9amr_utils_GridFace *)__pyx_v_self)->right_edge[__pyx_v_i]) = __pyx_t_3;
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":405
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":428
* self.left_edge[i] = grid.LeftEdge[i]
* self.right_edge[i] = grid.RightEdge[i]
* self.left_edge[direction] = self.right_edge[direction] = self.coord # <<<<<<<<<<<<<<
@@ -13632,7 +13949,7 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":409
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":432
* @cython.boundscheck(False)
* @cython.wraparound(False)
* cdef int proj_overlap(self, np.float64_t *left_edge, np.float64_t *right_edge): # <<<<<<<<<<<<<<
@@ -13647,7 +13964,7 @@
int __pyx_t_1;
__Pyx_SetupRefcountContext("proj_overlap");
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":411
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":434
* cdef int proj_overlap(self, np.float64_t *left_edge, np.float64_t *right_edge):
* cdef int xax, yax
* xax = (self.direction + 1) % 3 # <<<<<<<<<<<<<<
@@ -13656,7 +13973,7 @@
*/
__pyx_v_xax = ((__pyx_v_self->direction + 1) % 3);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":412
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":435
* cdef int xax, yax
* xax = (self.direction + 1) % 3
* yax = (self.direction + 2) % 3 # <<<<<<<<<<<<<<
@@ -13665,7 +13982,7 @@
*/
__pyx_v_yax = ((__pyx_v_self->direction + 2) % 3);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":413
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":436
* xax = (self.direction + 1) % 3
* yax = (self.direction + 2) % 3
* if left_edge[xax] >= self.right_edge[xax]: return 0 # <<<<<<<<<<<<<<
@@ -13680,7 +13997,7 @@
}
__pyx_L3:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":414
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":437
* yax = (self.direction + 2) % 3
* if left_edge[xax] >= self.right_edge[xax]: return 0
* if right_edge[xax] <= self.left_edge[xax]: return 0 # <<<<<<<<<<<<<<
@@ -13695,7 +14012,7 @@
}
__pyx_L4:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":415
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":438
* if left_edge[xax] >= self.right_edge[xax]: return 0
* if right_edge[xax] <= self.left_edge[xax]: return 0
* if left_edge[yax] >= self.right_edge[yax]: return 0 # <<<<<<<<<<<<<<
@@ -13710,7 +14027,7 @@
}
__pyx_L5:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":416
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":439
* if right_edge[xax] <= self.left_edge[xax]: return 0
* if left_edge[yax] >= self.right_edge[yax]: return 0
* if right_edge[yax] <= self.left_edge[yax]: return 0 # <<<<<<<<<<<<<<
@@ -13725,7 +14042,7 @@
}
__pyx_L6:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":417
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":440
* if left_edge[yax] >= self.right_edge[yax]: return 0
* if right_edge[yax] <= self.left_edge[yax]: return 0
* return 1 # <<<<<<<<<<<<<<
@@ -13741,7 +14058,7 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":425
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":448
* cdef public object RightEdge
* cdef public object subgrid_faces
* def __cinit__(self, np.ndarray[np.float64_t, ndim=1] left_edge, # <<<<<<<<<<<<<<
@@ -13787,17 +14104,17 @@
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_right_edge);
if (likely(values[1])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
values[2] = PyDict_GetItem(__pyx_kwds, __pyx_kp_subgrid_faces);
if (likely(values[2])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__cinit__") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__cinit__") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
__pyx_v_left_edge = ((PyArrayObject *)values[0]);
__pyx_v_right_edge = ((PyArrayObject *)values[1]);
@@ -13811,29 +14128,29 @@
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.ProtoPrism.__cinit__");
return -1;
__pyx_L4_argument_unpacking_done:;
__pyx_bstruct_left_edge.buf = NULL;
__pyx_bstruct_right_edge.buf = NULL;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left_edge), __pyx_ptype_5numpy_ndarray, 1, "left_edge", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right_edge), __pyx_ptype_5numpy_ndarray, 1, "right_edge", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left_edge), __pyx_ptype_5numpy_ndarray, 1, "left_edge", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right_edge), __pyx_ptype_5numpy_ndarray, 1, "right_edge", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_left_edge, (PyObject*)__pyx_v_left_edge, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_left_edge, (PyObject*)__pyx_v_left_edge, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_bstride_0_left_edge = __pyx_bstruct_left_edge.strides[0];
__pyx_bshape_0_left_edge = __pyx_bstruct_left_edge.shape[0];
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_right_edge, (PyObject*)__pyx_v_right_edge, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_right_edge, (PyObject*)__pyx_v_right_edge, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_bstride_0_right_edge = __pyx_bstruct_right_edge.strides[0];
__pyx_bshape_0_right_edge = __pyx_bstruct_right_edge.shape[0];
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":429
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":452
* subgrid_faces):
* cdef int i
* self.LeftEdge = left_edge # <<<<<<<<<<<<<<
@@ -13846,7 +14163,7 @@
__Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->LeftEdge);
((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->LeftEdge = ((PyObject *)__pyx_v_left_edge);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":430
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":453
* cdef int i
* self.LeftEdge = left_edge
* self.RightEdge = right_edge # <<<<<<<<<<<<<<
@@ -13859,7 +14176,7 @@
__Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->RightEdge);
((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->RightEdge = ((PyObject *)__pyx_v_right_edge);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":431
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":454
* self.LeftEdge = left_edge
* self.RightEdge = right_edge
* for i in range(3): # <<<<<<<<<<<<<<
@@ -13869,7 +14186,7 @@
for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
__pyx_v_i = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":432
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":455
* self.RightEdge = right_edge
* for i in range(3):
* self.left_edge[i] = left_edge[i] # <<<<<<<<<<<<<<
@@ -13884,11 +14201,11 @@
} else if (unlikely(__pyx_t_2 >= __pyx_bshape_0_left_edge)) __pyx_t_3 = 0;
if (unlikely(__pyx_t_3 != -1)) {
__Pyx_RaiseBufferIndexError(__pyx_t_3);
- {__pyx_filename = __pyx_f[3]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[3]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
(((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->left_edge[__pyx_v_i]) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_2, __pyx_bstride_0_left_edge));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":433
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":456
* for i in range(3):
* self.left_edge[i] = left_edge[i]
* self.right_edge[i] = right_edge[i] # <<<<<<<<<<<<<<
@@ -13903,12 +14220,12 @@
} else if (unlikely(__pyx_t_3 >= __pyx_bshape_0_right_edge)) __pyx_t_4 = 0;
if (unlikely(__pyx_t_4 != -1)) {
__Pyx_RaiseBufferIndexError(__pyx_t_4);
- {__pyx_filename = __pyx_f[3]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[3]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
(((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->right_edge[__pyx_v_i]) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_3, __pyx_bstride_0_right_edge));
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":434
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":457
* self.left_edge[i] = left_edge[i]
* self.right_edge[i] = right_edge[i]
* self.subgrid_faces = subgrid_faces # <<<<<<<<<<<<<<
@@ -13940,7 +14257,7 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":438
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":461
* @cython.boundscheck(False)
* @cython.wraparound(False)
* def sweep(self, int direction = 0, int stack = 0): # <<<<<<<<<<<<<<
@@ -13995,15 +14312,15 @@
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "sweep") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "sweep") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
if (values[0]) {
- __pyx_v_direction = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_direction == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_direction = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_direction == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
__pyx_v_direction = 0;
}
if (values[1]) {
- __pyx_v_stack = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_stack == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_stack = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_stack == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
__pyx_v_stack = 0;
}
@@ -14011,15 +14328,15 @@
__pyx_v_direction = 0;
__pyx_v_stack = 0;
switch (PyTuple_GET_SIZE(__pyx_args)) {
- case 2: __pyx_v_stack = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_stack == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- case 1: __pyx_v_direction = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((__pyx_v_direction == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ case 2: __pyx_v_stack = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_stack == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ case 1: __pyx_v_direction = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((__pyx_v_direction == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("sweep", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("sweep", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.ProtoPrism.sweep");
return NULL;
@@ -14030,7 +14347,7 @@
__pyx_v_LC = Py_None; __Pyx_INCREF(Py_None);
__pyx_v_RC = Py_None; __Pyx_INCREF(Py_None);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":442
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":465
* cdef GridFace face
* cdef np.float64_t proto_split[3]
* for i in range(3): proto_split[i] = self.right_edge[i] # <<<<<<<<<<<<<<
@@ -14042,19 +14359,19 @@
(__pyx_v_proto_split[__pyx_v_i]) = (((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->right_edge[__pyx_v_i]);
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":443
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":466
* cdef np.float64_t proto_split[3]
* for i in range(3): proto_split[i] = self.right_edge[i]
* for face in self.subgrid_faces[direction]: # <<<<<<<<<<<<<<
* proto_split[direction] = face.coord
* if proto_split[direction] <= self.left_edge[direction]:
*/
- __pyx_1 = __Pyx_GetItemInt(((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->subgrid_faces, __pyx_v_direction, sizeof(int), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_1 = __Pyx_GetItemInt(((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->subgrid_faces, __pyx_v_direction, sizeof(int), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_1);
if (PyList_CheckExact(__pyx_1) || PyTuple_CheckExact(__pyx_1)) {
__pyx_t_2 = 0; __pyx_t_3 = __pyx_1; __Pyx_INCREF(__pyx_t_3);
} else {
- __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
}
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
@@ -14068,17 +14385,17 @@
} else {
__pyx_t_4 = PyIter_Next(__pyx_t_3);
if (!__pyx_t_4) {
- if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
break;
}
__Pyx_GOTREF(__pyx_t_4);
}
- if (!(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_2yt_9amr_utils_GridFace))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_2yt_9amr_utils_GridFace))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_v_face));
__pyx_v_face = ((struct __pyx_obj_2yt_9amr_utils_GridFace *)__pyx_t_4);
__pyx_t_4 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":444
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":467
* for i in range(3): proto_split[i] = self.right_edge[i]
* for face in self.subgrid_faces[direction]:
* proto_split[direction] = face.coord # <<<<<<<<<<<<<<
@@ -14087,7 +14404,7 @@
*/
(__pyx_v_proto_split[__pyx_v_direction]) = __pyx_v_face->coord;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":445
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":468
* for face in self.subgrid_faces[direction]:
* proto_split[direction] = face.coord
* if proto_split[direction] <= self.left_edge[direction]: # <<<<<<<<<<<<<<
@@ -14097,7 +14414,7 @@
__pyx_t_5 = ((__pyx_v_proto_split[__pyx_v_direction]) <= (((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->left_edge[__pyx_v_direction]));
if (__pyx_t_5) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":446
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":469
* proto_split[direction] = face.coord
* if proto_split[direction] <= self.left_edge[direction]:
* continue # <<<<<<<<<<<<<<
@@ -14109,7 +14426,7 @@
}
__pyx_L10:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":447
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":470
* if proto_split[direction] <= self.left_edge[direction]:
* continue
* if proto_split[direction] == self.right_edge[direction]: # <<<<<<<<<<<<<<
@@ -14119,7 +14436,7 @@
__pyx_t_5 = ((__pyx_v_proto_split[__pyx_v_direction]) == (((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->right_edge[__pyx_v_direction]));
if (__pyx_t_5) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":448
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":471
* continue
* if proto_split[direction] == self.right_edge[direction]:
* if stack == 2: return [self] # <<<<<<<<<<<<<<
@@ -14129,7 +14446,7 @@
__pyx_t_5 = (__pyx_v_stack == 2);
if (__pyx_t_5) {
__Pyx_XDECREF(__pyx_r);
- __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
__Pyx_INCREF(__pyx_v_self);
PyList_SET_ITEM(__pyx_t_4, 0, __pyx_v_self);
@@ -14142,7 +14459,7 @@
}
__pyx_L12:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":449
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":472
* if proto_split[direction] == self.right_edge[direction]:
* if stack == 2: return [self]
* return self.sweep((direction + 1) % 3, stack + 1) # <<<<<<<<<<<<<<
@@ -14150,13 +14467,13 @@
* left, right = self.split(proto_split, direction)
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_kp_sweep); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_kp_sweep); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_6 = PyInt_FromLong(((__pyx_v_direction + 1) % 3)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyInt_FromLong(((__pyx_v_direction + 1) % 3)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = PyInt_FromLong((__pyx_v_stack + 1)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyInt_FromLong((__pyx_v_stack + 1)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
__Pyx_GIVEREF(__pyx_t_6);
@@ -14164,7 +14481,7 @@
__Pyx_GIVEREF(__pyx_t_7);
__pyx_t_6 = 0;
__pyx_t_7 = 0;
- __pyx_t_7 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
@@ -14176,7 +14493,7 @@
}
__pyx_L11:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":450
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":473
* if stack == 2: return [self]
* return self.sweep((direction + 1) % 3, stack + 1)
* if face.proj_overlap(self.left_edge, proto_split) == 1: # <<<<<<<<<<<<<<
@@ -14186,14 +14503,14 @@
__pyx_t_5 = (((struct __pyx_vtabstruct_2yt_9amr_utils_GridFace *)__pyx_v_face->__pyx_vtab)->proj_overlap(__pyx_v_face, ((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->left_edge, __pyx_v_proto_split) == 1);
if (__pyx_t_5) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":451
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":474
* return self.sweep((direction + 1) % 3, stack + 1)
* if face.proj_overlap(self.left_edge, proto_split) == 1:
* left, right = self.split(proto_split, direction) # <<<<<<<<<<<<<<
* LC = left.sweep((direction + 1) % 3)
* RC = right.sweep(direction)
*/
- __pyx_t_7 = ((struct __pyx_vtabstruct_2yt_9amr_utils_ProtoPrism *)((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->__pyx_vtab)->split(((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self), __pyx_v_proto_split, __pyx_v_direction); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = ((struct __pyx_vtabstruct_2yt_9amr_utils_ProtoPrism *)((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->__pyx_vtab)->split(((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self), __pyx_v_proto_split, __pyx_v_direction); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
if (PyTuple_CheckExact(__pyx_t_7) && likely(PyTuple_GET_SIZE(__pyx_t_7) == 2)) {
PyObject* tuple = __pyx_t_7;
@@ -14207,14 +14524,14 @@
__pyx_v_right = __pyx_3;
__pyx_3 = 0;
} else {
- __pyx_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_1);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_2);
- __pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_3);
- if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
__Pyx_DECREF(__pyx_v_left);
__pyx_v_left = __pyx_2;
@@ -14224,23 +14541,23 @@
__pyx_3 = 0;
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":452
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":475
* if face.proj_overlap(self.left_edge, proto_split) == 1:
* left, right = self.split(proto_split, direction)
* LC = left.sweep((direction + 1) % 3) # <<<<<<<<<<<<<<
* RC = right.sweep(direction)
* return LC + RC
*/
- __pyx_t_7 = PyObject_GetAttr(__pyx_v_left, __pyx_kp_sweep); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_GetAttr(__pyx_v_left, __pyx_kp_sweep); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_8 = PyInt_FromLong(((__pyx_v_direction + 1) % 3)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyInt_FromLong(((__pyx_v_direction + 1) % 3)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8);
__Pyx_GIVEREF(__pyx_t_8);
__pyx_t_8 = 0;
- __pyx_t_8 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
@@ -14248,23 +14565,23 @@
__pyx_v_LC = __pyx_t_8;
__pyx_t_8 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":453
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":476
* left, right = self.split(proto_split, direction)
* LC = left.sweep((direction + 1) % 3)
* RC = right.sweep(direction) # <<<<<<<<<<<<<<
* return LC + RC
* raise RuntimeError
*/
- __pyx_t_8 = PyObject_GetAttr(__pyx_v_right, __pyx_kp_sweep); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_GetAttr(__pyx_v_right, __pyx_kp_sweep); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_4 = PyInt_FromLong(__pyx_v_direction); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong(__pyx_v_direction); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_7));
PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4);
__Pyx_GIVEREF(__pyx_t_4);
__pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
@@ -14272,7 +14589,7 @@
__pyx_v_RC = __pyx_t_4;
__pyx_t_4 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":454
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":477
* LC = left.sweep((direction + 1) % 3)
* RC = right.sweep(direction)
* return LC + RC # <<<<<<<<<<<<<<
@@ -14280,7 +14597,7 @@
*
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_4 = PyNumber_Add(__pyx_v_LC, __pyx_v_RC); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Add(__pyx_v_LC, __pyx_v_RC); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__pyx_r = __pyx_t_4;
__pyx_t_4 = 0;
@@ -14293,7 +14610,7 @@
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":455
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":478
* RC = right.sweep(direction)
* return LC + RC
* raise RuntimeError # <<<<<<<<<<<<<<
@@ -14301,7 +14618,7 @@
* @cython.boundscheck(False)
*/
__Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0);
- {__pyx_filename = __pyx_f[3]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[3]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
@@ -14327,7 +14644,7 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":459
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":482
* @cython.boundscheck(False)
* @cython.wraparound(False)
* cdef object split(self, np.float64_t *sp, int direction): # <<<<<<<<<<<<<<
@@ -14349,39 +14666,39 @@
__pyx_v_left = Py_None; __Pyx_INCREF(Py_None);
__pyx_v_right = Py_None; __Pyx_INCREF(Py_None);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":461
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":484
* cdef object split(self, np.float64_t *sp, int direction):
* cdef int i
* cdef np.ndarray split_left = self.LeftEdge.copy() # <<<<<<<<<<<<<<
* cdef np.ndarray split_right = self.RightEdge.copy()
*
*/
- __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->LeftEdge, __pyx_kp_copy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->LeftEdge, __pyx_kp_copy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (!(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_split_left = ((PyArrayObject *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":462
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":485
* cdef int i
* cdef np.ndarray split_left = self.LeftEdge.copy()
* cdef np.ndarray split_right = self.RightEdge.copy() # <<<<<<<<<<<<<<
*
* for i in range(3): split_left[i] = self.right_edge[i]
*/
- __pyx_t_2 = PyObject_GetAttr(__pyx_v_self->RightEdge, __pyx_kp_copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(__pyx_v_self->RightEdge, __pyx_kp_copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (!(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_split_right = ((PyArrayObject *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":464
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":487
* cdef np.ndarray split_right = self.RightEdge.copy()
*
* for i in range(3): split_left[i] = self.right_edge[i] # <<<<<<<<<<<<<<
@@ -14390,32 +14707,32 @@
*/
for (__pyx_t_3 = 0; __pyx_t_3 < 3; __pyx_t_3+=1) {
__pyx_v_i = __pyx_t_3;
- __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->right_edge[__pyx_v_i])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->right_edge[__pyx_v_i])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- if (__Pyx_SetItemInt(((PyObject *)__pyx_v_split_left), __pyx_v_i, __pyx_t_1, sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetItemInt(((PyObject *)__pyx_v_split_left), __pyx_v_i, __pyx_t_1, sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":465
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":488
*
* for i in range(3): split_left[i] = self.right_edge[i]
* split_left[direction] = sp[direction] # <<<<<<<<<<<<<<
* left = ProtoPrism(self.LeftEdge, split_left, self.subgrid_faces)
*
*/
- __pyx_t_1 = PyFloat_FromDouble((__pyx_v_sp[__pyx_v_direction])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyFloat_FromDouble((__pyx_v_sp[__pyx_v_direction])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- if (__Pyx_SetItemInt(((PyObject *)__pyx_v_split_left), __pyx_v_direction, __pyx_t_1, sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetItemInt(((PyObject *)__pyx_v_split_left), __pyx_v_direction, __pyx_t_1, sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":466
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":489
* for i in range(3): split_left[i] = self.right_edge[i]
* split_left[direction] = sp[direction]
* left = ProtoPrism(self.LeftEdge, split_left, self.subgrid_faces) # <<<<<<<<<<<<<<
*
* for i in range(3): split_right[i] = self.left_edge[i]
*/
- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
__Pyx_INCREF(__pyx_v_self->LeftEdge);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->LeftEdge);
@@ -14426,14 +14743,14 @@
__Pyx_INCREF(__pyx_v_self->subgrid_faces);
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->subgrid_faces);
__Pyx_GIVEREF(__pyx_v_self->subgrid_faces);
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_2yt_9amr_utils_ProtoPrism)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_2yt_9amr_utils_ProtoPrism)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_v_left);
__pyx_v_left = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":468
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":491
* left = ProtoPrism(self.LeftEdge, split_left, self.subgrid_faces)
*
* for i in range(3): split_right[i] = self.left_edge[i] # <<<<<<<<<<<<<<
@@ -14442,32 +14759,32 @@
*/
for (__pyx_t_3 = 0; __pyx_t_3 < 3; __pyx_t_3+=1) {
__pyx_v_i = __pyx_t_3;
- __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->left_edge[__pyx_v_i])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->left_edge[__pyx_v_i])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- if (__Pyx_SetItemInt(((PyObject *)__pyx_v_split_right), __pyx_v_i, __pyx_t_2, sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetItemInt(((PyObject *)__pyx_v_split_right), __pyx_v_i, __pyx_t_2, sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":469
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":492
*
* for i in range(3): split_right[i] = self.left_edge[i]
* split_right[direction] = sp[direction] # <<<<<<<<<<<<<<
* right = ProtoPrism(split_right, self.RightEdge, self.subgrid_faces)
*
*/
- __pyx_t_2 = PyFloat_FromDouble((__pyx_v_sp[__pyx_v_direction])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyFloat_FromDouble((__pyx_v_sp[__pyx_v_direction])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- if (__Pyx_SetItemInt(((PyObject *)__pyx_v_split_right), __pyx_v_direction, __pyx_t_2, sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetItemInt(((PyObject *)__pyx_v_split_right), __pyx_v_direction, __pyx_t_2, sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":470
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":493
* for i in range(3): split_right[i] = self.left_edge[i]
* split_right[direction] = sp[direction]
* right = ProtoPrism(split_right, self.RightEdge, self.subgrid_faces) # <<<<<<<<<<<<<<
*
* return (left, right)
*/
- __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
__Pyx_INCREF(((PyObject *)__pyx_v_split_right));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_split_right));
@@ -14478,14 +14795,14 @@
__Pyx_INCREF(__pyx_v_self->subgrid_faces);
PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_self->subgrid_faces);
__Pyx_GIVEREF(__pyx_v_self->subgrid_faces);
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_2yt_9amr_utils_ProtoPrism)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_2yt_9amr_utils_ProtoPrism)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_v_right);
__pyx_v_right = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":472
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":495
* right = ProtoPrism(split_right, self.RightEdge, self.subgrid_faces)
*
* return (left, right) # <<<<<<<<<<<<<<
@@ -14493,7 +14810,7 @@
* @cython.boundscheck(False)
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
__Pyx_INCREF(__pyx_v_left);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_left);
@@ -14522,7 +14839,7 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":476
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":499
* @cython.boundscheck(False)
* @cython.wraparound(False)
* def get_brick(self, np.ndarray[np.float64_t, ndim=1] grid_left_edge, # <<<<<<<<<<<<<<
@@ -14608,23 +14925,23 @@
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_grid_dds);
if (likely(values[1])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("get_brick", 1, 4, 4, 1); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("get_brick", 1, 4, 4, 1); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
values[2] = PyDict_GetItem(__pyx_kwds, __pyx_kp_data);
if (likely(values[2])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("get_brick", 1, 4, 4, 2); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("get_brick", 1, 4, 4, 2); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 3:
values[3] = PyDict_GetItem(__pyx_kwds, __pyx_kp_child_mask);
if (likely(values[3])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("get_brick", 1, 4, 4, 3); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("get_brick", 1, 4, 4, 3); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "get_brick") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "get_brick") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
__pyx_v_grid_left_edge = ((PyArrayObject *)values[0]);
__pyx_v_grid_dds = ((PyArrayObject *)values[1]);
@@ -14640,7 +14957,7 @@
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("get_brick", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("get_brick", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.ProtoPrism.get_brick");
return NULL;
@@ -14652,29 +14969,29 @@
__pyx_bstruct_grid_left_edge.buf = NULL;
__pyx_bstruct_grid_dds.buf = NULL;
__pyx_bstruct_data.buf = NULL;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grid_left_edge), __pyx_ptype_5numpy_ndarray, 1, "grid_left_edge", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grid_dds), __pyx_ptype_5numpy_ndarray, 1, "grid_dds", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), __pyx_ptype_5numpy_ndarray, 1, "data", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grid_left_edge), __pyx_ptype_5numpy_ndarray, 1, "grid_left_edge", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grid_dds), __pyx_ptype_5numpy_ndarray, 1, "grid_dds", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), __pyx_ptype_5numpy_ndarray, 1, "data", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_grid_left_edge, (PyObject*)__pyx_v_grid_left_edge, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_grid_left_edge, (PyObject*)__pyx_v_grid_left_edge, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_bstride_0_grid_left_edge = __pyx_bstruct_grid_left_edge.strides[0];
__pyx_bshape_0_grid_left_edge = __pyx_bstruct_grid_left_edge.shape[0];
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_grid_dds, (PyObject*)__pyx_v_grid_dds, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_grid_dds, (PyObject*)__pyx_v_grid_dds, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_bstride_0_grid_dds = __pyx_bstruct_grid_dds.strides[0];
__pyx_bshape_0_grid_dds = __pyx_bstruct_grid_dds.shape[0];
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_data, (PyObject*)__pyx_v_data, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_data, (PyObject*)__pyx_v_data, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_bstride_0_data = __pyx_bstruct_data.strides[0]; __pyx_bstride_1_data = __pyx_bstruct_data.strides[1]; __pyx_bstride_2_data = __pyx_bstruct_data.strides[2];
__pyx_bshape_0_data = __pyx_bstruct_data.shape[0]; __pyx_bshape_1_data = __pyx_bstruct_data.shape[1]; __pyx_bshape_2_data = __pyx_bstruct_data.shape[2];
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":484
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":507
* cdef PartitionedGrid PG
* cdef int li[3], ri[3], idims[3], i
* for i in range(3): # <<<<<<<<<<<<<<
@@ -14684,7 +15001,7 @@
for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
__pyx_v_i = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":485
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":508
* cdef int li[3], ri[3], idims[3], i
* for i in range(3):
* li[i] = lrint((self.left_edge[i] - grid_left_edge[i])/grid_dds[i]) # <<<<<<<<<<<<<<
@@ -14695,7 +15012,7 @@
__pyx_t_3 = __pyx_v_i;
(__pyx_v_li[__pyx_v_i]) = lrint((((((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->left_edge[__pyx_v_i]) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_left_edge.buf, __pyx_t_2, __pyx_bstride_0_grid_left_edge))) / (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_dds.buf, __pyx_t_3, __pyx_bstride_0_grid_dds))));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":486
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":509
* for i in range(3):
* li[i] = lrint((self.left_edge[i] - grid_left_edge[i])/grid_dds[i])
* ri[i] = lrint((self.right_edge[i] - grid_left_edge[i])/grid_dds[i]) # <<<<<<<<<<<<<<
@@ -14706,7 +15023,7 @@
__pyx_t_5 = __pyx_v_i;
(__pyx_v_ri[__pyx_v_i]) = lrint((((((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->right_edge[__pyx_v_i]) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_left_edge.buf, __pyx_t_4, __pyx_bstride_0_grid_left_edge))) / (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_dds.buf, __pyx_t_5, __pyx_bstride_0_grid_dds))));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":487
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":510
* li[i] = lrint((self.left_edge[i] - grid_left_edge[i])/grid_dds[i])
* ri[i] = lrint((self.right_edge[i] - grid_left_edge[i])/grid_dds[i])
* idims[i] = ri[i] - li[i] # <<<<<<<<<<<<<<
@@ -14716,20 +15033,20 @@
(__pyx_v_idims[__pyx_v_i]) = ((__pyx_v_ri[__pyx_v_i]) - (__pyx_v_li[__pyx_v_i]));
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":488
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":511
* ri[i] = lrint((self.right_edge[i] - grid_left_edge[i])/grid_dds[i])
* idims[i] = ri[i] - li[i]
* if child_mask[li[0], li[1], li[2]] == 0: return [] # <<<<<<<<<<<<<<
* cdef np.ndarray[np.int64_t, ndim=1] dims = np.empty(3, dtype='int64')
* for i in range(3):
*/
- __pyx_t_6 = PyInt_FromLong((__pyx_v_li[0])); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyInt_FromLong((__pyx_v_li[0])); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = PyInt_FromLong((__pyx_v_li[1])); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyInt_FromLong((__pyx_v_li[1])); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_8 = PyInt_FromLong((__pyx_v_li[2])); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyInt_FromLong((__pyx_v_li[2])); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_9));
PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6);
__Pyx_GIVEREF(__pyx_t_6);
@@ -14740,17 +15057,17 @@
__pyx_t_6 = 0;
__pyx_t_7 = 0;
__pyx_t_8 = 0;
- __pyx_1 = PyObject_GetItem(__pyx_v_child_mask, ((PyObject *)__pyx_t_9)); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_1 = PyObject_GetItem(__pyx_v_child_mask, ((PyObject *)__pyx_t_9)); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_1);
__Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
- __pyx_t_9 = PyObject_RichCompare(__pyx_1, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyObject_RichCompare(__pyx_1, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
- __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
if (__pyx_t_10) {
__Pyx_XDECREF(__pyx_r);
- __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_9));
__pyx_r = ((PyObject *)__pyx_t_9);
__pyx_t_9 = 0;
@@ -14759,38 +15076,38 @@
}
__pyx_L8:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":489
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":512
* idims[i] = ri[i] - li[i]
* if child_mask[li[0], li[1], li[2]] == 0: return []
* cdef np.ndarray[np.int64_t, ndim=1] dims = np.empty(3, dtype='int64') # <<<<<<<<<<<<<<
* for i in range(3):
* dims[i] = idims[i]
*/
- __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_1);
- __pyx_t_9 = PyObject_GetAttr(__pyx_1, __pyx_kp_empty); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyObject_GetAttr(__pyx_1, __pyx_kp_empty); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
- __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
__Pyx_INCREF(__pyx_int_3);
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_int_3);
__Pyx_GIVEREF(__pyx_int_3);
- __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_1));
- if (PyDict_SetItem(__pyx_1, __pyx_kp_dtype, __pyx_kp_37) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_7 = PyEval_CallObjectWithKeywords(__pyx_t_9, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_1, __pyx_kp_dtype, __pyx_kp_37) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyEval_CallObjectWithKeywords(__pyx_t_9, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
__Pyx_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;
- if (!(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_11 = ((PyArrayObject *)__pyx_t_7);
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_dims, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
__pyx_v_dims = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_dims.buf = NULL;
- {__pyx_filename = __pyx_f[3]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[3]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
} else {__pyx_bstride_0_dims = __pyx_bstruct_dims.strides[0];
__pyx_bshape_0_dims = __pyx_bstruct_dims.shape[0];
}
@@ -14799,7 +15116,7 @@
__pyx_v_dims = ((PyArrayObject *)__pyx_t_7);
__pyx_t_7 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":490
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":513
* if child_mask[li[0], li[1], li[2]] == 0: return []
* cdef np.ndarray[np.int64_t, ndim=1] dims = np.empty(3, dtype='int64')
* for i in range(3): # <<<<<<<<<<<<<<
@@ -14809,7 +15126,7 @@
for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
__pyx_v_i = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":491
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":514
* cdef np.ndarray[np.int64_t, ndim=1] dims = np.empty(3, dtype='int64')
* for i in range(3):
* dims[i] = idims[i] # <<<<<<<<<<<<<<
@@ -14820,38 +15137,38 @@
*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_dims.buf, __pyx_t_12, __pyx_bstride_0_dims) = (__pyx_v_idims[__pyx_v_i]);
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":493
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":516
* dims[i] = idims[i]
* cdef np.ndarray[np.float64_t, ndim=3] new_data
* new_data = data[li[0]:ri[0]+1,li[1]:ri[1]+1,li[2]:ri[2]+1].copy() # <<<<<<<<<<<<<<
* PG = PartitionedGrid(new_data, self.LeftEdge, self.RightEdge, dims)
* return [PG]
*/
- __pyx_t_7 = PyInt_FromLong((__pyx_v_li[0])); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyInt_FromLong((__pyx_v_li[0])); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_8 = PyInt_FromLong(((__pyx_v_ri[0]) + 1)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyInt_FromLong(((__pyx_v_ri[0]) + 1)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_1 = PySlice_New(__pyx_t_7, __pyx_t_8, Py_None); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_1 = PySlice_New(__pyx_t_7, __pyx_t_8, Py_None); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_1);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = PyInt_FromLong((__pyx_v_li[1])); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyInt_FromLong((__pyx_v_li[1])); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_7 = PyInt_FromLong(((__pyx_v_ri[1]) + 1)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyInt_FromLong(((__pyx_v_ri[1]) + 1)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_2 = PySlice_New(__pyx_t_8, __pyx_t_7, Py_None); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_2 = PySlice_New(__pyx_t_8, __pyx_t_7, Py_None); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_2);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_7 = PyInt_FromLong((__pyx_v_li[2])); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyInt_FromLong((__pyx_v_li[2])); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_8 = PyInt_FromLong(((__pyx_v_ri[2]) + 1)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyInt_FromLong(((__pyx_v_ri[2]) + 1)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_3 = PySlice_New(__pyx_t_7, __pyx_t_8, Py_None); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_3 = PySlice_New(__pyx_t_7, __pyx_t_8, Py_None); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_3);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_1);
__Pyx_GIVEREF(__pyx_1);
@@ -14862,16 +15179,16 @@
__pyx_1 = 0;
__pyx_2 = 0;
__pyx_3 = 0;
- __pyx_1 = PyObject_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_t_8)); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_1 = PyObject_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_t_8)); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_1);
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
- __pyx_t_8 = PyObject_GetAttr(__pyx_1, __pyx_kp_copy); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_GetAttr(__pyx_1, __pyx_kp_copy); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
- __pyx_t_7 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- if (!(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_13 = ((PyArrayObject *)__pyx_t_7);
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
@@ -14888,20 +15205,20 @@
}
__pyx_bstride_0_new_data = __pyx_bstruct_new_data.strides[0]; __pyx_bstride_1_new_data = __pyx_bstruct_new_data.strides[1]; __pyx_bstride_2_new_data = __pyx_bstruct_new_data.strides[2];
__pyx_bshape_0_new_data = __pyx_bstruct_new_data.shape[0]; __pyx_bshape_1_new_data = __pyx_bstruct_new_data.shape[1]; __pyx_bshape_2_new_data = __pyx_bstruct_new_data.shape[2];
- if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_t_13 = 0;
__Pyx_DECREF(((PyObject *)__pyx_v_new_data));
__pyx_v_new_data = ((PyArrayObject *)__pyx_t_7);
__pyx_t_7 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":494
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":517
* cdef np.ndarray[np.float64_t, ndim=3] new_data
* new_data = data[li[0]:ri[0]+1,li[1]:ri[1]+1,li[2]:ri[2]+1].copy()
* PG = PartitionedGrid(new_data, self.LeftEdge, self.RightEdge, dims) # <<<<<<<<<<<<<<
* return [PG]
*/
- __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_7));
__Pyx_INCREF(((PyObject *)__pyx_v_new_data));
PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_new_data));
@@ -14915,21 +15232,21 @@
__Pyx_INCREF(((PyObject *)__pyx_v_dims));
PyTuple_SET_ITEM(__pyx_t_7, 3, ((PyObject *)__pyx_v_dims));
__Pyx_GIVEREF(((PyObject *)__pyx_v_dims));
- __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_2yt_9amr_utils_PartitionedGrid)), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_2yt_9amr_utils_PartitionedGrid)), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
- if (!(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_2yt_9amr_utils_PartitionedGrid))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_2yt_9amr_utils_PartitionedGrid))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_v_PG));
__pyx_v_PG = ((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_t_8);
__pyx_t_8 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":495
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":518
* new_data = data[li[0]:ri[0]+1,li[1]:ri[1]+1,li[2]:ri[2]+1].copy()
* PG = PartitionedGrid(new_data, self.LeftEdge, self.RightEdge, dims)
* return [PG] # <<<<<<<<<<<<<<
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
__Pyx_INCREF(((PyObject *)__pyx_v_PG));
PyList_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v_PG));
@@ -15565,6 +15882,737 @@
return __pyx_r;
}
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":30
+ * cimport cython
+ *
+ * cdef inline np.int64_t i64max(np.int64_t i0, np.int64_t i1): # <<<<<<<<<<<<<<
+ * if i0 > i1: return i0
+ * return i1
+ */
+
+static INLINE __pyx_t_5numpy_int64_t __pyx_f_2yt_9amr_utils_i64max(__pyx_t_5numpy_int64_t __pyx_v_i0, __pyx_t_5numpy_int64_t __pyx_v_i1) {
+ __pyx_t_5numpy_int64_t __pyx_r;
+ int __pyx_t_1;
+ __Pyx_SetupRefcountContext("i64max");
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":31
+ *
+ * cdef inline np.int64_t i64max(np.int64_t i0, np.int64_t i1):
+ * if i0 > i1: return i0 # <<<<<<<<<<<<<<
+ * return i1
+ *
+ */
+ __pyx_t_1 = (__pyx_v_i0 > __pyx_v_i1);
+ if (__pyx_t_1) {
+ __pyx_r = __pyx_v_i0;
+ goto __pyx_L0;
+ goto __pyx_L3;
+ }
+ __pyx_L3:;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":32
+ * cdef inline np.int64_t i64max(np.int64_t i0, np.int64_t i1):
+ * if i0 > i1: return i0
+ * return i1 # <<<<<<<<<<<<<<
+ *
+ * cdef inline np.int64_t i64min(np.int64_t i0, np.int64_t i1):
+ */
+ __pyx_r = __pyx_v_i1;
+ goto __pyx_L0;
+
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_FinishRefcountContext();
+ return __pyx_r;
+}
+
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":34
+ * return i1
+ *
+ * cdef inline np.int64_t i64min(np.int64_t i0, np.int64_t i1): # <<<<<<<<<<<<<<
+ * if i0 < i1: return i0
+ * return i1
+ */
+
+static INLINE __pyx_t_5numpy_int64_t __pyx_f_2yt_9amr_utils_i64min(__pyx_t_5numpy_int64_t __pyx_v_i0, __pyx_t_5numpy_int64_t __pyx_v_i1) {
+ __pyx_t_5numpy_int64_t __pyx_r;
+ int __pyx_t_1;
+ __Pyx_SetupRefcountContext("i64min");
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":35
+ *
+ * cdef inline np.int64_t i64min(np.int64_t i0, np.int64_t i1):
+ * if i0 < i1: return i0 # <<<<<<<<<<<<<<
+ * return i1
+ *
+ */
+ __pyx_t_1 = (__pyx_v_i0 < __pyx_v_i1);
+ if (__pyx_t_1) {
+ __pyx_r = __pyx_v_i0;
+ goto __pyx_L0;
+ goto __pyx_L3;
+ }
+ __pyx_L3:;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":36
+ * cdef inline np.int64_t i64min(np.int64_t i0, np.int64_t i1):
+ * if i0 < i1: return i0
+ * return i1 # <<<<<<<<<<<<<<
+ *
+ * @cython.boundscheck(False)
+ */
+ __pyx_r = __pyx_v_i1;
+ goto __pyx_L0;
+
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_FinishRefcountContext();
+ return __pyx_r;
+}
+
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":39
+ *
+ * @cython.boundscheck(False)
+ * def construct_boundary_relationships( # <<<<<<<<<<<<<<
+ * np.ndarray[dtype=np.int64_t, ndim=3] contour_ids):
+ * # We only look at the boundary and one cell in
+ */
+
+static PyObject *__pyx_pf_2yt_9amr_utils_construct_boundary_relationships(PyObject *__pyx_self, PyObject *__pyx_v_contour_ids); /*proto*/
+static PyObject *__pyx_pf_2yt_9amr_utils_construct_boundary_relationships(PyObject *__pyx_self, PyObject *__pyx_v_contour_ids) {
+ int __pyx_v_i;
+ int __pyx_v_j;
+ int __pyx_v_nx;
+ int __pyx_v_ny;
+ int __pyx_v_nz;
+ __pyx_t_5numpy_int64_t __pyx_v_c1;
+ __pyx_t_5numpy_int64_t __pyx_v_c2;
+ PyObject *__pyx_v_tree;
+ Py_buffer __pyx_bstruct_contour_ids;
+ Py_ssize_t __pyx_bstride_0_contour_ids = 0;
+ Py_ssize_t __pyx_bstride_1_contour_ids = 0;
+ Py_ssize_t __pyx_bstride_2_contour_ids = 0;
+ Py_ssize_t __pyx_bshape_0_contour_ids = 0;
+ Py_ssize_t __pyx_bshape_1_contour_ids = 0;
+ Py_ssize_t __pyx_bshape_2_contour_ids = 0;
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+ int __pyx_t_3;
+ long __pyx_t_4;
+ int __pyx_t_5;
+ int __pyx_t_6;
+ long __pyx_t_7;
+ int __pyx_t_8;
+ int __pyx_t_9;
+ int __pyx_t_10;
+ PyObject *__pyx_t_11 = NULL;
+ PyObject *__pyx_t_12 = NULL;
+ long __pyx_t_13;
+ int __pyx_t_14;
+ int __pyx_t_15;
+ long __pyx_t_16;
+ int __pyx_t_17;
+ int __pyx_t_18;
+ int __pyx_t_19;
+ long __pyx_t_20;
+ int __pyx_t_21;
+ int __pyx_t_22;
+ long __pyx_t_23;
+ int __pyx_t_24;
+ int __pyx_t_25;
+ long __pyx_t_26;
+ int __pyx_t_27;
+ int __pyx_t_28;
+ long __pyx_t_29;
+ int __pyx_t_30;
+ int __pyx_t_31;
+ int __pyx_t_32;
+ long __pyx_t_33;
+ int __pyx_t_34;
+ int __pyx_t_35;
+ long __pyx_t_36;
+ int __pyx_t_37;
+ int __pyx_t_38;
+ long __pyx_t_39;
+ int __pyx_t_40;
+ int __pyx_t_41;
+ long __pyx_t_42;
+ __Pyx_SetupRefcountContext("construct_boundary_relationships");
+ __pyx_self = __pyx_self;
+ __pyx_v_tree = Py_None; __Pyx_INCREF(Py_None);
+ __pyx_bstruct_contour_ids.buf = NULL;
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_contour_ids), __pyx_ptype_5numpy_ndarray, 1, "contour_ids", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {
+ __Pyx_BufFmt_StackElem __pyx_stack[1];
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_contour_ids, (PyObject*)__pyx_v_contour_ids, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_bstride_0_contour_ids = __pyx_bstruct_contour_ids.strides[0]; __pyx_bstride_1_contour_ids = __pyx_bstruct_contour_ids.strides[1]; __pyx_bstride_2_contour_ids = __pyx_bstruct_contour_ids.strides[2];
+ __pyx_bshape_0_contour_ids = __pyx_bstruct_contour_ids.shape[0]; __pyx_bshape_1_contour_ids = __pyx_bstruct_contour_ids.shape[1]; __pyx_bshape_2_contour_ids = __pyx_bstruct_contour_ids.shape[2];
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":44
+ * cdef int i, j, nx, ny, nz
+ * cdef np.int64_t c1, c2
+ * tree = [] # <<<<<<<<<<<<<<
+ * nx = contour_ids.shape[0]
+ * ny = contour_ids.shape[1]
+ */
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+ __Pyx_DECREF(__pyx_v_tree);
+ __pyx_v_tree = ((PyObject *)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":45
+ * cdef np.int64_t c1, c2
+ * tree = []
+ * nx = contour_ids.shape[0] # <<<<<<<<<<<<<<
+ * ny = contour_ids.shape[1]
+ * nz = contour_ids.shape[2]
+ */
+ __pyx_v_nx = (((PyArrayObject *)__pyx_v_contour_ids)->dimensions[0]);
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":46
+ * tree = []
+ * nx = contour_ids.shape[0]
+ * ny = contour_ids.shape[1] # <<<<<<<<<<<<<<
+ * nz = contour_ids.shape[2]
+ * # First x-pass
+ */
+ __pyx_v_ny = (((PyArrayObject *)__pyx_v_contour_ids)->dimensions[1]);
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":47
+ * nx = contour_ids.shape[0]
+ * ny = contour_ids.shape[1]
+ * nz = contour_ids.shape[2] # <<<<<<<<<<<<<<
+ * # First x-pass
+ * for i in range(ny):
+ */
+ __pyx_v_nz = (((PyArrayObject *)__pyx_v_contour_ids)->dimensions[2]);
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":49
+ * nz = contour_ids.shape[2]
+ * # First x-pass
+ * for i in range(ny): # <<<<<<<<<<<<<<
+ * for j in range(nz):
+ * c1 = contour_ids[0, i, j]
+ */
+ for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_v_ny; __pyx_t_2+=1) {
+ __pyx_v_i = __pyx_t_2;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":50
+ * # First x-pass
+ * for i in range(ny):
+ * for j in range(nz): # <<<<<<<<<<<<<<
+ * c1 = contour_ids[0, i, j]
+ * c2 = contour_ids[1, i, j]
+ */
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_v_nz; __pyx_t_3+=1) {
+ __pyx_v_j = __pyx_t_3;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":51
+ * for i in range(ny):
+ * for j in range(nz):
+ * c1 = contour_ids[0, i, j] # <<<<<<<<<<<<<<
+ * c2 = contour_ids[1, i, j]
+ * if c1 > -1 and c2 > -1:
+ */
+ __pyx_t_4 = 0;
+ __pyx_t_5 = __pyx_v_i;
+ __pyx_t_6 = __pyx_v_j;
+ if (__pyx_t_4 < 0) __pyx_t_4 += __pyx_bshape_0_contour_ids;
+ if (__pyx_t_5 < 0) __pyx_t_5 += __pyx_bshape_1_contour_ids;
+ if (__pyx_t_6 < 0) __pyx_t_6 += __pyx_bshape_2_contour_ids;
+ __pyx_v_c1 = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_contour_ids.buf, __pyx_t_4, __pyx_bstride_0_contour_ids, __pyx_t_5, __pyx_bstride_1_contour_ids, __pyx_t_6, __pyx_bstride_2_contour_ids));
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":52
+ * for j in range(nz):
+ * c1 = contour_ids[0, i, j]
+ * c2 = contour_ids[1, i, j] # <<<<<<<<<<<<<<
+ * if c1 > -1 and c2 > -1:
+ * tree.append((i64max(c1,c2), i64min(c1,c2)))
+ */
+ __pyx_t_7 = 1;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_9 = __pyx_v_j;
+ if (__pyx_t_7 < 0) __pyx_t_7 += __pyx_bshape_0_contour_ids;
+ if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_bshape_1_contour_ids;
+ if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_bshape_2_contour_ids;
+ __pyx_v_c2 = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_contour_ids.buf, __pyx_t_7, __pyx_bstride_0_contour_ids, __pyx_t_8, __pyx_bstride_1_contour_ids, __pyx_t_9, __pyx_bstride_2_contour_ids));
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":53
+ * c1 = contour_ids[0, i, j]
+ * c2 = contour_ids[1, i, j]
+ * if c1 > -1 and c2 > -1: # <<<<<<<<<<<<<<
+ * tree.append((i64max(c1,c2), i64min(c1,c2)))
+ * c1 = contour_ids[nx-1, i, j]
+ */
+ if ((__pyx_v_c1 > -1)) {
+ __pyx_t_10 = (__pyx_v_c2 > -1);
+ } else {
+ __pyx_t_10 = (__pyx_v_c1 > -1);
+ }
+ if (__pyx_t_10) {
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":54
+ * c2 = contour_ids[1, i, j]
+ * if c1 > -1 and c2 > -1:
+ * tree.append((i64max(c1,c2), i64min(c1,c2))) # <<<<<<<<<<<<<<
+ * c1 = contour_ids[nx-1, i, j]
+ * c2 = contour_ids[nx-2, i, j]
+ */
+ __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_2yt_9amr_utils_i64max(__pyx_v_c1, __pyx_v_c2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_11 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_2yt_9amr_utils_i64min(__pyx_v_c1, __pyx_v_c2)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_12));
+ PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_11);
+ __pyx_t_1 = 0;
+ __pyx_t_11 = 0;
+ __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_tree, ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ goto __pyx_L9;
+ }
+ __pyx_L9:;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":55
+ * if c1 > -1 and c2 > -1:
+ * tree.append((i64max(c1,c2), i64min(c1,c2)))
+ * c1 = contour_ids[nx-1, i, j] # <<<<<<<<<<<<<<
+ * c2 = contour_ids[nx-2, i, j]
+ * if c1 > -1 and c2 > -1:
+ */
+ __pyx_t_13 = (__pyx_v_nx - 1);
+ __pyx_t_14 = __pyx_v_i;
+ __pyx_t_15 = __pyx_v_j;
+ if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_bshape_0_contour_ids;
+ if (__pyx_t_14 < 0) __pyx_t_14 += __pyx_bshape_1_contour_ids;
+ if (__pyx_t_15 < 0) __pyx_t_15 += __pyx_bshape_2_contour_ids;
+ __pyx_v_c1 = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_contour_ids.buf, __pyx_t_13, __pyx_bstride_0_contour_ids, __pyx_t_14, __pyx_bstride_1_contour_ids, __pyx_t_15, __pyx_bstride_2_contour_ids));
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":56
+ * tree.append((i64max(c1,c2), i64min(c1,c2)))
+ * c1 = contour_ids[nx-1, i, j]
+ * c2 = contour_ids[nx-2, i, j] # <<<<<<<<<<<<<<
+ * if c1 > -1 and c2 > -1:
+ * tree.append((i64max(c1,c2), i64min(c1,c2)))
+ */
+ __pyx_t_16 = (__pyx_v_nx - 2);
+ __pyx_t_17 = __pyx_v_i;
+ __pyx_t_18 = __pyx_v_j;
+ if (__pyx_t_16 < 0) __pyx_t_16 += __pyx_bshape_0_contour_ids;
+ if (__pyx_t_17 < 0) __pyx_t_17 += __pyx_bshape_1_contour_ids;
+ if (__pyx_t_18 < 0) __pyx_t_18 += __pyx_bshape_2_contour_ids;
+ __pyx_v_c2 = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_contour_ids.buf, __pyx_t_16, __pyx_bstride_0_contour_ids, __pyx_t_17, __pyx_bstride_1_contour_ids, __pyx_t_18, __pyx_bstride_2_contour_ids));
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":57
+ * c1 = contour_ids[nx-1, i, j]
+ * c2 = contour_ids[nx-2, i, j]
+ * if c1 > -1 and c2 > -1: # <<<<<<<<<<<<<<
+ * tree.append((i64max(c1,c2), i64min(c1,c2)))
+ * # Now y-pass
+ */
+ if ((__pyx_v_c1 > -1)) {
+ __pyx_t_10 = (__pyx_v_c2 > -1);
+ } else {
+ __pyx_t_10 = (__pyx_v_c1 > -1);
+ }
+ if (__pyx_t_10) {
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":58
+ * c2 = contour_ids[nx-2, i, j]
+ * if c1 > -1 and c2 > -1:
+ * tree.append((i64max(c1,c2), i64min(c1,c2))) # <<<<<<<<<<<<<<
+ * # Now y-pass
+ * for i in range(nx):
+ */
+ __pyx_t_11 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_2yt_9amr_utils_i64max(__pyx_v_c1, __pyx_v_c2)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_12 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_2yt_9amr_utils_i64min(__pyx_v_c1, __pyx_v_c2)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_11);
+ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_12);
+ __pyx_t_11 = 0;
+ __pyx_t_12 = 0;
+ __pyx_t_12 = __Pyx_PyObject_Append(__pyx_v_tree, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ goto __pyx_L10;
+ }
+ __pyx_L10:;
+ }
+ }
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":60
+ * tree.append((i64max(c1,c2), i64min(c1,c2)))
+ * # Now y-pass
+ * for i in range(nx): # <<<<<<<<<<<<<<
+ * for j in range(nz):
+ * c1 = contour_ids[i, 0, j]
+ */
+ for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_v_nx; __pyx_t_2+=1) {
+ __pyx_v_i = __pyx_t_2;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":61
+ * # Now y-pass
+ * for i in range(nx):
+ * for j in range(nz): # <<<<<<<<<<<<<<
+ * c1 = contour_ids[i, 0, j]
+ * c2 = contour_ids[i, 1, j]
+ */
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_v_nz; __pyx_t_3+=1) {
+ __pyx_v_j = __pyx_t_3;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":62
+ * for i in range(nx):
+ * for j in range(nz):
+ * c1 = contour_ids[i, 0, j] # <<<<<<<<<<<<<<
+ * c2 = contour_ids[i, 1, j]
+ * if c1 > -1 and c2 > -1:
+ */
+ __pyx_t_19 = __pyx_v_i;
+ __pyx_t_20 = 0;
+ __pyx_t_21 = __pyx_v_j;
+ if (__pyx_t_19 < 0) __pyx_t_19 += __pyx_bshape_0_contour_ids;
+ if (__pyx_t_20 < 0) __pyx_t_20 += __pyx_bshape_1_contour_ids;
+ if (__pyx_t_21 < 0) __pyx_t_21 += __pyx_bshape_2_contour_ids;
+ __pyx_v_c1 = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_contour_ids.buf, __pyx_t_19, __pyx_bstride_0_contour_ids, __pyx_t_20, __pyx_bstride_1_contour_ids, __pyx_t_21, __pyx_bstride_2_contour_ids));
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":63
+ * for j in range(nz):
+ * c1 = contour_ids[i, 0, j]
+ * c2 = contour_ids[i, 1, j] # <<<<<<<<<<<<<<
+ * if c1 > -1 and c2 > -1:
+ * tree.append((i64max(c1,c2), i64min(c1,c2)))
+ */
+ __pyx_t_22 = __pyx_v_i;
+ __pyx_t_23 = 1;
+ __pyx_t_24 = __pyx_v_j;
+ if (__pyx_t_22 < 0) __pyx_t_22 += __pyx_bshape_0_contour_ids;
+ if (__pyx_t_23 < 0) __pyx_t_23 += __pyx_bshape_1_contour_ids;
+ if (__pyx_t_24 < 0) __pyx_t_24 += __pyx_bshape_2_contour_ids;
+ __pyx_v_c2 = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_contour_ids.buf, __pyx_t_22, __pyx_bstride_0_contour_ids, __pyx_t_23, __pyx_bstride_1_contour_ids, __pyx_t_24, __pyx_bstride_2_contour_ids));
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":64
+ * c1 = contour_ids[i, 0, j]
+ * c2 = contour_ids[i, 1, j]
+ * if c1 > -1 and c2 > -1: # <<<<<<<<<<<<<<
+ * tree.append((i64max(c1,c2), i64min(c1,c2)))
+ * c1 = contour_ids[i, ny-1, j]
+ */
+ if ((__pyx_v_c1 > -1)) {
+ __pyx_t_10 = (__pyx_v_c2 > -1);
+ } else {
+ __pyx_t_10 = (__pyx_v_c1 > -1);
+ }
+ if (__pyx_t_10) {
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":65
+ * c2 = contour_ids[i, 1, j]
+ * if c1 > -1 and c2 > -1:
+ * tree.append((i64max(c1,c2), i64min(c1,c2))) # <<<<<<<<<<<<<<
+ * c1 = contour_ids[i, ny-1, j]
+ * c2 = contour_ids[i, ny-2, j]
+ */
+ __pyx_t_12 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_2yt_9amr_utils_i64max(__pyx_v_c1, __pyx_v_c2)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_2yt_9amr_utils_i64min(__pyx_v_c1, __pyx_v_c2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_11));
+ PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_t_12 = 0;
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Append(__pyx_v_tree, ((PyObject *)__pyx_t_11)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ goto __pyx_L15;
+ }
+ __pyx_L15:;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":66
+ * if c1 > -1 and c2 > -1:
+ * tree.append((i64max(c1,c2), i64min(c1,c2)))
+ * c1 = contour_ids[i, ny-1, j] # <<<<<<<<<<<<<<
+ * c2 = contour_ids[i, ny-2, j]
+ * if c1 > -1 and c2 > -1:
+ */
+ __pyx_t_25 = __pyx_v_i;
+ __pyx_t_26 = (__pyx_v_ny - 1);
+ __pyx_t_27 = __pyx_v_j;
+ if (__pyx_t_25 < 0) __pyx_t_25 += __pyx_bshape_0_contour_ids;
+ if (__pyx_t_26 < 0) __pyx_t_26 += __pyx_bshape_1_contour_ids;
+ if (__pyx_t_27 < 0) __pyx_t_27 += __pyx_bshape_2_contour_ids;
+ __pyx_v_c1 = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_contour_ids.buf, __pyx_t_25, __pyx_bstride_0_contour_ids, __pyx_t_26, __pyx_bstride_1_contour_ids, __pyx_t_27, __pyx_bstride_2_contour_ids));
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":67
+ * tree.append((i64max(c1,c2), i64min(c1,c2)))
+ * c1 = contour_ids[i, ny-1, j]
+ * c2 = contour_ids[i, ny-2, j] # <<<<<<<<<<<<<<
+ * if c1 > -1 and c2 > -1:
+ * tree.append((i64max(c1,c2), i64min(c1,c2)))
+ */
+ __pyx_t_28 = __pyx_v_i;
+ __pyx_t_29 = (__pyx_v_ny - 2);
+ __pyx_t_30 = __pyx_v_j;
+ if (__pyx_t_28 < 0) __pyx_t_28 += __pyx_bshape_0_contour_ids;
+ if (__pyx_t_29 < 0) __pyx_t_29 += __pyx_bshape_1_contour_ids;
+ if (__pyx_t_30 < 0) __pyx_t_30 += __pyx_bshape_2_contour_ids;
+ __pyx_v_c2 = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_contour_ids.buf, __pyx_t_28, __pyx_bstride_0_contour_ids, __pyx_t_29, __pyx_bstride_1_contour_ids, __pyx_t_30, __pyx_bstride_2_contour_ids));
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":68
+ * c1 = contour_ids[i, ny-1, j]
+ * c2 = contour_ids[i, ny-2, j]
+ * if c1 > -1 and c2 > -1: # <<<<<<<<<<<<<<
+ * tree.append((i64max(c1,c2), i64min(c1,c2)))
+ * for i in range(nx):
+ */
+ if ((__pyx_v_c1 > -1)) {
+ __pyx_t_10 = (__pyx_v_c2 > -1);
+ } else {
+ __pyx_t_10 = (__pyx_v_c1 > -1);
+ }
+ if (__pyx_t_10) {
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":69
+ * c2 = contour_ids[i, ny-2, j]
+ * if c1 > -1 and c2 > -1:
+ * tree.append((i64max(c1,c2), i64min(c1,c2))) # <<<<<<<<<<<<<<
+ * for i in range(nx):
+ * for j in range(ny):
+ */
+ __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_2yt_9amr_utils_i64max(__pyx_v_c1, __pyx_v_c2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_11 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_2yt_9amr_utils_i64min(__pyx_v_c1, __pyx_v_c2)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_12));
+ PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_11);
+ __pyx_t_1 = 0;
+ __pyx_t_11 = 0;
+ __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_tree, ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ goto __pyx_L16;
+ }
+ __pyx_L16:;
+ }
+ }
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":70
+ * if c1 > -1 and c2 > -1:
+ * tree.append((i64max(c1,c2), i64min(c1,c2)))
+ * for i in range(nx): # <<<<<<<<<<<<<<
+ * for j in range(ny):
+ * c1 = contour_ids[i, j, 0]
+ */
+ for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_v_nx; __pyx_t_2+=1) {
+ __pyx_v_i = __pyx_t_2;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":71
+ * tree.append((i64max(c1,c2), i64min(c1,c2)))
+ * for i in range(nx):
+ * for j in range(ny): # <<<<<<<<<<<<<<
+ * c1 = contour_ids[i, j, 0]
+ * c2 = contour_ids[i, j, 1]
+ */
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_v_ny; __pyx_t_3+=1) {
+ __pyx_v_j = __pyx_t_3;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":72
+ * for i in range(nx):
+ * for j in range(ny):
+ * c1 = contour_ids[i, j, 0] # <<<<<<<<<<<<<<
+ * c2 = contour_ids[i, j, 1]
+ * if c1 > -1 and c2 > -1:
+ */
+ __pyx_t_31 = __pyx_v_i;
+ __pyx_t_32 = __pyx_v_j;
+ __pyx_t_33 = 0;
+ if (__pyx_t_31 < 0) __pyx_t_31 += __pyx_bshape_0_contour_ids;
+ if (__pyx_t_32 < 0) __pyx_t_32 += __pyx_bshape_1_contour_ids;
+ if (__pyx_t_33 < 0) __pyx_t_33 += __pyx_bshape_2_contour_ids;
+ __pyx_v_c1 = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_contour_ids.buf, __pyx_t_31, __pyx_bstride_0_contour_ids, __pyx_t_32, __pyx_bstride_1_contour_ids, __pyx_t_33, __pyx_bstride_2_contour_ids));
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":73
+ * for j in range(ny):
+ * c1 = contour_ids[i, j, 0]
+ * c2 = contour_ids[i, j, 1] # <<<<<<<<<<<<<<
+ * if c1 > -1 and c2 > -1:
+ * tree.append((i64max(c1,c2), i64min(c1,c2)))
+ */
+ __pyx_t_34 = __pyx_v_i;
+ __pyx_t_35 = __pyx_v_j;
+ __pyx_t_36 = 1;
+ if (__pyx_t_34 < 0) __pyx_t_34 += __pyx_bshape_0_contour_ids;
+ if (__pyx_t_35 < 0) __pyx_t_35 += __pyx_bshape_1_contour_ids;
+ if (__pyx_t_36 < 0) __pyx_t_36 += __pyx_bshape_2_contour_ids;
+ __pyx_v_c2 = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_contour_ids.buf, __pyx_t_34, __pyx_bstride_0_contour_ids, __pyx_t_35, __pyx_bstride_1_contour_ids, __pyx_t_36, __pyx_bstride_2_contour_ids));
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":74
+ * c1 = contour_ids[i, j, 0]
+ * c2 = contour_ids[i, j, 1]
+ * if c1 > -1 and c2 > -1: # <<<<<<<<<<<<<<
+ * tree.append((i64max(c1,c2), i64min(c1,c2)))
+ * c1 = contour_ids[i, j, nz-1]
+ */
+ if ((__pyx_v_c1 > -1)) {
+ __pyx_t_10 = (__pyx_v_c2 > -1);
+ } else {
+ __pyx_t_10 = (__pyx_v_c1 > -1);
+ }
+ if (__pyx_t_10) {
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":75
+ * c2 = contour_ids[i, j, 1]
+ * if c1 > -1 and c2 > -1:
+ * tree.append((i64max(c1,c2), i64min(c1,c2))) # <<<<<<<<<<<<<<
+ * c1 = contour_ids[i, j, nz-1]
+ * c2 = contour_ids[i, j, nz-2]
+ */
+ __pyx_t_11 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_2yt_9amr_utils_i64max(__pyx_v_c1, __pyx_v_c2)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_12 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_2yt_9amr_utils_i64min(__pyx_v_c1, __pyx_v_c2)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_11);
+ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_12);
+ __pyx_t_11 = 0;
+ __pyx_t_12 = 0;
+ __pyx_t_12 = __Pyx_PyObject_Append(__pyx_v_tree, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ goto __pyx_L21;
+ }
+ __pyx_L21:;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":76
+ * if c1 > -1 and c2 > -1:
+ * tree.append((i64max(c1,c2), i64min(c1,c2)))
+ * c1 = contour_ids[i, j, nz-1] # <<<<<<<<<<<<<<
+ * c2 = contour_ids[i, j, nz-2]
+ * if c1 > -1 and c2 > -1:
+ */
+ __pyx_t_37 = __pyx_v_i;
+ __pyx_t_38 = __pyx_v_j;
+ __pyx_t_39 = (__pyx_v_nz - 1);
+ if (__pyx_t_37 < 0) __pyx_t_37 += __pyx_bshape_0_contour_ids;
+ if (__pyx_t_38 < 0) __pyx_t_38 += __pyx_bshape_1_contour_ids;
+ if (__pyx_t_39 < 0) __pyx_t_39 += __pyx_bshape_2_contour_ids;
+ __pyx_v_c1 = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_contour_ids.buf, __pyx_t_37, __pyx_bstride_0_contour_ids, __pyx_t_38, __pyx_bstride_1_contour_ids, __pyx_t_39, __pyx_bstride_2_contour_ids));
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":77
+ * tree.append((i64max(c1,c2), i64min(c1,c2)))
+ * c1 = contour_ids[i, j, nz-1]
+ * c2 = contour_ids[i, j, nz-2] # <<<<<<<<<<<<<<
+ * if c1 > -1 and c2 > -1:
+ * tree.append((i64max(c1,c2), i64min(c1,c2)))
+ */
+ __pyx_t_40 = __pyx_v_i;
+ __pyx_t_41 = __pyx_v_j;
+ __pyx_t_42 = (__pyx_v_nz - 2);
+ if (__pyx_t_40 < 0) __pyx_t_40 += __pyx_bshape_0_contour_ids;
+ if (__pyx_t_41 < 0) __pyx_t_41 += __pyx_bshape_1_contour_ids;
+ if (__pyx_t_42 < 0) __pyx_t_42 += __pyx_bshape_2_contour_ids;
+ __pyx_v_c2 = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_contour_ids.buf, __pyx_t_40, __pyx_bstride_0_contour_ids, __pyx_t_41, __pyx_bstride_1_contour_ids, __pyx_t_42, __pyx_bstride_2_contour_ids));
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":78
+ * c1 = contour_ids[i, j, nz-1]
+ * c2 = contour_ids[i, j, nz-2]
+ * if c1 > -1 and c2 > -1: # <<<<<<<<<<<<<<
+ * tree.append((i64max(c1,c2), i64min(c1,c2)))
+ * return tree
+ */
+ if ((__pyx_v_c1 > -1)) {
+ __pyx_t_10 = (__pyx_v_c2 > -1);
+ } else {
+ __pyx_t_10 = (__pyx_v_c1 > -1);
+ }
+ if (__pyx_t_10) {
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":79
+ * c2 = contour_ids[i, j, nz-2]
+ * if c1 > -1 and c2 > -1:
+ * tree.append((i64max(c1,c2), i64min(c1,c2))) # <<<<<<<<<<<<<<
+ * return tree
+ */
+ __pyx_t_12 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_2yt_9amr_utils_i64max(__pyx_v_c1, __pyx_v_c2)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_2yt_9amr_utils_i64min(__pyx_v_c1, __pyx_v_c2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_11));
+ PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_t_12 = 0;
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Append(__pyx_v_tree, ((PyObject *)__pyx_t_11)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ goto __pyx_L22;
+ }
+ __pyx_L22:;
+ }
+ }
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":80
+ * if c1 > -1 and c2 > -1:
+ * tree.append((i64max(c1,c2), i64min(c1,c2)))
+ * return tree # <<<<<<<<<<<<<<
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_tree);
+ __pyx_r = __pyx_v_tree;
+ goto __pyx_L0;
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_XDECREF(__pyx_t_12);
+ { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
+ __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
+ __Pyx_SafeReleaseBuffer(&__pyx_bstruct_contour_ids);
+ __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
+ __Pyx_AddTraceback("yt.amr_utils.construct_boundary_relationships");
+ __pyx_r = NULL;
+ goto __pyx_L2;
+ __pyx_L0:;
+ __Pyx_SafeReleaseBuffer(&__pyx_bstruct_contour_ids);
+ __pyx_L2:;
+ __Pyx_DECREF(__pyx_v_tree);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_FinishRefcountContext();
+ return __pyx_r;
+}
+
/* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":152
* # experimental exception made for __getbuffer__ and __releasebuffer__
* # -- the details of this may change.
@@ -15687,17 +16735,17 @@
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
*/
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
__Pyx_INCREF(__pyx_kp_1);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_1);
__Pyx_GIVEREF(__pyx_kp_1);
- __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- {__pyx_filename = __pyx_f[7]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L6;
}
__pyx_L6:;
@@ -15731,17 +16779,17 @@
*
* info.buf = PyArray_DATA(self)
*/
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
__Pyx_INCREF(__pyx_kp_2);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_2);
__Pyx_GIVEREF(__pyx_kp_2);
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[7]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L7;
}
__pyx_L7:;
@@ -16002,17 +17050,17 @@
* if t == NPY_BYTE: f = "b"
* elif t == NPY_UBYTE: f = "B"
*/
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
__Pyx_INCREF(__pyx_kp_5);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_5);
__Pyx_GIVEREF(__pyx_kp_5);
- __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- {__pyx_filename = __pyx_f[7]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L13;
}
__pyx_L13:;
@@ -16246,22 +17294,22 @@
* info.format = f
* return
*/
- __pyx_t_3 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = PyNumber_Remainder(__pyx_kp_23, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_Remainder(__pyx_kp_23, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[7]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_L14:;
@@ -16321,7 +17369,7 @@
* f[0] = 0 # Terminate format string
*
*/
- __pyx_t_7 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_f = __pyx_t_7;
/* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":241
@@ -16480,7 +17528,7 @@
if (likely(((PyObject *)__pyx_v_descr->names) != Py_None)) {
__pyx_t_1 = 0; __pyx_t_2 = ((PyObject *)__pyx_v_descr->names); __Pyx_INCREF(__pyx_t_2);
} else {
- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
for (;;) {
if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
@@ -16496,9 +17544,9 @@
* child, new_offset = fields
*
*/
- __pyx_1 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_1 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (!__pyx_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_1);
- if (!(likely(PyTuple_CheckExact(__pyx_1)) || (__pyx_1) == Py_None || (PyErr_Format(PyExc_TypeError, "Expected tuple, got %s", Py_TYPE(__pyx_1)->tp_name), 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(PyTuple_CheckExact(__pyx_1)) || (__pyx_1) == Py_None || (PyErr_Format(PyExc_TypeError, "Expected tuple, got %s", Py_TYPE(__pyx_1)->tp_name), 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_v_fields));
__pyx_v_fields = ((PyObject *)__pyx_1);
__pyx_1 = 0;
@@ -16513,7 +17561,7 @@
if (likely(((PyObject *)__pyx_v_fields) != Py_None) && likely(PyTuple_GET_SIZE(((PyObject *)__pyx_v_fields)) == 2)) {
PyObject* tuple = ((PyObject *)__pyx_v_fields);
__pyx_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_2);
- if (!(__Pyx_TypeTest(__pyx_2, __pyx_ptype_5numpy_dtype))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(__Pyx_TypeTest(__pyx_2, __pyx_ptype_5numpy_dtype))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_3);
__Pyx_DECREF(((PyObject *)__pyx_v_child));
__pyx_v_child = ((PyArray_Descr *)__pyx_2);
@@ -16523,7 +17571,7 @@
__pyx_3 = 0;
} else {
__Pyx_UnpackTupleError(((PyObject *)__pyx_v_fields), 2);
- {__pyx_filename = __pyx_f[7]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
/* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":705
@@ -16533,21 +17581,21 @@
* raise RuntimeError("Format string allocated too short, see comment in numpy.pxd")
*
*/
- __pyx_t_3 = PyInt_FromLong((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyNumber_Subtract(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Subtract(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_int_15, Py_LT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_int_15, Py_LT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_6) {
@@ -16558,17 +17606,17 @@
*
* if ((child.byteorder == '>' and little_endian) or
*/
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
__Pyx_INCREF(__pyx_kp_25);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_25);
__Pyx_GIVEREF(__pyx_kp_25);
- __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
__Pyx_Raise(__pyx_t_4, 0, 0);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- {__pyx_filename = __pyx_f[7]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L5;
}
__pyx_L5:;
@@ -16612,17 +17660,17 @@
* # One could encode it in the format string and have Cython
* # complain instead, BUT: < and > in format strings also imply
*/
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
__Pyx_INCREF(__pyx_kp_28);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_28);
__Pyx_GIVEREF(__pyx_kp_28);
- __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
__Pyx_Raise(__pyx_t_5, 0, 0);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- {__pyx_filename = __pyx_f[7]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L6;
}
__pyx_L6:;
@@ -16635,12 +17683,12 @@
* f += 1
*/
while (1) {
- __pyx_t_5 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (!__pyx_t_8) break;
@@ -16698,7 +17746,7 @@
* if end - f < 5:
* raise RuntimeError("Format string allocated too short.")
*/
- __pyx_t_4 = PyInt_FromLong(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_v_t);
__pyx_v_t = __pyx_t_4;
@@ -16721,17 +17769,17 @@
*
* # Until ticket #99 is fixed, use integers to avoid warnings
*/
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
__Pyx_INCREF(__pyx_kp_29);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_29);
__Pyx_GIVEREF(__pyx_kp_29);
- __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
__Pyx_Raise(__pyx_t_5, 0, 0);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- {__pyx_filename = __pyx_f[7]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L10;
}
__pyx_L10:;
@@ -16743,12 +17791,12 @@
* elif t == NPY_UBYTE: f[0] = 66 #"B"
* elif t == NPY_SHORT: f[0] = 104 #"h"
*/
- __pyx_t_5 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_8) {
(__pyx_v_f[0]) = 98;
@@ -16762,12 +17810,12 @@
* elif t == NPY_SHORT: f[0] = 104 #"h"
* elif t == NPY_USHORT: f[0] = 72 #"H"
*/
- __pyx_t_4 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_8) {
(__pyx_v_f[0]) = 66;
@@ -16781,12 +17829,12 @@
* elif t == NPY_USHORT: f[0] = 72 #"H"
* elif t == NPY_INT: f[0] = 105 #"i"
*/
- __pyx_t_5 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_8) {
(__pyx_v_f[0]) = 104;
@@ -16800,12 +17848,12 @@
* elif t == NPY_INT: f[0] = 105 #"i"
* elif t == NPY_UINT: f[0] = 73 #"I"
*/
- __pyx_t_4 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_8) {
(__pyx_v_f[0]) = 72;
@@ -16819,12 +17867,12 @@
* elif t == NPY_UINT: f[0] = 73 #"I"
* elif t == NPY_LONG: f[0] = 108 #"l"
*/
- __pyx_t_5 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_8) {
(__pyx_v_f[0]) = 105;
@@ -16838,12 +17886,12 @@
* elif t == NPY_LONG: f[0] = 108 #"l"
* elif t == NPY_ULONG: f[0] = 76 #"L"
*/
- __pyx_t_4 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_8) {
(__pyx_v_f[0]) = 73;
@@ -16857,12 +17905,12 @@
* elif t == NPY_ULONG: f[0] = 76 #"L"
* elif t == NPY_LONGLONG: f[0] = 113 #"q"
*/
- __pyx_t_5 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_8) {
(__pyx_v_f[0]) = 108;
@@ -16876,12 +17924,12 @@
* elif t == NPY_LONGLONG: f[0] = 113 #"q"
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
*/
- __pyx_t_4 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_8) {
(__pyx_v_f[0]) = 76;
@@ -16895,12 +17943,12 @@
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
* elif t == NPY_FLOAT: f[0] = 102 #"f"
*/
- __pyx_t_5 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_8) {
(__pyx_v_f[0]) = 113;
@@ -16914,12 +17962,12 @@
* elif t == NPY_FLOAT: f[0] = 102 #"f"
* elif t == NPY_DOUBLE: f[0] = 100 #"d"
*/
- __pyx_t_4 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_8) {
(__pyx_v_f[0]) = 81;
@@ -16933,12 +17981,12 @@
* elif t == NPY_DOUBLE: f[0] = 100 #"d"
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
*/
- __pyx_t_5 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_8) {
(__pyx_v_f[0]) = 102;
@@ -16952,12 +18000,12 @@
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
*/
- __pyx_t_4 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_8) {
(__pyx_v_f[0]) = 100;
@@ -16971,12 +18019,12 @@
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
*/
- __pyx_t_5 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_8) {
(__pyx_v_f[0]) = 103;
@@ -16990,12 +18038,12 @@
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
* elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
*/
- __pyx_t_4 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_8) {
(__pyx_v_f[0]) = 90;
@@ -17011,12 +18059,12 @@
* elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
* elif t == NPY_OBJECT: f[0] = 79 #"O"
*/
- __pyx_t_5 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_8) {
(__pyx_v_f[0]) = 90;
@@ -17032,12 +18080,12 @@
* elif t == NPY_OBJECT: f[0] = 79 #"O"
* else:
*/
- __pyx_t_4 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_8) {
(__pyx_v_f[0]) = 90;
@@ -17053,12 +18101,12 @@
* else:
* raise ValueError("unknown dtype code in numpy.pxd (%d)" % t)
*/
- __pyx_t_5 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_8) {
(__pyx_v_f[0]) = 79;
@@ -17073,19 +18121,19 @@
* f += 1
* else:
*/
- __pyx_t_4 = PyNumber_Remainder(__pyx_kp_30, __pyx_v_t); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Remainder(__pyx_kp_30, __pyx_v_t); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
__Pyx_GIVEREF(__pyx_t_4);
__pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
__Pyx_Raise(__pyx_t_4, 0, 0);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- {__pyx_filename = __pyx_f[7]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_L11:;
@@ -17108,7 +18156,7 @@
* return f
*
*/
- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_f = __pyx_t_9;
}
__pyx_L9:;
@@ -18782,6 +19830,7 @@
{__Pyx_NAMESTR("PlaneVoxelIntegration"), (PyCFunction)__pyx_pf_2yt_9amr_utils_PlaneVoxelIntegration, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
{__Pyx_NAMESTR("integrate_ray"), (PyCFunction)__pyx_pf_2yt_9amr_utils_integrate_ray, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
{__Pyx_NAMESTR("CICDeposit_3"), (PyCFunction)__pyx_pf_2yt_9amr_utils_CICDeposit_3, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("construct_boundary_relationships"), (PyCFunction)__pyx_pf_2yt_9amr_utils_construct_boundary_relationships, METH_O, __Pyx_DOCSTR(0)},
{0, 0, 0, 0}
};
@@ -18894,6 +19943,7 @@
{&__pyx_kp_leftEdge, __pyx_k_leftEdge, sizeof(__pyx_k_leftEdge), 1, 1, 1},
{&__pyx_kp_gridDimension, __pyx_k_gridDimension, sizeof(__pyx_k_gridDimension), 1, 1, 1},
{&__pyx_kp_cellSize, __pyx_k_cellSize, sizeof(__pyx_k_cellSize), 1, 1, 1},
+ {&__pyx_kp_contour_ids, __pyx_k_contour_ids, sizeof(__pyx_k_contour_ids), 1, 1, 1},
{&__pyx_kp_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 1, 1, 1},
{&__pyx_kp_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 1, 1},
{&__pyx_kp_range, __pyx_k_range, sizeof(__pyx_k_range), 1, 1, 1},
@@ -18916,11 +19966,15 @@
{&__pyx_kp_alpha, __pyx_k_alpha, sizeof(__pyx_k_alpha), 1, 1, 1},
{&__pyx_kp_x_bounds, __pyx_k_x_bounds, sizeof(__pyx_k_x_bounds), 1, 1, 1},
{&__pyx_kp_nbins, __pyx_k_nbins, sizeof(__pyx_k_nbins), 1, 1, 1},
+ {&__pyx_kp_light_color, __pyx_k_light_color, sizeof(__pyx_k_light_color), 1, 1, 1},
+ {&__pyx_kp_light_dir, __pyx_k_light_dir, sizeof(__pyx_k_light_dir), 1, 1, 1},
+ {&__pyx_kp_use_light, __pyx_k_use_light, sizeof(__pyx_k_use_light), 1, 1, 1},
{&__pyx_kp_LeftEdge, __pyx_k_LeftEdge, sizeof(__pyx_k_LeftEdge), 1, 1, 1},
{&__pyx_kp_RightEdge, __pyx_k_RightEdge, sizeof(__pyx_k_RightEdge), 1, 1, 1},
{&__pyx_kp_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 1, 1, 1},
{&__pyx_kp_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 1, 1, 1},
{&__pyx_kp_37, __pyx_k_37, sizeof(__pyx_k_37), 0, 1, 0},
+ {&__pyx_kp_append, __pyx_k_append, sizeof(__pyx_k_append), 1, 1, 1},
{&__pyx_kp___getbuffer__, __pyx_k___getbuffer__, sizeof(__pyx_k___getbuffer__), 1, 1, 1},
{&__pyx_kp___releasebuffer__, __pyx_k___releasebuffer__, sizeof(__pyx_k___releasebuffer__), 1, 1, 1},
{&__pyx_kp_info, __pyx_k_info, sizeof(__pyx_k_info), 1, 1, 1},
@@ -18939,8 +19993,8 @@
static int __Pyx_InitCachedBuiltins(void) {
__pyx_builtin_range = __Pyx_GetName(__pyx_b, __pyx_kp_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_builtin_xrange = __Pyx_GetName(__pyx_b, __pyx_kp_xrange); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_builtin_RuntimeError = __Pyx_GetName(__pyx_b, __pyx_kp_RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_kp_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_builtin_RuntimeError = __Pyx_GetName(__pyx_b, __pyx_kp_RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_kp_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
return 0;
__pyx_L1_error:;
return -1;
@@ -19036,19 +20090,19 @@
*(void(**)(void))&__pyx_vtable_2yt_9amr_utils_VectorPlane.copy_into = (void(*)(void))__pyx_f_2yt_9amr_utils_11VectorPlane_copy_into;
*(void(**)(void))&__pyx_vtable_2yt_9amr_utils_VectorPlane.copy_back = (void(*)(void))__pyx_f_2yt_9amr_utils_11VectorPlane_copy_back;
#endif
- if (PyType_Ready(&__pyx_type_2yt_9amr_utils_VectorPlane) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetVtable(__pyx_type_2yt_9amr_utils_VectorPlane.tp_dict, __pyx_vtabptr_2yt_9amr_utils_VectorPlane) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "VectorPlane", (PyObject *)&__pyx_type_2yt_9amr_utils_VectorPlane) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyType_Ready(&__pyx_type_2yt_9amr_utils_VectorPlane) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetVtable(__pyx_type_2yt_9amr_utils_VectorPlane.tp_dict, __pyx_vtabptr_2yt_9amr_utils_VectorPlane) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "VectorPlane", (PyObject *)&__pyx_type_2yt_9amr_utils_VectorPlane) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_2yt_9amr_utils_VectorPlane = &__pyx_type_2yt_9amr_utils_VectorPlane;
__pyx_vtabptr_2yt_9amr_utils_TransferFunctionProxy = &__pyx_vtable_2yt_9amr_utils_TransferFunctionProxy;
#if PY_MAJOR_VERSION >= 3
- __pyx_vtable_2yt_9amr_utils_TransferFunctionProxy.eval_transfer = (void (*)(struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t *))__pyx_f_2yt_9amr_utils_21TransferFunctionProxy_eval_transfer;
+ __pyx_vtable_2yt_9amr_utils_TransferFunctionProxy.eval_transfer = (void (*)(struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *))__pyx_f_2yt_9amr_utils_21TransferFunctionProxy_eval_transfer;
#else
*(void(**)(void))&__pyx_vtable_2yt_9amr_utils_TransferFunctionProxy.eval_transfer = (void(*)(void))__pyx_f_2yt_9amr_utils_21TransferFunctionProxy_eval_transfer;
#endif
- if (PyType_Ready(&__pyx_type_2yt_9amr_utils_TransferFunctionProxy) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetVtable(__pyx_type_2yt_9amr_utils_TransferFunctionProxy.tp_dict, __pyx_vtabptr_2yt_9amr_utils_TransferFunctionProxy) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "TransferFunctionProxy", (PyObject *)&__pyx_type_2yt_9amr_utils_TransferFunctionProxy) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyType_Ready(&__pyx_type_2yt_9amr_utils_TransferFunctionProxy) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetVtable(__pyx_type_2yt_9amr_utils_TransferFunctionProxy.tp_dict, __pyx_vtabptr_2yt_9amr_utils_TransferFunctionProxy) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "TransferFunctionProxy", (PyObject *)&__pyx_type_2yt_9amr_utils_TransferFunctionProxy) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_2yt_9amr_utils_TransferFunctionProxy = &__pyx_type_2yt_9amr_utils_TransferFunctionProxy;
__pyx_vtabptr_2yt_9amr_utils_PartitionedGrid = &__pyx_vtable_2yt_9amr_utils_PartitionedGrid;
#if PY_MAJOR_VERSION >= 3
@@ -19060,9 +20114,9 @@
*(void(**)(void))&__pyx_vtable_2yt_9amr_utils_PartitionedGrid.integrate_ray = (void(*)(void))__pyx_f_2yt_9amr_utils_15PartitionedGrid_integrate_ray;
*(void(**)(void))&__pyx_vtable_2yt_9amr_utils_PartitionedGrid.sample_values = (void(*)(void))__pyx_f_2yt_9amr_utils_15PartitionedGrid_sample_values;
#endif
- if (PyType_Ready(&__pyx_type_2yt_9amr_utils_PartitionedGrid) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetVtable(__pyx_type_2yt_9amr_utils_PartitionedGrid.tp_dict, __pyx_vtabptr_2yt_9amr_utils_PartitionedGrid) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "PartitionedGrid", (PyObject *)&__pyx_type_2yt_9amr_utils_PartitionedGrid) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyType_Ready(&__pyx_type_2yt_9amr_utils_PartitionedGrid) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetVtable(__pyx_type_2yt_9amr_utils_PartitionedGrid.tp_dict, __pyx_vtabptr_2yt_9amr_utils_PartitionedGrid) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "PartitionedGrid", (PyObject *)&__pyx_type_2yt_9amr_utils_PartitionedGrid) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_2yt_9amr_utils_PartitionedGrid = &__pyx_type_2yt_9amr_utils_PartitionedGrid;
__pyx_vtabptr_2yt_9amr_utils_GridFace = &__pyx_vtable_2yt_9amr_utils_GridFace;
#if PY_MAJOR_VERSION >= 3
@@ -19070,9 +20124,9 @@
#else
*(void(**)(void))&__pyx_vtable_2yt_9amr_utils_GridFace.proj_overlap = (void(*)(void))__pyx_f_2yt_9amr_utils_8GridFace_proj_overlap;
#endif
- if (PyType_Ready(&__pyx_type_2yt_9amr_utils_GridFace) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetVtable(__pyx_type_2yt_9amr_utils_GridFace.tp_dict, __pyx_vtabptr_2yt_9amr_utils_GridFace) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "GridFace", (PyObject *)&__pyx_type_2yt_9amr_utils_GridFace) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyType_Ready(&__pyx_type_2yt_9amr_utils_GridFace) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetVtable(__pyx_type_2yt_9amr_utils_GridFace.tp_dict, __pyx_vtabptr_2yt_9amr_utils_GridFace) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "GridFace", (PyObject *)&__pyx_type_2yt_9amr_utils_GridFace) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_2yt_9amr_utils_GridFace = &__pyx_type_2yt_9amr_utils_GridFace;
__pyx_vtabptr_2yt_9amr_utils_ProtoPrism = &__pyx_vtable_2yt_9amr_utils_ProtoPrism;
#if PY_MAJOR_VERSION >= 3
@@ -19080,15 +20134,15 @@
#else
*(void(**)(void))&__pyx_vtable_2yt_9amr_utils_ProtoPrism.split = (void(*)(void))__pyx_f_2yt_9amr_utils_10ProtoPrism_split;
#endif
- if (PyType_Ready(&__pyx_type_2yt_9amr_utils_ProtoPrism) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetVtable(__pyx_type_2yt_9amr_utils_ProtoPrism.tp_dict, __pyx_vtabptr_2yt_9amr_utils_ProtoPrism) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "ProtoPrism", (PyObject *)&__pyx_type_2yt_9amr_utils_ProtoPrism) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyType_Ready(&__pyx_type_2yt_9amr_utils_ProtoPrism) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetVtable(__pyx_type_2yt_9amr_utils_ProtoPrism.tp_dict, __pyx_vtabptr_2yt_9amr_utils_ProtoPrism) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "ProtoPrism", (PyObject *)&__pyx_type_2yt_9amr_utils_ProtoPrism) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_2yt_9amr_utils_ProtoPrism = &__pyx_type_2yt_9amr_utils_ProtoPrism;
/*--- Type import code ---*/
- __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr)); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject)); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject)); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject)); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr)); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject)); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject)); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject)); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/*--- Function import code ---*/
/*--- Execution code ---*/
@@ -19160,6 +20214,18 @@
if (PyObject_SetAttr(__pyx_m, __pyx_kp_np, __pyx_1) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":26
+ * """
+ *
+ * import numpy as np # <<<<<<<<<<<<<<
+ * cimport numpy as np
+ * cimport cython
+ */
+ __pyx_1 = __Pyx_Import(__pyx_kp_numpy, 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_1);
+ if (PyObject_SetAttr(__pyx_m, __pyx_kp_np, __pyx_1) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+
/* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/stdlib.pxd":2
*
* cdef extern from "stdlib.h" nogil: # <<<<<<<<<<<<<<
@@ -19192,6 +20258,7 @@
"Interpolators.pyx",
"RayIntegrators.pyx",
"CICDeposit.pyx",
+ "ContourFinding.pyx",
"numpy.pxd",
};
Modified: trunk/yt/amr_utils.pyx
==============================================================================
--- trunk/yt/amr_utils.pyx (original)
+++ trunk/yt/amr_utils.pyx Thu Jan 21 14:03:04 2010
@@ -40,4 +40,5 @@
include "_amr_utils/PointsInVolume.pyx"
include "_amr_utils/RayIntegrators.pyx"
include "_amr_utils/VolumeIntegrator.pyx"
-include "_amr_utils/CICDeposit.pyx"
\ No newline at end of file
+include "_amr_utils/CICDeposit.pyx"
+include "_amr_utils/ContourFinding.pyx"
Modified: trunk/yt/extensions/volume_rendering/TransferFunction.py
==============================================================================
--- trunk/yt/extensions/volume_rendering/TransferFunction.py (original)
+++ trunk/yt/extensions/volume_rendering/TransferFunction.py Thu Jan 21 14:03:04 2010
@@ -62,6 +62,9 @@
self.blue = TransferFunction(x_bounds, nbins)
self.alpha = TransferFunction(x_bounds, nbins)
self.funcs = (self.red, self.green, self.blue, self.alpha)
+ self.light_dir = (0.3,-0.2,0.5)
+ self.light_color = (0.10, 0.10, 0.10)
+ self.use_light = 0
def add_gaussian(self, location, width, height):
for tf, v in zip(self.funcs, height):
Modified: trunk/yt/extensions/volume_rendering/grid_partitioner.py
==============================================================================
--- trunk/yt/extensions/volume_rendering/grid_partitioner.py (original)
+++ trunk/yt/extensions/volume_rendering/grid_partitioner.py Thu Jan 21 14:03:04 2010
@@ -121,7 +121,7 @@
for g in new_grids: g.min_dds = dx
return na.array(new_grids, dtype='object')
-def export_partitioned_grids(grid_list, fn):
+def export_partitioned_grids(grid_list, fn, int_type=na.int64, float_type=na.float64):
f = h5py.File(fn, "w")
pbar = get_pbar("Writing Grids", len(grid_list))
nelem = sum((grid.my_data.size for grid in grid_list))
@@ -129,24 +129,24 @@
group = f.create_group("/PGrids")
group.attrs["min_dds"] = grid_list[0].min_dds
left_edge = na.concatenate([[grid.LeftEdge,] for grid in grid_list])
- f.create_dataset("/PGrids/LeftEdges", data=left_edge); del left_edge
+ f.create_dataset("/PGrids/LeftEdges", data=left_edge, dtype=float_type); del left_edge
right_edge = na.concatenate([[grid.RightEdge,] for grid in grid_list])
- f.create_dataset("/PGrids/RightEdges", data=right_edge); del right_edge
+ f.create_dataset("/PGrids/RightEdges", data=right_edge, dtype=float_type); del right_edge
dims = na.concatenate([[grid.my_data.shape[:],] for grid in grid_list])
- f.create_dataset("/PGrids/Dims", data=dims); del dims
+ f.create_dataset("/PGrids/Dims", data=dims, dtype=int_type); del dims
data = na.concatenate([grid.my_data.ravel() for grid in grid_list])
- f.create_dataset("/PGrids/Data", data=data); del data
+ f.create_dataset("/PGrids/Data", data=data, dtype=float_type); del data
f.close()
pbar.finish()
-def import_partitioned_grids(fn):
+def import_partitioned_grids(fn, int_type=na.int64, float_type=na.float64):
f = h5py.File(fn, "r")
n_groups = len(f.listnames())
grid_list = []
- dims = f["/PGrids/Dims"][:]
- left_edges = f["/PGrids/LeftEdges"][:]
- right_edges = f["/PGrids/RightEdges"][:]
- data = f["/PGrids/Data"][:]
+ dims = f["/PGrids/Dims"][:].astype(int_type)
+ left_edges = f["/PGrids/LeftEdges"][:].astype(float_type)
+ right_edges = f["/PGrids/RightEdges"][:].astype(float_type)
+ data = f["/PGrids/Data"][:].astype(float_type)
pbar = get_pbar("Reading Grids", dims.shape[0])
curpos = 0
dx = f["/PGrids"].attrs["min_dds"]
Modified: trunk/yt/extensions/volume_rendering/software_sampler.py
==============================================================================
--- trunk/yt/extensions/volume_rendering/software_sampler.py (original)
+++ trunk/yt/extensions/volume_rendering/software_sampler.py Thu Jan 21 14:03:04 2010
@@ -77,6 +77,13 @@
vp = VectorPlane(vectors, norm_vec, back_center,
(xp0, xp1, yp0, yp1), image, cp._x_vec, cp._y_vec)
+ tf.light_dir = cp._norm_vec + 0.5 * cp._x_vec + 0.5 * cp._y_vec
+ cx, cy, cz = 0.3, -0.3, 0.3
+ tf.light_dir = (cp._inv_mat[0,0]*cx + cp._inv_mat[0,1]*cy + cz,
+ cp._inv_mat[1,0]*cx + cp._inv_mat[1,1]*cy + cz,
+ cp._inv_mat[2,0]*cx + cp._inv_mat[2,1]*cy + cz)
+ print tf.light_dir
+
tfp = TransferFunctionProxy(tf)
pbar = get_pbar("Ray casting ", len(partitioned_grids))
Modified: trunk/yt/lagos/BaseDataTypes.py
==============================================================================
--- trunk/yt/lagos/BaseDataTypes.py (original)
+++ trunk/yt/lagos/BaseDataTypes.py Thu Jan 21 14:03:04 2010
@@ -1673,9 +1673,11 @@
for grid in self._grids:
pointI = self._get_point_indices(grid)
np = pointI[0].ravel().size
- new_field = na.ones(grid.ActiveDimensions, dtype=dtype) * default_val
+ if grid.has_key(field):
+ new_field = grid[field]
+ else:
+ new_field = na.ones(grid.ActiveDimensions, dtype=dtype) * default_val
new_field[pointI] = self[field][i:i+np]
- if grid.data.has_key(field): del grid.data[field]
grid[field] = new_field
i += np
Modified: trunk/yt/lagos/ContourFinder.py
==============================================================================
--- trunk/yt/lagos/ContourFinder.py (original)
+++ trunk/yt/lagos/ContourFinder.py Thu Jan 21 14:03:04 2010
@@ -72,7 +72,7 @@
# We want an algorithm that deals with growing a given contour to *all* the
# cells in a grid.
-def identify_contours(data_source, field, min_val, max_val, cached_fields=None):
+def old_identify_contours(data_source, field, min_val, max_val, cached_fields=None):
"""
Given a *data_source*, we will search for topologically connected sets
in *field* between *min_val* and *max_val*.
@@ -221,3 +221,103 @@
}
n_bad(0) += k;
"""
+
+def coalesce_join_tree(jtree1):
+ joins = defaultdict(set)
+ nj = jtree1.shape[0]
+ for i1 in range(nj):
+ current_new = jtree1[i1, 0]
+ current_old = jtree1[i1, 1]
+ for i2 in range(nj):
+ if jtree1[i2, 1] == current_new:
+ current_new = max(current_new, jtree1[i2, 0])
+ jtree1[i1, 0] = current_new
+ for i1 in range(nj):
+ joins[jtree1[i1, 0]].update([jtree1[i1, 1], jtree1[i1, 0]])
+ updated = -1
+ while updated != 0:
+ keys = list(reversed(sorted(joins.keys())))
+ updated = 0
+ for k1 in keys + keys[::-1]:
+ if k1 not in joins: continue
+ s1 = joins[k1]
+ for k2 in keys + keys[::-1]:
+ if k2 >= k1: continue
+ if k2 not in joins: continue
+ s2 = joins[k2]
+ if k2 in s1:
+ s1.update(joins.pop(k2))
+ updated += 1
+ elif not s1.isdisjoint(s2):
+ s1.update(joins.pop(k2))
+ s1.update([k2])
+ updated += 1
+ return joins
+
+def identify_contours(data_source, field, min_val, max_val,
+ cached_fields=None):
+ cur_max_id = na.sum([g.ActiveDimensions.prod() for g in data_source._grids])
+ pbar = get_pbar("First pass", len(data_source._grids))
+ grids = sorted(data_source._grids, key=lambda g: -g.Level)
+ total_contours = 0
+ tree = []
+ for gi,grid in enumerate(grids):
+ pbar.update(gi+1)
+ cm = data_source._get_cut_mask(grid)
+ if cm is True: cm = na.ones(grid.ActiveDimensions, dtype='bool')
+ local_ind = na.where( (min_val <= grid[field])
+ & (grid[field] <= max_val) & cm )
+ if local_ind[0].size == 0: continue
+ kk = na.arange(cur_max_id, cur_max_id-local_ind[0].size, -1)
+ grid["tempContours"] = na.ones(grid.ActiveDimensions, dtype='int64') * -1
+ grid["tempContours"][local_ind] = kk[:]
+ cur_max_id -= local_ind[0].size
+ xi_u,yi_u,zi_u = na.where(grid["tempContours"] > -1)
+ cor_order = na.argsort(-1*grid["tempContours"][(xi_u,yi_u,zi_u)])
+ fd_orig = grid["tempContours"].copy()
+ xi = xi_u[cor_order]
+ yi = yi_u[cor_order]
+ zi = zi_u[cor_order]
+ while PointCombine.FindContours(grid["tempContours"], xi, yi, zi) < 0:
+ pass
+ total_contours += na.unique(grid["tempContours"][grid["tempContours"] > -1]).size
+ new_contours = na.unique(grid["tempContours"][grid["tempContours"] > -1]).tolist()
+ tree += zip(new_contours, new_contours)
+ pbar.finish()
+ pbar = get_pbar("Calculating joins ", len(data_source._grids))
+ grid_set = set()
+ for gi,grid in enumerate(grids):
+ pbar.update(gi)
+ cg = grid.retrieve_ghost_zones(1, "tempContours", smoothed=False)
+ set.update(set(cg._grids))
+ fd = cg["tempContours"].astype('int64')
+ tree += amr_utils.construct_boundary_relationships(fd)
+ pbar.finish()
+ sort_new = na.array(list(set(tree)), dtype='int64')
+ mylog.info("Coalescing %s joins", sort_new.shape[0])
+ joins = coalesce_join_tree(sort_new)
+ pbar = get_pbar("Joining ", len(joins))
+ # This process could and should be done faster
+ for i, new in enumerate(sorted(joins.keys())):
+ pbar.update(i)
+ old_set = joins[new]
+ for old in old_set:
+ if old == new: continue
+ i1 = (data_source["tempContours"] == old)
+ data_source["tempContours"][i1] = new
+ pbar.finish()
+ data_source._flush_data_to_grids("tempContours", -1, dtype='int64')
+ del data_source.data["tempContours"] # Force a reload from the grids
+ data_source.get_data("tempContours", in_grids=True)
+ contour_ind = {}
+ for i,contour_id in enumerate(na.unique(data_source["tempContours"])):
+ if contour_id == -1: continue
+ contour_ind[i] = na.where(data_source["tempContours"] == contour_id)
+ mylog.debug("Contour id %s has %s cells", i, contour_ind[i][0].size)
+ i += 1
+ mylog.info("Identified %s contours between %0.5e and %0.5e",
+ len(contour_ind.keys()),min_val,max_val)
+ for grid in chain(grid_set):
+ grid.data.pop("tempContours", None)
+ del data_source.data["tempContours"]
+ return contour_ind
More information about the yt-svn
mailing list