[Yt-svn] yt-commit r1755 - trunk/yt
mturk at wrangler.dreamhost.com
mturk at wrangler.dreamhost.com
Thu Jun 24 08:39:17 PDT 2010
Author: mturk
Date: Thu Jun 24 08:39:16 2010
New Revision: 1755
URL: http://yt.enzotools.org/changeset/1755
Log:
Re-cythonized to include fixes for volume rendering, png writer and the
quad/octrees.
Modified:
trunk/yt/amr_utils.c
Modified: trunk/yt/amr_utils.c
==============================================================================
--- trunk/yt/amr_utils.c (original)
+++ trunk/yt/amr_utils.c Thu Jun 24 08:39:16 2010
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.12.1 on Wed May 26 15:47:26 2010 */
+/* Generated by Cython 0.12.1 on Thu Jun 24 08:38:56 2010 */
#define PY_SSIZE_T_CLEAN
#include "Python.h"
@@ -413,6 +413,23 @@
int pass_through;
};
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":39
+ * void *alloca(int)
+ *
+ * cdef struct QuadTreeNode: # <<<<<<<<<<<<<<
+ * np.float64_t *val
+ * np.float64_t weight_val
+ */
+
+struct __pyx_t_2yt_9amr_utils_QuadTreeNode {
+ __pyx_t_5numpy_float64_t *val;
+ __pyx_t_5numpy_float64_t weight_val;
+ __pyx_t_5numpy_int64_t pos[2];
+ int level;
+ int nvals;
+ struct __pyx_t_2yt_9amr_utils_QuadTreeNode *children[2][2];
+};
+
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":118
* return (bv + dd*dy*fit.idbin)
*
@@ -465,7 +482,7 @@
PyObject *grids;
};
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":549
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":569
* return 1
*
* cdef class ProtoPrism: # <<<<<<<<<<<<<<
@@ -498,7 +515,7 @@
int refined_pos;
};
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":517
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":537
* tf.eval_transfer(dt, self.dvs, rgba, grad)
*
* cdef class GridFace: # <<<<<<<<<<<<<<
@@ -515,6 +532,23 @@
__pyx_t_5numpy_float64_t right_edge[3];
};
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":99
+ * free(node)
+ *
+ * cdef class QuadTree: # <<<<<<<<<<<<<<
+ * cdef int nvals
+ * cdef np.int64_t po2[80]
+ */
+
+struct __pyx_obj_2yt_9amr_utils_QuadTree {
+ PyObject_HEAD
+ struct __pyx_vtabstruct_2yt_9amr_utils_QuadTree *__pyx_vtab;
+ int nvals;
+ __pyx_t_5numpy_int64_t po2[80];
+ struct __pyx_t_2yt_9amr_utils_QuadTreeNode ***root_nodes;
+ __pyx_t_5numpy_int64_t top_grid_dims[2];
+};
+
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":74
* np.float64_t *data, np.float64_t *grad)
*
@@ -540,13 +574,14 @@
int nv[2];
int vp_strides[3];
int im_strides[3];
+ int vd_strides[3];
PyObject *ax_vec;
PyObject *ay_vec;
__pyx_t_5numpy_float64_t *x_vec;
__pyx_t_5numpy_float64_t *y_vec;
};
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":294
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":299
* tv[offset + k] = fv[k]
*
* cdef class PartitionedGrid: # <<<<<<<<<<<<<<
@@ -572,7 +607,35 @@
};
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":549
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":537
+ * tf.eval_transfer(dt, self.dvs, rgba, grad)
+ *
+ * cdef class GridFace: # <<<<<<<<<<<<<<
+ * cdef int direction
+ * cdef public np.float64_t coord
+ */
+
+struct __pyx_vtabstruct_2yt_9amr_utils_GridFace {
+ int (*proj_overlap)(struct __pyx_obj_2yt_9amr_utils_GridFace *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *);
+};
+static struct __pyx_vtabstruct_2yt_9amr_utils_GridFace *__pyx_vtabptr_2yt_9amr_utils_GridFace;
+
+
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":118
+ * return (bv + dd*dy*fit.idbin)
+ *
+ * cdef class TransferFunctionProxy: # <<<<<<<<<<<<<<
+ * cdef int n_fields
+ * cdef int n_field_tables
+ */
+
+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 *, __pyx_t_5numpy_float64_t *);
+};
+static struct __pyx_vtabstruct_2yt_9amr_utils_TransferFunctionProxy *__pyx_vtabptr_2yt_9amr_utils_TransferFunctionProxy;
+
+
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":569
* return 1
*
* cdef class ProtoPrism: # <<<<<<<<<<<<<<
@@ -586,7 +649,24 @@
static struct __pyx_vtabstruct_2yt_9amr_utils_ProtoPrism *__pyx_vtabptr_2yt_9amr_utils_ProtoPrism;
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":223
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":99
+ * free(node)
+ *
+ * cdef class QuadTree: # <<<<<<<<<<<<<<
+ * cdef int nvals
+ * cdef np.int64_t po2[80]
+ */
+
+struct __pyx_vtabstruct_2yt_9amr_utils_QuadTree {
+ void (*add_to_position)(struct __pyx_obj_2yt_9amr_utils_QuadTree *, int, __pyx_t_5numpy_int64_t *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t);
+ struct __pyx_t_2yt_9amr_utils_QuadTreeNode *(*find_on_root_level)(struct __pyx_obj_2yt_9amr_utils_QuadTree *, __pyx_t_5numpy_int64_t *, int);
+ int (*count_at_level)(struct __pyx_obj_2yt_9amr_utils_QuadTree *, struct __pyx_t_2yt_9amr_utils_QuadTreeNode *, int);
+ int (*fill_from_level)(struct __pyx_obj_2yt_9amr_utils_QuadTree *, struct __pyx_t_2yt_9amr_utils_QuadTreeNode *, int, __pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *);
+};
+static struct __pyx_vtabstruct_2yt_9amr_utils_QuadTree *__pyx_vtabptr_2yt_9amr_utils_QuadTree;
+
+
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":222
* #rgba[i+3] += trgba[i] * (1.0 - rgba[i+3])*dt*trgba[i+3]
*
* cdef class VectorPlane: # <<<<<<<<<<<<<<
@@ -602,7 +682,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":294
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":299
* tv[offset + k] = fv[k]
*
* cdef class PartitionedGrid: # <<<<<<<<<<<<<<
@@ -617,34 +697,6 @@
};
static struct __pyx_vtabstruct_2yt_9amr_utils_PartitionedGrid *__pyx_vtabptr_2yt_9amr_utils_PartitionedGrid;
-
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":517
- * tf.eval_transfer(dt, self.dvs, rgba, grad)
- *
- * cdef class GridFace: # <<<<<<<<<<<<<<
- * cdef int direction
- * cdef public np.float64_t coord
- */
-
-struct __pyx_vtabstruct_2yt_9amr_utils_GridFace {
- int (*proj_overlap)(struct __pyx_obj_2yt_9amr_utils_GridFace *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *);
-};
-static struct __pyx_vtabstruct_2yt_9amr_utils_GridFace *__pyx_vtabptr_2yt_9amr_utils_GridFace;
-
-
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":118
- * return (bv + dd*dy*fit.idbin)
- *
- * cdef class TransferFunctionProxy: # <<<<<<<<<<<<<<
- * cdef int n_fields
- * cdef int n_field_tables
- */
-
-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 *, __pyx_t_5numpy_float64_t *);
-};
-static struct __pyx_vtabstruct_2yt_9amr_utils_TransferFunctionProxy *__pyx_vtabptr_2yt_9amr_utils_TransferFunctionProxy;
-
#ifndef CYTHON_REFNANNY
#define CYTHON_REFNANNY 0
#endif
@@ -994,6 +1046,8 @@
static CYTHON_INLINE png_uint_32 __Pyx_PyInt_from_py_png_uint_32(PyObject *);
+static CYTHON_INLINE long __Pyx_pow_long(long, long); /* proto */
+
#if CYTHON_CCOMPLEX
#ifdef __cplusplus
#define __Pyx_CREAL(z) ((z).real())
@@ -1105,6 +1159,8 @@
static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
+static void __Pyx_WriteUnraisable(const char *name); /*proto*/
+
static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size, int strict); /*proto*/
@@ -1151,6 +1207,7 @@
static PyTypeObject *__pyx_ptype_2yt_9amr_utils_PartitionedGrid = 0;
static PyTypeObject *__pyx_ptype_2yt_9amr_utils_GridFace = 0;
static PyTypeObject *__pyx_ptype_2yt_9amr_utils_ProtoPrism = 0;
+static PyTypeObject *__pyx_ptype_2yt_9amr_utils_QuadTree = 0;
static CYTHON_INLINE void __pyx_f_2yt_9amr_utils_set_rotated_pos(__pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t (*)[3], __pyx_t_5numpy_float64_t *, int, int, int); /*proto*/
static void __pyx_f_2yt_9amr_utils_normalize_vector(__pyx_t_5numpy_float64_t *); /*proto*/
static void __pyx_f_2yt_9amr_utils_get_cross_product(__pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *); /*proto*/
@@ -1166,6 +1223,10 @@
static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_2yt_9amr_utils_i64max(__pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t); /*proto*/
static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_2yt_9amr_utils_i64min(__pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t); /*proto*/
static CYTHON_INLINE int __pyx_f_2yt_9amr_utils_are_neighbors(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /*proto*/
+static void __pyx_f_2yt_9amr_utils_QTN_add_value(struct __pyx_t_2yt_9amr_utils_QuadTreeNode *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t); /*proto*/
+static void __pyx_f_2yt_9amr_utils_QTN_refine(struct __pyx_t_2yt_9amr_utils_QuadTreeNode *); /*proto*/
+static struct __pyx_t_2yt_9amr_utils_QuadTreeNode *__pyx_f_2yt_9amr_utils_QTN_initialize(__pyx_t_5numpy_int64_t *, int, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t, int); /*proto*/
+static void __pyx_f_2yt_9amr_utils_QTN_free(struct __pyx_t_2yt_9amr_utils_QuadTreeNode *); /*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' };
@@ -1222,6 +1283,7 @@
static char __pyx_k__Zd[] = "Zd";
static char __pyx_k__Zf[] = "Zf";
static char __pyx_k__Zg[] = "Zg";
+static char __pyx_k__cm[] = "cm";
static char __pyx_k__dx[] = "dx";
static char __pyx_k__dy[] = "dy";
static char __pyx_k__dz[] = "dz";
@@ -1254,7 +1316,12 @@
static char __pyx_k__obj[] = "obj";
static char __pyx_k__pdx[] = "pdx";
static char __pyx_k__pdy[] = "pdy";
+static char __pyx_k__po2[] = "po2";
+static char __pyx_k__pos[] = "pos";
+static char __pyx_k__pxs[] = "pxs";
+static char __pyx_k__pys[] = "pys";
static char __pyx_k__red[] = "red";
+static char __pyx_k__val[] = "val";
static char __pyx_k__base[] = "base";
static char __pyx_k__blue[] = "blue";
static char __pyx_k__copy[] = "copy";
@@ -1299,14 +1366,17 @@
static char __pyx_k__names[] = "names";
static char __pyx_k__nbins[] = "nbins";
static char __pyx_k__numpy[] = "numpy";
+static char __pyx_k__nvals[] = "nvals";
static char __pyx_k__order[] = "order";
static char __pyx_k__pmask[] = "pmask";
+static char __pyx_k__pvals[] = "pvals";
static char __pyx_k__range[] = "range";
static char __pyx_k__shape[] = "shape";
static char __pyx_k__split[] = "split";
static char __pyx_k__stack[] = "stack";
static char __pyx_k__sweep[] = "sweep";
static char __pyx_k__table[] = "table";
+static char __pyx_k__wvals[] = "wvals";
static char __pyx_k__x_vec[] = "x_vec";
static char __pyx_k__y_vec[] = "y_vec";
static char __pyx_k__zeros[] = "zeros";
@@ -1356,6 +1426,7 @@
static char __pyx_k____main__[] = "__main__";
static char __pyx_k____test__[] = "__test__";
static char __pyx_k__cellSize[] = "cellSize";
+static char __pyx_k__children[] = "children";
static char __pyx_k__field_id[] = "field_id";
static char __pyx_k__filename[] = "filename";
static char __pyx_k__grid_dds[] = "grid_dds";
@@ -1382,35 +1453,45 @@
static char __pyx_k__box_center[] = "box_center";
static char __pyx_k__box_origin[] = "box_origin";
static char __pyx_k__child_mask[] = "child_mask";
+static char __pyx_k__count_only[] = "count_only";
static char __pyx_k__dimensions[] = "dimensions";
static char __pyx_k__im_strides[] = "im_strides";
static char __pyx_k__left_edges[] = "left_edges";
static char __pyx_k__npositions[] = "npositions";
static char __pyx_k__output_pos[] = "output_pos";
static char __pyx_k__right_edge[] = "right_edge";
+static char __pyx_k__root_nodes[] = "root_nodes";
static char __pyx_k__slab_start[] = "slab_start";
static char __pyx_k__suboffsets[] = "suboffsets";
+static char __pyx_k__vd_strides[] = "vd_strides";
static char __pyx_k__vp_strides[] = "vp_strides";
+static char __pyx_k__weight_val[] = "weight_val";
static char __pyx_k__box_lengths[] = "box_lengths";
static char __pyx_k__box_vectors[] = "box_vectors";
static char __pyx_k__break_first[] = "break_first";
static char __pyx_k__refined_pos[] = "refined_pos";
+static char __pyx_k__start_index[] = "start_index";
static char __pyx_k__RuntimeError[] = "RuntimeError";
static char __pyx_k__field_tables[] = "field_tables";
static char __pyx_k__pass_through[] = "pass_through";
static char __pyx_k__proj_overlap[] = "proj_overlap";
+static char __pyx_k__pweight_vals[] = "pweight_vals";
static char __pyx_k__child_indices[] = "child_indices";
static char __pyx_k__eval_transfer[] = "eval_transfer";
static char __pyx_k__gridDimension[] = "gridDimension";
static char __pyx_k__integrate_ray[] = "integrate_ray";
static char __pyx_k__sample_values[] = "sample_values";
static char __pyx_k__subgrid_faces[] = "subgrid_faces";
+static char __pyx_k__top_grid_dims[] = "top_grid_dims";
static char __pyx_k__TransferShells[] = "TransferShells";
+static char __pyx_k__count_at_level[] = "count_at_level";
static char __pyx_k__get_start_stop[] = "get_start_stop";
static char __pyx_k__grid_left_edge[] = "grid_left_edge";
static char __pyx_k__n_field_tables[] = "n_field_tables";
static char __pyx_k__parent_grid_id[] = "parent_grid_id";
+static char __pyx_k__add_to_position[] = "add_to_position";
static char __pyx_k__field_table_ids[] = "field_table_ids";
+static char __pyx_k__fill_from_level[] = "fill_from_level";
static char __pyx_k__grid_left_edges[] = "grid_left_edges";
static char __pyx_k__grid_right_edge[] = "grid_right_edge";
static char __pyx_k__my_field_tables[] = "my_field_tables";
@@ -1420,6 +1501,7 @@
static char __pyx_k__grid_right_edges[] = "grid_right_edges";
static char __pyx_k__weight_field_ids[] = "weight_field_ids";
static char __pyx_k__weight_table_ids[] = "weight_table_ids";
+static char __pyx_k__find_on_root_level[] = "find_on_root_level";
static PyObject *__pyx_n_s_1;
static PyObject *__pyx_kp_u_10;
static PyObject *__pyx_kp_u_11;
@@ -1446,6 +1528,7 @@
static PyObject *__pyx_n_s____test__;
static PyObject *__pyx_n_s__a;
static PyObject *__pyx_n_s__acenter;
+static PyObject *__pyx_n_s__add_to_position;
static PyObject *__pyx_n_s__aimage;
static PyObject *__pyx_n_s__alpha;
static PyObject *__pyx_n_s__avp_dir;
@@ -1468,11 +1551,15 @@
static PyObject *__pyx_n_s__center;
static PyObject *__pyx_n_s__child_indices;
static PyObject *__pyx_n_s__child_mask;
+static PyObject *__pyx_n_s__children;
+static PyObject *__pyx_n_s__cm;
static PyObject *__pyx_n_s__coord;
static PyObject *__pyx_n_s__copy;
static PyObject *__pyx_n_s__copy_back;
static PyObject *__pyx_n_s__copy_into;
static PyObject *__pyx_n_s__corners;
+static PyObject *__pyx_n_s__count_at_level;
+static PyObject *__pyx_n_s__count_only;
static PyObject *__pyx_n_s__curpos;
static PyObject *__pyx_n_s__data;
static PyObject *__pyx_n_s__dbin;
@@ -1497,6 +1584,8 @@
static PyObject *__pyx_n_s__field_tables;
static PyObject *__pyx_n_s__fields;
static PyObject *__pyx_n_s__filename;
+static PyObject *__pyx_n_s__fill_from_level;
+static PyObject *__pyx_n_s__find_on_root_level;
static PyObject *__pyx_n_s__float32;
static PyObject *__pyx_n_s__float64;
static PyObject *__pyx_n_s__floor;
@@ -1566,6 +1655,7 @@
static PyObject *__pyx_n_s__nshells;
static PyObject *__pyx_n_s__numpy;
static PyObject *__pyx_n_s__nv;
+static PyObject *__pyx_n_s__nvals;
static PyObject *__pyx_n_s__o_s;
static PyObject *__pyx_n_s__obj;
static PyObject *__pyx_n_s__offset;
@@ -1577,20 +1667,27 @@
static PyObject *__pyx_n_s__pdx;
static PyObject *__pyx_n_s__pdy;
static PyObject *__pyx_n_s__pmask;
+static PyObject *__pyx_n_s__po2;
static PyObject *__pyx_n_s__points;
+static PyObject *__pyx_n_s__pos;
static PyObject *__pyx_n_s__posx;
static PyObject *__pyx_n_s__posy;
static PyObject *__pyx_n_s__posz;
static PyObject *__pyx_n_s__proj_overlap;
static PyObject *__pyx_n_s__pv;
+static PyObject *__pyx_n_s__pvals;
+static PyObject *__pyx_n_s__pweight_vals;
static PyObject *__pyx_n_s__px;
+static PyObject *__pyx_n_s__pxs;
static PyObject *__pyx_n_s__py;
+static PyObject *__pyx_n_s__pys;
static PyObject *__pyx_n_s__range;
static PyObject *__pyx_n_s__readonly;
static PyObject *__pyx_n_s__red;
static PyObject *__pyx_n_s__refined;
static PyObject *__pyx_n_s__refined_pos;
static PyObject *__pyx_n_s__right_edge;
+static PyObject *__pyx_n_s__root_nodes;
static PyObject *__pyx_n_s__root_size;
static PyObject *__pyx_n_s__rot_mat;
static PyObject *__pyx_n_s__sample_values;
@@ -1600,6 +1697,7 @@
static PyObject *__pyx_n_s__slab_start;
static PyObject *__pyx_n_s__split;
static PyObject *__pyx_n_s__stack;
+static PyObject *__pyx_n_s__start_index;
static PyObject *__pyx_n_s__strides;
static PyObject *__pyx_n_s__subgrid_faces;
static PyObject *__pyx_n_s__suboffsets;
@@ -1608,11 +1706,14 @@
static PyObject *__pyx_n_s__tables;
static PyObject *__pyx_n_s__tf;
static PyObject *__pyx_n_s__tf_obj;
+static PyObject *__pyx_n_s__top_grid_dims;
static PyObject *__pyx_n_s__type_num;
static PyObject *__pyx_n_s__u;
static PyObject *__pyx_n_s__ug;
static PyObject *__pyx_n_s__v;
+static PyObject *__pyx_n_s__val;
static PyObject *__pyx_n_s__values;
+static PyObject *__pyx_n_s__vd_strides;
static PyObject *__pyx_n_s__vp;
static PyObject *__pyx_n_s__vp_dir;
static PyObject *__pyx_n_s__vp_pos;
@@ -1621,6 +1722,8 @@
static PyObject *__pyx_n_s__weight_field_ids;
static PyObject *__pyx_n_s__weight_table_id;
static PyObject *__pyx_n_s__weight_table_ids;
+static PyObject *__pyx_n_s__weight_val;
+static PyObject *__pyx_n_s__wvals;
static PyObject *__pyx_n_s__x;
static PyObject *__pyx_n_s__x_bins;
static PyObject *__pyx_n_s__x_bounds;
@@ -13450,96 +13553,17 @@
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_dvs, __pyx_t_5numpy_float64_t *__pyx_v_rgba, __pyx_t_5numpy_float64_t *__pyx_v_grad) {
int __pyx_v_i;
int __pyx_v_fid;
- int __pyx_v_use;
__pyx_t_5numpy_float64_t __pyx_v_ta;
__pyx_t_5numpy_float64_t __pyx_v_trgba[6];
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
- int __pyx_t_4;
- int __pyx_t_5;
__Pyx_RefNannySetupContext("eval_transfer");
__Pyx_INCREF((PyObject *)__pyx_v_self);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":188
- * # early-cutoff. We check all the field tables, because we want to be
- * # able to attenuate even in the presence of no emissivity.
- * use = 0 # <<<<<<<<<<<<<<
- * for i in range(self.n_field_tables):
- * fid = self.field_tables[i].field_id
- */
- __pyx_v_use = 0;
-
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":189
- * # able to attenuate even in the presence of no emissivity.
- * use = 0
- * for i in range(self.n_field_tables): # <<<<<<<<<<<<<<
- * fid = self.field_tables[i].field_id
- * if (dvs[fid] >= self.field_tables[i].bounds[0]) and \
- */
- __pyx_t_1 = __pyx_v_self->n_field_tables;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
-
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":190
- * use = 0
- * for i in range(self.n_field_tables):
- * fid = self.field_tables[i].field_id # <<<<<<<<<<<<<<
- * if (dvs[fid] >= self.field_tables[i].bounds[0]) and \
- * (dvs[fid] <= self.field_tables[i].bounds[1]):
- */
- __pyx_v_fid = (__pyx_v_self->field_tables[__pyx_v_i]).field_id;
-
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":191
- * for i in range(self.n_field_tables):
- * fid = self.field_tables[i].field_id
- * if (dvs[fid] >= self.field_tables[i].bounds[0]) and \ # <<<<<<<<<<<<<<
- * (dvs[fid] <= self.field_tables[i].bounds[1]):
- * use = 1
- */
- __pyx_t_3 = ((__pyx_v_dvs[__pyx_v_fid]) >= ((__pyx_v_self->field_tables[__pyx_v_i]).bounds[0]));
- if (__pyx_t_3) {
-
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":192
- * fid = self.field_tables[i].field_id
- * if (dvs[fid] >= self.field_tables[i].bounds[0]) and \
- * (dvs[fid] <= self.field_tables[i].bounds[1]): # <<<<<<<<<<<<<<
- * use = 1
- * break
- */
- __pyx_t_4 = ((__pyx_v_dvs[__pyx_v_fid]) <= ((__pyx_v_self->field_tables[__pyx_v_i]).bounds[1]));
- __pyx_t_5 = __pyx_t_4;
- } else {
- __pyx_t_5 = __pyx_t_3;
- }
- if (__pyx_t_5) {
-
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":193
- * if (dvs[fid] >= self.field_tables[i].bounds[0]) and \
- * (dvs[fid] <= self.field_tables[i].bounds[1]):
- * use = 1 # <<<<<<<<<<<<<<
- * break
- * for i in range(self.n_field_tables):
- */
- __pyx_v_use = 1;
-
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":194
- * (dvs[fid] <= self.field_tables[i].bounds[1]):
- * use = 1
- * break # <<<<<<<<<<<<<<
- * for i in range(self.n_field_tables):
- * self.istorage[i] = FIT_get_value(&self.field_tables[i], dvs)
- */
- goto __pyx_L4_break;
- goto __pyx_L5;
- }
- __pyx_L5:;
- }
- __pyx_L4_break:;
-
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":195
- * use = 1
- * break
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":194
+ * # use = 1
+ * # break
* for i in range(self.n_field_tables): # <<<<<<<<<<<<<<
* self.istorage[i] = FIT_get_value(&self.field_tables[i], dvs)
* # We have to do this after the interpolation
@@ -13548,8 +13572,8 @@
for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
__pyx_v_i = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":196
- * break
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":195
+ * # break
* for i in range(self.n_field_tables):
* self.istorage[i] = FIT_get_value(&self.field_tables[i], dvs) # <<<<<<<<<<<<<<
* # We have to do this after the interpolation
@@ -13558,7 +13582,7 @@
(__pyx_v_self->istorage[__pyx_v_i]) = __pyx_f_2yt_9amr_utils_FIT_get_value((&(__pyx_v_self->field_tables[__pyx_v_i])), __pyx_v_dvs);
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":198
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":197
* self.istorage[i] = FIT_get_value(&self.field_tables[i], dvs)
* # We have to do this after the interpolation
* for i in range(self.n_field_tables): # <<<<<<<<<<<<<<
@@ -13569,7 +13593,7 @@
for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
__pyx_v_i = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":199
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":198
* # We have to do this after the interpolation
* for i in range(self.n_field_tables):
* fid = self.field_tables[i].weight_table_id # <<<<<<<<<<<<<<
@@ -13578,22 +13602,22 @@
*/
__pyx_v_fid = (__pyx_v_self->field_tables[__pyx_v_i]).weight_table_id;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":200
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":199
* for i in range(self.n_field_tables):
* fid = self.field_tables[i].weight_table_id
* if fid != -1: self.istorage[i] *= self.istorage[fid] # <<<<<<<<<<<<<<
* for i in range(6):
* trgba[i] = self.istorage[self.field_table_ids[i]]
*/
- __pyx_t_5 = (__pyx_v_fid != -1);
- if (__pyx_t_5) {
+ __pyx_t_3 = (__pyx_v_fid != -1);
+ if (__pyx_t_3) {
(__pyx_v_self->istorage[__pyx_v_i]) *= (__pyx_v_self->istorage[__pyx_v_fid]);
- goto __pyx_L10;
+ goto __pyx_L7;
}
- __pyx_L10:;
+ __pyx_L7:;
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":201
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":200
* fid = self.field_tables[i].weight_table_id
* if fid != -1: self.istorage[i] *= self.istorage[fid]
* for i in range(6): # <<<<<<<<<<<<<<
@@ -13603,7 +13627,7 @@
for (__pyx_t_1 = 0; __pyx_t_1 < 6; __pyx_t_1+=1) {
__pyx_v_i = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":202
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":201
* if fid != -1: self.istorage[i] *= self.istorage[fid]
* for i in range(6):
* trgba[i] = self.istorage[self.field_table_ids[i]] # <<<<<<<<<<<<<<
@@ -13613,7 +13637,7 @@
(__pyx_v_trgba[__pyx_v_i]) = (__pyx_v_self->istorage[(__pyx_v_self->field_table_ids[__pyx_v_i])]);
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":212
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":211
* # integration here:
* # I_{i+1} = ds * C_i + (1.0 - ds*alpha_i) * I_i
* for i in range(3): # <<<<<<<<<<<<<<
@@ -13623,7 +13647,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":216
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":215
* # slice. Previously it was ill-defined, but represented some
* # measure of emissivity.
* ta = fmax((1.0 - dt*trgba[i+3]), 0.0) # <<<<<<<<<<<<<<
@@ -13632,7 +13656,7 @@
*/
__pyx_v_ta = __pyx_f_2yt_9amr_utils_fmax((1.0 - (__pyx_v_dt * (__pyx_v_trgba[(__pyx_v_i + 3)]))), 0.0);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":217
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":216
* # measure of emissivity.
* ta = fmax((1.0 - dt*trgba[i+3]), 0.0)
* rgba[i ] = dt*trgba[i ] + ta * rgba[i ] # <<<<<<<<<<<<<<
@@ -13651,7 +13675,7 @@
*
* def __cinit__(self, # <<<<<<<<<<<<<<
* np.ndarray[np.float64_t, ndim=3] vp_pos,
- * np.ndarray[np.float64_t, ndim=1] vp_dir,
+ * np.ndarray vp_dir,
*/
static int __pyx_pf_2yt_9amr_utils_11VectorPlane___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
@@ -13667,9 +13691,6 @@
Py_buffer __pyx_bstruct_center;
Py_ssize_t __pyx_bstride_0_center = 0;
Py_ssize_t __pyx_bshape_0_center = 0;
- Py_buffer __pyx_bstruct_vp_dir;
- Py_ssize_t __pyx_bstride_0_vp_dir = 0;
- Py_ssize_t __pyx_bshape_0_vp_dir = 0;
Py_buffer __pyx_bstruct_x_vec;
Py_ssize_t __pyx_bstride_0_x_vec = 0;
Py_ssize_t __pyx_bshape_0_x_vec = 0;
@@ -13694,6 +13715,7 @@
int __pyx_t_1;
PyObject *__pyx_t_2 = NULL;
__pyx_t_5numpy_float64_t __pyx_t_3;
+ int __pyx_t_4;
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__vp_pos,&__pyx_n_s__vp_dir,&__pyx_n_s__center,&__pyx_n_s__bounds,&__pyx_n_s__image,&__pyx_n_s__x_vec,&__pyx_n_s__y_vec,0};
__Pyx_RefNannySetupContext("__cinit__");
if (unlikely(__pyx_kwds)) {
@@ -13789,7 +13811,6 @@
__Pyx_INCREF((PyObject *)__pyx_v_x_vec);
__Pyx_INCREF((PyObject *)__pyx_v_y_vec);
__pyx_bstruct_vp_pos.buf = NULL;
- __pyx_bstruct_vp_dir.buf = NULL;
__pyx_bstruct_center.buf = NULL;
__pyx_bstruct_image.buf = NULL;
__pyx_bstruct_x_vec.buf = NULL;
@@ -13808,12 +13829,6 @@
__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[2]; __pyx_lineno = 233; __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[2]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_bstride_0_center = __pyx_bstruct_center.strides[0];
@@ -14036,7 +14051,7 @@
* for i in range(3):
* self.vp_strides[i] = vp_pos.strides[i] / 8 # <<<<<<<<<<<<<<
* self.im_strides[i] = image.strides[i] / 8
- *
+ * if vp_dir.ndim > 1:
*/
(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->vp_strides[__pyx_v_i]) = ((__pyx_v_vp_pos->strides[__pyx_v_i]) / 8);
@@ -14044,11 +14059,57 @@
* for i in range(3):
* self.vp_strides[i] = vp_pos.strides[i] / 8
* self.im_strides[i] = image.strides[i] / 8 # <<<<<<<<<<<<<<
+ * if vp_dir.ndim > 1:
+ * for i in range(3):
+ */
+ (((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->im_strides[__pyx_v_i]) = ((__pyx_v_image->strides[__pyx_v_i]) / 8);
+ }
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":262
+ * self.vp_strides[i] = vp_pos.strides[i] / 8
+ * self.im_strides[i] = image.strides[i] / 8
+ * if vp_dir.ndim > 1: # <<<<<<<<<<<<<<
+ * for i in range(3):
+ * self.vd_strides[i] = vp_dir.strides[i] / 8
+ */
+ __pyx_t_4 = (__pyx_v_vp_dir->nd > 1);
+ if (__pyx_t_4) {
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":263
+ * self.im_strides[i] = image.strides[i] / 8
+ * if vp_dir.ndim > 1:
+ * for i in range(3): # <<<<<<<<<<<<<<
+ * self.vd_strides[i] = vp_dir.strides[i] / 8
+ * else:
+ */
+ 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":264
+ * if vp_dir.ndim > 1:
+ * for i in range(3):
+ * self.vd_strides[i] = vp_dir.strides[i] / 8 # <<<<<<<<<<<<<<
+ * else:
+ * self.vd_strides[0] = self.vd_strides[1] = self.vd_strides[2] = -1
+ */
+ (((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->vd_strides[__pyx_v_i]) = ((__pyx_v_vp_dir->strides[__pyx_v_i]) / 8);
+ }
+ goto __pyx_L10;
+ }
+ /*else*/ {
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":266
+ * self.vd_strides[i] = vp_dir.strides[i] / 8
+ * else:
+ * self.vd_strides[0] = self.vd_strides[1] = self.vd_strides[2] = -1 # <<<<<<<<<<<<<<
*
* @cython.boundscheck(False)
*/
- (((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->im_strides[__pyx_v_i]) = ((__pyx_v_image->strides[__pyx_v_i]) / 8);
+ (((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->vd_strides[0]) = -1;
+ (((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->vd_strides[1]) = -1;
+ (((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->vd_strides[2]) = -1;
}
+ __pyx_L10:;
__pyx_r = 0;
goto __pyx_L0;
@@ -14057,7 +14118,6 @@
{ PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
__Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_center);
- __Pyx_SafeReleaseBuffer(&__pyx_bstruct_vp_dir);
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_x_vec);
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_y_vec);
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_image);
@@ -14068,7 +14128,6 @@
goto __pyx_L2;
__pyx_L0:;
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_center);
- __Pyx_SafeReleaseBuffer(&__pyx_bstruct_vp_dir);
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_x_vec);
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_y_vec);
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_image);
@@ -14086,7 +14145,7 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":265
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":270
* @cython.boundscheck(False)
* @cython.wraparound(False)
* cdef void get_start_stop(self, np.float64_t *ex, int *rv): # <<<<<<<<<<<<<<
@@ -14102,7 +14161,7 @@
__Pyx_RefNannySetupContext("get_start_stop");
__Pyx_INCREF((PyObject *)__pyx_v_self);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":269
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":274
* cdef np.float64_t cx, cy
* cdef int i
* cx = cy = 0.0 # <<<<<<<<<<<<<<
@@ -14112,7 +14171,7 @@
__pyx_v_cx = 0.0;
__pyx_v_cy = 0.0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":270
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":275
* cdef int i
* cx = cy = 0.0
* for i in range(3): # <<<<<<<<<<<<<<
@@ -14122,7 +14181,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":271
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":276
* cx = cy = 0.0
* for i in range(3):
* cx += self.center[i] * self.x_vec[i] # <<<<<<<<<<<<<<
@@ -14131,7 +14190,7 @@
*/
__pyx_v_cx += ((__pyx_v_self->center[__pyx_v_i]) * (__pyx_v_self->x_vec[__pyx_v_i]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":272
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":277
* for i in range(3):
* cx += self.center[i] * self.x_vec[i]
* cy += self.center[i] * self.y_vec[i] # <<<<<<<<<<<<<<
@@ -14141,7 +14200,7 @@
__pyx_v_cy += ((__pyx_v_self->center[__pyx_v_i]) * (__pyx_v_self->y_vec[__pyx_v_i]));
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":273
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":278
* cx += self.center[i] * self.x_vec[i]
* cy += self.center[i] * self.y_vec[i]
* rv[0] = lrint((ex[0] - cx - self.bounds[0])/self.pdx) # <<<<<<<<<<<<<<
@@ -14150,7 +14209,7 @@
*/
(__pyx_v_rv[0]) = lrint(((((__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":274
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":279
* cy += self.center[i] * self.y_vec[i]
* rv[0] = lrint((ex[0] - cx - self.bounds[0])/self.pdx)
* rv[1] = rv[0] + lrint((ex[1] - ex[0])/self.pdx) # <<<<<<<<<<<<<<
@@ -14159,7 +14218,7 @@
*/
(__pyx_v_rv[1]) = ((__pyx_v_rv[0]) + lrint((((__pyx_v_ex[1]) - (__pyx_v_ex[0])) / __pyx_v_self->pdx)));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":275
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":280
* rv[0] = lrint((ex[0] - cx - self.bounds[0])/self.pdx)
* rv[1] = rv[0] + lrint((ex[1] - ex[0])/self.pdx)
* rv[2] = lrint((ex[2] - cy - self.bounds[2])/self.pdy) # <<<<<<<<<<<<<<
@@ -14168,7 +14227,7 @@
*/
(__pyx_v_rv[2]) = lrint(((((__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":276
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":281
* rv[1] = rv[0] + lrint((ex[1] - ex[0])/self.pdx)
* rv[2] = lrint((ex[2] - cy - self.bounds[2])/self.pdy)
* rv[3] = rv[2] + lrint((ex[3] - ex[2])/self.pdy) # <<<<<<<<<<<<<<
@@ -14181,7 +14240,7 @@
__Pyx_RefNannyFinishContext();
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":278
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":283
* rv[3] = rv[2] + lrint((ex[3] - ex[2])/self.pdy)
*
* cdef inline void copy_into(self, np.float64_t *fv, np.float64_t *tv, # <<<<<<<<<<<<<<
@@ -14197,7 +14256,7 @@
__Pyx_RefNannySetupContext("copy_into");
__Pyx_INCREF((PyObject *)__pyx_v_self);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":283
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":288
* # to-vector is flat and 'ni' long
* cdef int k
* cdef int offset = strides[0] * i + strides[1] * j # <<<<<<<<<<<<<<
@@ -14206,7 +14265,7 @@
*/
__pyx_v_offset = (((__pyx_v_strides[0]) * __pyx_v_i) + ((__pyx_v_strides[1]) * __pyx_v_j));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":284
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":289
* cdef int k
* cdef int offset = strides[0] * i + strides[1] * j
* for k in range(nk): # <<<<<<<<<<<<<<
@@ -14217,7 +14276,7 @@
for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
__pyx_v_k = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":285
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":290
* cdef int offset = strides[0] * i + strides[1] * j
* for k in range(nk):
* tv[k] = fv[offset + k] # <<<<<<<<<<<<<<
@@ -14231,7 +14290,7 @@
__Pyx_RefNannyFinishContext();
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":287
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":292
* tv[k] = fv[offset + k]
*
* cdef inline void copy_back(self, np.float64_t *fv, np.float64_t *tv, # <<<<<<<<<<<<<<
@@ -14247,7 +14306,7 @@
__Pyx_RefNannySetupContext("copy_back");
__Pyx_INCREF((PyObject *)__pyx_v_self);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":290
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":295
* int i, int j, int nk, int strides[3]):
* cdef int k
* cdef int offset = strides[0] * i + strides[1] * j # <<<<<<<<<<<<<<
@@ -14256,7 +14315,7 @@
*/
__pyx_v_offset = (((__pyx_v_strides[0]) * __pyx_v_i) + ((__pyx_v_strides[1]) * __pyx_v_j));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":291
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":296
* cdef int k
* cdef int offset = strides[0] * i + strides[1] * j
* for k in range(nk): # <<<<<<<<<<<<<<
@@ -14267,7 +14326,7 @@
for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
__pyx_v_k = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":292
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":297
* cdef int offset = strides[0] * i + strides[1] * j
* for k in range(nk):
* tv[offset + k] = fv[k] # <<<<<<<<<<<<<<
@@ -14281,7 +14340,7 @@
__Pyx_RefNannyFinishContext();
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":310
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":315
* @cython.boundscheck(False)
* @cython.wraparound(False)
* def __cinit__(self, # <<<<<<<<<<<<<<
@@ -14352,38 +14411,38 @@
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__n_fields);
if (likely(values[1])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 6, 6, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 6, 6, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__data);
if (likely(values[2])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 6, 6, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 6, 6, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 3:
values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left_edge);
if (likely(values[3])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 6, 6, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 6, 6, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 4:
values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right_edge);
if (likely(values[4])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 6, 6, 4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 6, 6, 4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 5:
values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dims);
if (likely(values[5])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 6, 6, 5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 6, 6, 5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 315; __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[2]; __pyx_lineno = 310; __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[2]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
- __pyx_v_parent_grid_id = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_parent_grid_id == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- __pyx_v_n_fields = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_n_fields == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_parent_grid_id = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_parent_grid_id == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_n_fields = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_n_fields == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_v_data = values[2];
__pyx_v_left_edge = ((PyArrayObject *)values[3]);
__pyx_v_right_edge = ((PyArrayObject *)values[4]);
@@ -14391,8 +14450,8 @@
} else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
goto __pyx_L5_argtuple_error;
} else {
- __pyx_v_parent_grid_id = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((__pyx_v_parent_grid_id == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- __pyx_v_n_fields = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_n_fields == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_parent_grid_id = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((__pyx_v_parent_grid_id == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_n_fields = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_n_fields == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_v_data = PyTuple_GET_ITEM(__pyx_args, 2);
__pyx_v_left_edge = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 3));
__pyx_v_right_edge = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 4));
@@ -14400,7 +14459,7 @@
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.PartitionedGrid.__cinit__");
return -1;
@@ -14415,29 +14474,29 @@
__pyx_bstruct_left_edge.buf = NULL;
__pyx_bstruct_right_edge.buf = NULL;
__pyx_bstruct_dims.buf = NULL;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left_edge), __pyx_ptype_5numpy_ndarray, 1, "left_edge", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 312; __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[2]; __pyx_lineno = 313; __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[2]; __pyx_lineno = 314; __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[2]; __pyx_lineno = 317; __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[2]; __pyx_lineno = 318; __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[2]; __pyx_lineno = 319; __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[2]; __pyx_lineno = 310; __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[2]; __pyx_lineno = 315; __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[2]; __pyx_lineno = 310; __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[2]; __pyx_lineno = 315; __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[2]; __pyx_lineno = 310; __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[2]; __pyx_lineno = 315; __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":318
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":323
* cdef int i, j, k, size
* cdef np.ndarray[np.float64_t, ndim=3] tdata
* self.parent_grid_id = parent_grid_id # <<<<<<<<<<<<<<
@@ -14446,7 +14505,7 @@
*/
((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->parent_grid_id = __pyx_v_parent_grid_id;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":319
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":324
* cdef np.ndarray[np.float64_t, ndim=3] tdata
* self.parent_grid_id = parent_grid_id
* self.LeftEdge = left_edge # <<<<<<<<<<<<<<
@@ -14459,7 +14518,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":320
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":325
* self.parent_grid_id = parent_grid_id
* self.LeftEdge = left_edge
* self.RightEdge = right_edge # <<<<<<<<<<<<<<
@@ -14472,7 +14531,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":321
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":326
* self.LeftEdge = left_edge
* self.RightEdge = right_edge
* for i in range(3): # <<<<<<<<<<<<<<
@@ -14482,7 +14541,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":322
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":327
* self.RightEdge = right_edge
* for i in range(3):
* self.left_edge[i] = left_edge[i] # <<<<<<<<<<<<<<
@@ -14492,7 +14551,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":323
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":328
* for i in range(3):
* self.left_edge[i] = left_edge[i]
* self.right_edge[i] = right_edge[i] # <<<<<<<<<<<<<<
@@ -14502,7 +14561,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":324
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":329
* self.left_edge[i] = left_edge[i]
* self.right_edge[i] = right_edge[i]
* self.dims[i] = dims[i] # <<<<<<<<<<<<<<
@@ -14512,7 +14571,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":325
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":330
* 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] # <<<<<<<<<<<<<<
@@ -14522,7 +14581,7 @@
__pyx_t_5 = __pyx_v_i;
(((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":326
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":331
* self.dims[i] = dims[i]
* self.dds[i] = (self.right_edge[i] - self.left_edge[i])/dims[i]
* self.idds[i] = 1.0/self.dds[i] # <<<<<<<<<<<<<<
@@ -14532,7 +14591,7 @@
(((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->idds[__pyx_v_i]) = (1.0 / (((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->dds[__pyx_v_i]));
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":327
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":332
* self.dds[i] = (self.right_edge[i] - self.left_edge[i])/dims[i]
* self.idds[i] = 1.0/self.dds[i]
* self.my_data = data # <<<<<<<<<<<<<<
@@ -14545,7 +14604,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 = __pyx_v_data;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":328
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":333
* self.idds[i] = 1.0/self.dds[i]
* self.my_data = data
* self.n_fields = n_fields # <<<<<<<<<<<<<<
@@ -14554,7 +14613,7 @@
*/
((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->n_fields = __pyx_v_n_fields;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":329
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":334
* self.my_data = data
* self.n_fields = n_fields
* for i in range(n_fields): # <<<<<<<<<<<<<<
@@ -14565,16 +14624,16 @@
for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_1; __pyx_t_6+=1) {
__pyx_v_i = __pyx_t_6;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":330
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":335
* self.n_fields = n_fields
* for i in range(n_fields):
* tdata = data[i] # <<<<<<<<<<<<<<
* self.data[i] = <np.float64_t *> tdata.data
*
*/
- __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_data, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_data, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_8 = ((PyArrayObject *)__pyx_t_7);
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
@@ -14591,14 +14650,14 @@
}
__pyx_bstride_0_tdata = __pyx_bstruct_tdata.strides[0]; __pyx_bstride_1_tdata = __pyx_bstruct_tdata.strides[1]; __pyx_bstride_2_tdata = __pyx_bstruct_tdata.strides[2];
__pyx_bshape_0_tdata = __pyx_bstruct_tdata.shape[0]; __pyx_bshape_1_tdata = __pyx_bstruct_tdata.shape[1]; __pyx_bshape_2_tdata = __pyx_bstruct_tdata.shape[2];
- if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_t_8 = 0;
__Pyx_DECREF(((PyObject *)__pyx_v_tdata));
__pyx_v_tdata = ((PyArrayObject *)__pyx_t_7);
__pyx_t_7 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":331
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":336
* for i in range(n_fields):
* tdata = data[i]
* self.data[i] = <np.float64_t *> tdata.data # <<<<<<<<<<<<<<
@@ -14638,7 +14697,7 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":335
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":340
* @cython.boundscheck(False)
* @cython.wraparound(False)
* def cast_plane(self, TransferFunctionProxy tf, VectorPlane vp): # <<<<<<<<<<<<<<
@@ -14655,6 +14714,7 @@
int __pyx_v_hit;
int __pyx_v_iter[4];
__pyx_t_5numpy_float64_t __pyx_v_v_pos[3];
+ __pyx_t_5numpy_float64_t __pyx_v_v_dir[3];
__pyx_t_5numpy_float64_t __pyx_v_rgba[6];
__pyx_t_5numpy_float64_t __pyx_v_extrema[4];
PyObject *__pyx_r = NULL;
@@ -14662,7 +14722,8 @@
int __pyx_t_2;
int __pyx_t_3;
int __pyx_t_4;
- PyObject *__pyx_t_5 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__tf,&__pyx_n_s__vp,0};
__Pyx_RefNannySetupContext("cast_plane");
if (unlikely(__pyx_kwds)) {
@@ -14683,11 +14744,11 @@
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__vp);
if (likely(values[1])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("cast_plane", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("cast_plane", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 340; __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[2]; __pyx_lineno = 335; __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[2]; __pyx_lineno = 340; __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]);
@@ -14699,7 +14760,7 @@
}
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[2]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("cast_plane", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.PartitionedGrid.cast_plane");
return NULL;
@@ -14707,20 +14768,29 @@
__Pyx_INCREF((PyObject *)__pyx_v_self);
__Pyx_INCREF((PyObject *)__pyx_v_tf);
__Pyx_INCREF((PyObject *)__pyx_v_vp);
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tf), __pyx_ptype_2yt_9amr_utils_TransferFunctionProxy, 1, "tf", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 335; __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[2]; __pyx_lineno = 335; __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[2]; __pyx_lineno = 340; __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[2]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":342
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":347
* cdef int iter[4]
* cdef np.float64_t v_pos[3], v_dir[3], rgba[6], extrema[4]
+ * hit = 0 # <<<<<<<<<<<<<<
+ * self.calculate_extent(vp, extrema)
+ * vp.get_start_stop(extrema, iter)
+ */
+ __pyx_v_hit = 0;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":348
+ * cdef np.float64_t v_pos[3], v_dir[3], rgba[6], extrema[4]
+ * hit = 0
* self.calculate_extent(vp, extrema) # <<<<<<<<<<<<<<
* vp.get_start_stop(extrema, iter)
* iter[0] = iclip(iter[0], 0, vp.nv[0])
*/
((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":343
- * cdef np.float64_t v_pos[3], v_dir[3], rgba[6], extrema[4]
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":349
+ * hit = 0
* self.calculate_extent(vp, extrema)
* vp.get_start_stop(extrema, iter) # <<<<<<<<<<<<<<
* iter[0] = iclip(iter[0], 0, vp.nv[0])
@@ -14728,7 +14798,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":344
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":350
* self.calculate_extent(vp, extrema)
* vp.get_start_stop(extrema, iter)
* iter[0] = iclip(iter[0], 0, vp.nv[0]) # <<<<<<<<<<<<<<
@@ -14737,7 +14807,7 @@
*/
(__pyx_v_iter[0]) = __pyx_f_2yt_9amr_utils_iclip((__pyx_v_iter[0]), 0, (__pyx_v_vp->nv[0]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":345
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":351
* vp.get_start_stop(extrema, iter)
* iter[0] = iclip(iter[0], 0, vp.nv[0])
* iter[1] = iclip(iter[1], 0, vp.nv[0]) # <<<<<<<<<<<<<<
@@ -14746,111 +14816,186 @@
*/
(__pyx_v_iter[1]) = __pyx_f_2yt_9amr_utils_iclip((__pyx_v_iter[1]), 0, (__pyx_v_vp->nv[0]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":346
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":352
* iter[0] = iclip(iter[0], 0, vp.nv[0])
* iter[1] = iclip(iter[1], 0, vp.nv[0])
* iter[2] = iclip(iter[2], 0, vp.nv[1]) # <<<<<<<<<<<<<<
* iter[3] = iclip(iter[3], 0, vp.nv[1])
- * hit = 0
+ * if vp.vd_strides[0] == -1:
*/
(__pyx_v_iter[2]) = __pyx_f_2yt_9amr_utils_iclip((__pyx_v_iter[2]), 0, (__pyx_v_vp->nv[1]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":347
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":353
* iter[1] = iclip(iter[1], 0, vp.nv[0])
* iter[2] = iclip(iter[2], 0, vp.nv[1])
* iter[3] = iclip(iter[3], 0, vp.nv[1]) # <<<<<<<<<<<<<<
- * hit = 0
- * for vi in range(iter[0], iter[1]):
+ * if vp.vd_strides[0] == -1:
+ * for vi in range(iter[0], iter[1]):
*/
(__pyx_v_iter[3]) = __pyx_f_2yt_9amr_utils_iclip((__pyx_v_iter[3]), 0, (__pyx_v_vp->nv[1]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":348
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":354
* iter[2] = iclip(iter[2], 0, vp.nv[1])
* iter[3] = iclip(iter[3], 0, vp.nv[1])
- * hit = 0 # <<<<<<<<<<<<<<
- * for vi in range(iter[0], iter[1]):
- * for vj in range(iter[2], iter[3]):
+ * if vp.vd_strides[0] == -1: # <<<<<<<<<<<<<<
+ * for vi in range(iter[0], iter[1]):
+ * for vj in range(iter[2], iter[3]):
*/
- __pyx_v_hit = 0;
+ __pyx_t_1 = ((__pyx_v_vp->vd_strides[0]) == -1);
+ if (__pyx_t_1) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":349
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":355
* iter[3] = iclip(iter[3], 0, vp.nv[1])
- * hit = 0
- * for vi in range(iter[0], iter[1]): # <<<<<<<<<<<<<<
- * for vj in range(iter[2], iter[3]):
- * vp.copy_into(vp.vp_pos, v_pos, vi, vj, 3, vp.vp_strides)
- */
- __pyx_t_1 = (__pyx_v_iter[1]);
- for (__pyx_t_2 = (__pyx_v_iter[0]); __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_vi = __pyx_t_2;
+ * if vp.vd_strides[0] == -1:
+ * for vi in range(iter[0], iter[1]): # <<<<<<<<<<<<<<
+ * for vj in range(iter[2], iter[3]):
+ * vp.copy_into(vp.vp_pos, v_pos, vi, vj, 3, vp.vp_strides)
+ */
+ __pyx_t_2 = (__pyx_v_iter[1]);
+ for (__pyx_t_3 = (__pyx_v_iter[0]); __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_vi = __pyx_t_3;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":356
+ * if vp.vd_strides[0] == -1:
+ * for vi in range(iter[0], iter[1]):
+ * for vj in range(iter[2], iter[3]): # <<<<<<<<<<<<<<
+ * vp.copy_into(vp.vp_pos, v_pos, vi, vj, 3, vp.vp_strides)
+ * vp.copy_into(vp.image, rgba, vi, vj, 3, vp.im_strides)
+ */
+ __pyx_t_4 = (__pyx_v_iter[3]);
+ for (__pyx_t_5 = (__pyx_v_iter[2]); __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
+ __pyx_v_vj = __pyx_t_5;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":357
+ * for vi in range(iter[0], iter[1]):
+ * for vj in range(iter[2], iter[3]):
+ * vp.copy_into(vp.vp_pos, v_pos, vi, vj, 3, vp.vp_strides) # <<<<<<<<<<<<<<
+ * vp.copy_into(vp.image, rgba, vi, vj, 3, vp.im_strides)
+ * self.integrate_ray(v_pos, vp.vp_dir, rgba, tf)
+ */
+ ((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, __pyx_v_vp->vp_strides);
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":358
+ * for vj in range(iter[2], iter[3]):
+ * vp.copy_into(vp.vp_pos, v_pos, vi, vj, 3, vp.vp_strides)
+ * vp.copy_into(vp.image, rgba, vi, vj, 3, vp.im_strides) # <<<<<<<<<<<<<<
+ * self.integrate_ray(v_pos, vp.vp_dir, rgba, tf)
+ * vp.copy_back(rgba, vp.image, vi, vj, 3, vp.im_strides)
+ */
+ ((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, 3, __pyx_v_vp->im_strides);
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":359
+ * vp.copy_into(vp.vp_pos, v_pos, vi, vj, 3, vp.vp_strides)
+ * vp.copy_into(vp.image, rgba, vi, vj, 3, vp.im_strides)
+ * self.integrate_ray(v_pos, vp.vp_dir, rgba, tf) # <<<<<<<<<<<<<<
+ * vp.copy_back(rgba, vp.image, vi, vj, 3, vp.im_strides)
+ * else:
+ */
+ ((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":350
- * hit = 0
- * for vi in range(iter[0], iter[1]):
- * for vj in range(iter[2], iter[3]): # <<<<<<<<<<<<<<
- * vp.copy_into(vp.vp_pos, v_pos, vi, vj, 3, vp.vp_strides)
- * vp.copy_into(vp.image, rgba, vi, vj, 3, vp.im_strides)
- */
- __pyx_t_3 = (__pyx_v_iter[3]);
- for (__pyx_t_4 = (__pyx_v_iter[2]); __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
- __pyx_v_vj = __pyx_t_4;
-
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":351
- * for vi in range(iter[0], iter[1]):
- * for vj in range(iter[2], iter[3]):
- * vp.copy_into(vp.vp_pos, v_pos, vi, vj, 3, vp.vp_strides) # <<<<<<<<<<<<<<
- * vp.copy_into(vp.image, rgba, vi, vj, 3, vp.im_strides)
- * self.integrate_ray(v_pos, vp.vp_dir, rgba, tf)
- */
- ((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, __pyx_v_vp->vp_strides);
-
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":352
- * for vj in range(iter[2], iter[3]):
- * vp.copy_into(vp.vp_pos, v_pos, vi, vj, 3, vp.vp_strides)
- * vp.copy_into(vp.image, rgba, vi, vj, 3, vp.im_strides) # <<<<<<<<<<<<<<
- * self.integrate_ray(v_pos, vp.vp_dir, rgba, tf)
- * vp.copy_back(rgba, vp.image, vi, vj, 3, vp.im_strides)
- */
- ((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, 3, __pyx_v_vp->im_strides);
-
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":353
- * vp.copy_into(vp.vp_pos, v_pos, vi, vj, 3, vp.vp_strides)
- * vp.copy_into(vp.image, rgba, vi, vj, 3, vp.im_strides)
- * self.integrate_ray(v_pos, vp.vp_dir, rgba, tf) # <<<<<<<<<<<<<<
- * vp.copy_back(rgba, vp.image, vi, vj, 3, vp.im_strides)
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":360
+ * vp.copy_into(vp.image, rgba, vi, vj, 3, vp.im_strides)
+ * self.integrate_ray(v_pos, vp.vp_dir, rgba, tf)
+ * vp.copy_back(rgba, vp.image, vi, vj, 3, vp.im_strides) # <<<<<<<<<<<<<<
+ * else:
+ * # If we do not have an orthographic projection, we have to cast all
+ */
+ ((struct __pyx_vtabstruct_2yt_9amr_utils_VectorPlane *)__pyx_v_vp->__pyx_vtab)->copy_back(__pyx_v_vp, __pyx_v_rgba, __pyx_v_vp->image, __pyx_v_vi, __pyx_v_vj, 3, __pyx_v_vp->im_strides);
+ }
+ }
+ goto __pyx_L6;
+ }
+ /*else*/ {
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":364
+ * # If we do not have an orthographic projection, we have to cast all
+ * # our rays (until we can get an extrema calculation...)
+ * for vi in range(vp.nv[0]): # <<<<<<<<<<<<<<
+ * for vj in range(vp.nv[1]):
+ * vp.copy_into(vp.vp_pos, v_pos, vi, vj, 3, vp.vp_strides)
+ */
+ __pyx_t_2 = (__pyx_v_vp->nv[0]);
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_vi = __pyx_t_3;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":365
+ * # our rays (until we can get an extrema calculation...)
+ * for vi in range(vp.nv[0]):
+ * for vj in range(vp.nv[1]): # <<<<<<<<<<<<<<
+ * vp.copy_into(vp.vp_pos, v_pos, vi, vj, 3, vp.vp_strides)
+ * vp.copy_into(vp.image, rgba, vi, vj, 3, vp.im_strides)
+ */
+ __pyx_t_4 = (__pyx_v_vp->nv[1]);
+ for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
+ __pyx_v_vj = __pyx_t_5;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":366
+ * for vi in range(vp.nv[0]):
+ * for vj in range(vp.nv[1]):
+ * vp.copy_into(vp.vp_pos, v_pos, vi, vj, 3, vp.vp_strides) # <<<<<<<<<<<<<<
+ * vp.copy_into(vp.image, rgba, vi, vj, 3, vp.im_strides)
+ * vp.copy_into(vp.vp_dir, v_dir, vi, vj, 3, vp.vd_strides)
+ */
+ ((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, __pyx_v_vp->vp_strides);
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":367
+ * for vj in range(vp.nv[1]):
+ * vp.copy_into(vp.vp_pos, v_pos, vi, vj, 3, vp.vp_strides)
+ * vp.copy_into(vp.image, rgba, vi, vj, 3, vp.im_strides) # <<<<<<<<<<<<<<
+ * vp.copy_into(vp.vp_dir, v_dir, vi, vj, 3, vp.vd_strides)
+ * self.integrate_ray(v_pos, v_dir, rgba, tf)
+ */
+ ((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, 3, __pyx_v_vp->im_strides);
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":368
+ * vp.copy_into(vp.vp_pos, v_pos, vi, vj, 3, vp.vp_strides)
+ * vp.copy_into(vp.image, rgba, vi, vj, 3, vp.im_strides)
+ * vp.copy_into(vp.vp_dir, v_dir, vi, vj, 3, vp.vd_strides) # <<<<<<<<<<<<<<
+ * self.integrate_ray(v_pos, v_dir, rgba, tf)
+ * vp.copy_back(rgba, vp.image, vi, vj, 3, vp.im_strides)
+ */
+ ((struct __pyx_vtabstruct_2yt_9amr_utils_VectorPlane *)__pyx_v_vp->__pyx_vtab)->copy_into(__pyx_v_vp, __pyx_v_vp->vp_dir, __pyx_v_v_dir, __pyx_v_vi, __pyx_v_vj, 3, __pyx_v_vp->vd_strides);
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":369
+ * vp.copy_into(vp.image, rgba, vi, vj, 3, vp.im_strides)
+ * vp.copy_into(vp.vp_dir, v_dir, vi, vj, 3, vp.vd_strides)
+ * self.integrate_ray(v_pos, v_dir, rgba, tf) # <<<<<<<<<<<<<<
+ * vp.copy_back(rgba, vp.image, vi, vj, 3, vp.im_strides)
* return hit
*/
- ((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);
+ ((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_v_dir, __pyx_v_rgba, __pyx_v_tf);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":354
- * vp.copy_into(vp.image, rgba, vi, vj, 3, vp.im_strides)
- * self.integrate_ray(v_pos, vp.vp_dir, rgba, tf)
- * vp.copy_back(rgba, vp.image, vi, vj, 3, vp.im_strides) # <<<<<<<<<<<<<<
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":370
+ * vp.copy_into(vp.vp_dir, v_dir, vi, vj, 3, vp.vd_strides)
+ * self.integrate_ray(v_pos, v_dir, rgba, tf)
+ * vp.copy_back(rgba, vp.image, vi, vj, 3, vp.im_strides) # <<<<<<<<<<<<<<
* return hit
*
*/
- ((struct __pyx_vtabstruct_2yt_9amr_utils_VectorPlane *)__pyx_v_vp->__pyx_vtab)->copy_back(__pyx_v_vp, __pyx_v_rgba, __pyx_v_vp->image, __pyx_v_vi, __pyx_v_vj, 3, __pyx_v_vp->im_strides);
+ ((struct __pyx_vtabstruct_2yt_9amr_utils_VectorPlane *)__pyx_v_vp->__pyx_vtab)->copy_back(__pyx_v_vp, __pyx_v_rgba, __pyx_v_vp->image, __pyx_v_vi, __pyx_v_vj, 3, __pyx_v_vp->im_strides);
+ }
}
}
+ __pyx_L6:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":355
- * self.integrate_ray(v_pos, vp.vp_dir, rgba, tf)
- * vp.copy_back(rgba, vp.image, vi, vj, 3, vp.im_strides)
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":371
+ * self.integrate_ray(v_pos, v_dir, rgba, tf)
+ * vp.copy_back(rgba, vp.image, vi, vj, 3, vp.im_strides)
* return hit # <<<<<<<<<<<<<<
*
* @cython.boundscheck(False)
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_5 = PyInt_FromLong(__pyx_v_hit); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_r = __pyx_t_5;
- __pyx_t_5 = 0;
+ __pyx_t_6 = PyInt_FromLong(__pyx_v_hit); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_r = __pyx_t_6;
+ __pyx_t_6 = 0;
goto __pyx_L0;
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
__Pyx_AddTraceback("yt.amr_utils.PartitionedGrid.cast_plane");
__pyx_r = NULL;
__pyx_L0:;
@@ -14862,7 +15007,7 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":359
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":375
* @cython.boundscheck(False)
* @cython.wraparound(False)
* cdef void calculate_extent(self, VectorPlane vp, # <<<<<<<<<<<<<<
@@ -14885,7 +15030,7 @@
__Pyx_INCREF((PyObject *)__pyx_v_self);
__Pyx_INCREF((PyObject *)__pyx_v_vp);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":363
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":379
* # We do this for all eight corners
* cdef np.float64_t *edges[2], temp
* edges[0] = self.left_edge # <<<<<<<<<<<<<<
@@ -14894,7 +15039,7 @@
*/
(__pyx_v_edges[0]) = __pyx_v_self->left_edge;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":364
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":380
* cdef np.float64_t *edges[2], temp
* edges[0] = self.left_edge
* edges[1] = self.right_edge # <<<<<<<<<<<<<<
@@ -14903,7 +15048,7 @@
*/
(__pyx_v_edges[1]) = __pyx_v_self->right_edge;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":365
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":381
* edges[0] = self.left_edge
* edges[1] = self.right_edge
* extrema[0] = extrema[2] = 1e300; extrema[1] = extrema[3] = -1e300 # <<<<<<<<<<<<<<
@@ -14916,7 +15061,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":367
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":383
* extrema[0] = extrema[2] = 1e300; extrema[1] = extrema[3] = -1e300
* cdef int i, j, k
* for i in range(2): # <<<<<<<<<<<<<<
@@ -14926,7 +15071,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":368
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":384
* cdef int i, j, k
* for i in range(2):
* for j in range(2): # <<<<<<<<<<<<<<
@@ -14936,7 +15081,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":369
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":385
* for i in range(2):
* for j in range(2):
* for k in range(2): # <<<<<<<<<<<<<<
@@ -14946,7 +15091,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":371
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":387
* for k in range(2):
* # This should rotate it into the vector plane
* temp = edges[i][0] * vp.x_vec[0] # <<<<<<<<<<<<<<
@@ -14955,7 +15100,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":372
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":388
* # This should rotate it into the vector plane
* temp = edges[i][0] * vp.x_vec[0]
* temp += edges[j][1] * vp.x_vec[1] # <<<<<<<<<<<<<<
@@ -14964,7 +15109,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":373
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":389
* temp = edges[i][0] * vp.x_vec[0]
* temp += edges[j][1] * vp.x_vec[1]
* temp += edges[k][2] * vp.x_vec[2] # <<<<<<<<<<<<<<
@@ -14973,7 +15118,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":374
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":390
* temp += edges[j][1] * vp.x_vec[1]
* temp += edges[k][2] * vp.x_vec[2]
* if temp < extrema[0]: extrema[0] = temp # <<<<<<<<<<<<<<
@@ -14987,7 +15132,7 @@
}
__pyx_L9:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":375
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":391
* temp += edges[k][2] * vp.x_vec[2]
* if temp < extrema[0]: extrema[0] = temp
* if temp > extrema[1]: extrema[1] = temp # <<<<<<<<<<<<<<
@@ -15001,7 +15146,7 @@
}
__pyx_L10:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":376
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":392
* if temp < extrema[0]: extrema[0] = temp
* if temp > extrema[1]: extrema[1] = temp
* temp = edges[i][0] * vp.y_vec[0] # <<<<<<<<<<<<<<
@@ -15010,7 +15155,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":377
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":393
* if temp > extrema[1]: extrema[1] = temp
* temp = edges[i][0] * vp.y_vec[0]
* temp += edges[j][1] * vp.y_vec[1] # <<<<<<<<<<<<<<
@@ -15019,7 +15164,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":378
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":394
* temp = edges[i][0] * vp.y_vec[0]
* temp += edges[j][1] * vp.y_vec[1]
* temp += edges[k][2] * vp.y_vec[2] # <<<<<<<<<<<<<<
@@ -15028,7 +15173,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":379
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":395
* temp += edges[j][1] * vp.y_vec[1]
* temp += edges[k][2] * vp.y_vec[2]
* if temp < extrema[2]: extrema[2] = temp # <<<<<<<<<<<<<<
@@ -15042,7 +15187,7 @@
}
__pyx_L11:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":380
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":396
* temp += edges[k][2] * vp.y_vec[2]
* if temp < extrema[2]: extrema[2] = temp
* if temp > extrema[3]: extrema[3] = temp # <<<<<<<<<<<<<<
@@ -15064,7 +15209,7 @@
__Pyx_RefNannyFinishContext();
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":385
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":401
* @cython.boundscheck(False)
* @cython.wraparound(False)
* cdef int integrate_ray(self, np.float64_t v_pos[3], # <<<<<<<<<<<<<<
@@ -15081,6 +15226,7 @@
int __pyx_v_hit;
int __pyx_v_direction;
__pyx_t_5numpy_float64_t __pyx_v_intersect_t;
+ __pyx_t_5numpy_float64_t __pyx_v_iv_dir[3];
__pyx_t_5numpy_float64_t __pyx_v_intersect[3];
__pyx_t_5numpy_float64_t __pyx_v_tmax[3];
__pyx_t_5numpy_float64_t __pyx_v_tdelta[3];
@@ -15103,16 +15249,16 @@
__Pyx_INCREF((PyObject *)__pyx_v_self);
__Pyx_INCREF((PyObject *)__pyx_v_tf);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":390
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":406
* 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 # <<<<<<<<<<<<<<
+ * cdef np.float64_t iv_dir[3]
* cdef np.float64_t intersect[3], tmax[3], tdelta[3]
- * cdef np.float64_t enter_t, dist, alpha, dt, exit_t
*/
__pyx_v_intersect_t = 1.0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":394
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":411
* cdef np.float64_t enter_t, dist, alpha, dt, exit_t
* cdef np.float64_t tr, tl, temp_x, temp_y, dv
* for i in range(3): # <<<<<<<<<<<<<<
@@ -15122,7 +15268,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":395
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":412
* cdef np.float64_t tr, tl, temp_x, temp_y, dv
* for i in range(3):
* if (v_dir[i] < 0): # <<<<<<<<<<<<<<
@@ -15132,7 +15278,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":396
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":413
* for i in range(3):
* if (v_dir[i] < 0):
* step[i] = -1 # <<<<<<<<<<<<<<
@@ -15144,7 +15290,7 @@
}
/*else*/ {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":398
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":415
* step[i] = -1
* else:
* step[i] = 1 # <<<<<<<<<<<<<<
@@ -15155,53 +15301,53 @@
}
__pyx_L5:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":399
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":416
* else:
* step[i] = 1
* x = (i+1) % 3 # <<<<<<<<<<<<<<
* y = (i+2) % 3
- * tl = (self.left_edge[i] - v_pos[i])/v_dir[i]
+ * iv_dir[i] = 1.0/v_dir[0]
*/
__pyx_v_x = ((__pyx_v_i + 1) % 3);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":400
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":417
* step[i] = 1
* x = (i+1) % 3
* 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]
+ * iv_dir[i] = 1.0/v_dir[0]
+ * tl = (self.left_edge[i] - v_pos[i])*iv_dir[i]
*/
__pyx_v_y = ((__pyx_v_i + 2) % 3);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":401
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":418
* x = (i+1) % 3
* 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]
+ * iv_dir[i] = 1.0/v_dir[0] # <<<<<<<<<<<<<<
+ * tl = (self.left_edge[i] - v_pos[i])*iv_dir[i]
* temp_x = (v_pos[x] + tl*v_dir[x])
*/
- __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]));
+ (__pyx_v_iv_dir[__pyx_v_i]) = (1.0 / (__pyx_v_v_dir[0]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":402
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":419
* 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] # <<<<<<<<<<<<<<
+ * iv_dir[i] = 1.0/v_dir[0]
+ * tl = (self.left_edge[i] - v_pos[i])*iv_dir[i] # <<<<<<<<<<<<<<
* temp_x = (v_pos[x] + tl*v_dir[x])
* temp_y = (v_pos[y] + tl*v_dir[y])
*/
- __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]));
+ __pyx_v_tl = (((__pyx_v_self->left_edge[__pyx_v_i]) - (__pyx_v_v_pos[__pyx_v_i])) * (__pyx_v_iv_dir[__pyx_v_i]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":403
- * tl = (self.left_edge[i] - v_pos[i])/v_dir[i]
- * tr = (self.right_edge[i] - v_pos[i])/v_dir[i]
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":420
+ * iv_dir[i] = 1.0/v_dir[0]
+ * tl = (self.left_edge[i] - v_pos[i])*iv_dir[i]
* 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 \
*/
__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":404
- * tr = (self.right_edge[i] - v_pos[i])/v_dir[i]
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":421
+ * tl = (self.left_edge[i] - v_pos[i])*iv_dir[i]
* 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 \
@@ -15209,7 +15355,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":405
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":422
* 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 \ # <<<<<<<<<<<<<<
@@ -15221,7 +15367,7 @@
__pyx_t_3 = (__pyx_v_temp_x <= (__pyx_v_self->right_edge[__pyx_v_x]));
if (__pyx_t_3) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":406
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":423
* 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 \ # <<<<<<<<<<<<<<
@@ -15233,7 +15379,7 @@
__pyx_t_5 = (__pyx_v_temp_y <= (__pyx_v_self->right_edge[__pyx_v_y]));
if (__pyx_t_5) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":407
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":424
* 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: # <<<<<<<<<<<<<<
@@ -15265,38 +15411,47 @@
}
if (__pyx_t_3) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":408
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":425
* self.left_edge[y] <= temp_y and temp_y <= self.right_edge[y] and \
* 0.0 <= tl and tl < intersect_t:
* direction = i # <<<<<<<<<<<<<<
* intersect_t = tl
- * temp_x = (v_pos[x] + tr*v_dir[x])
+ * tr = (self.right_edge[i] - v_pos[i])*iv_dir[i]
*/
__pyx_v_direction = __pyx_v_i;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":409
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":426
* 0.0 <= tl and tl < intersect_t:
* direction = i
* intersect_t = tl # <<<<<<<<<<<<<<
+ * tr = (self.right_edge[i] - v_pos[i])*iv_dir[i]
* temp_x = (v_pos[x] + tr*v_dir[x])
- * temp_y = (v_pos[y] + tr*v_dir[y])
*/
__pyx_v_intersect_t = __pyx_v_tl;
goto __pyx_L6;
}
__pyx_L6:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":410
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":427
* direction = i
* intersect_t = tl
+ * tr = (self.right_edge[i] - v_pos[i])*iv_dir[i] # <<<<<<<<<<<<<<
+ * temp_x = (v_pos[x] + tr*v_dir[x])
+ * temp_y = (v_pos[y] + tr*v_dir[y])
+ */
+ __pyx_v_tr = (((__pyx_v_self->right_edge[__pyx_v_i]) - (__pyx_v_v_pos[__pyx_v_i])) * (__pyx_v_iv_dir[__pyx_v_i]));
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":428
+ * intersect_t = tl
+ * tr = (self.right_edge[i] - v_pos[i])*iv_dir[i]
* 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 \
*/
__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":411
- * intersect_t = tl
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":429
+ * tr = (self.right_edge[i] - v_pos[i])*iv_dir[i]
* 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 \
@@ -15304,7 +15459,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":412
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":430
* 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 \ # <<<<<<<<<<<<<<
@@ -15316,7 +15471,7 @@
__pyx_t_2 = (__pyx_v_temp_x <= (__pyx_v_self->right_edge[__pyx_v_x]));
if (__pyx_t_2) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":413
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":431
* 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 \ # <<<<<<<<<<<<<<
@@ -15328,7 +15483,7 @@
__pyx_t_5 = (__pyx_v_temp_y <= (__pyx_v_self->right_edge[__pyx_v_y]));
if (__pyx_t_5) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":414
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":432
* 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: # <<<<<<<<<<<<<<
@@ -15360,7 +15515,7 @@
}
if (__pyx_t_2) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":415
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":433
* self.left_edge[y] <= temp_y and temp_y <= self.right_edge[y] and \
* 0.0 <= tr and tr < intersect_t:
* direction = i # <<<<<<<<<<<<<<
@@ -15369,7 +15524,7 @@
*/
__pyx_v_direction = __pyx_v_i;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":416
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":434
* 0.0 <= tr and tr < intersect_t:
* direction = i
* intersect_t = tr # <<<<<<<<<<<<<<
@@ -15382,7 +15537,7 @@
__pyx_L7:;
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":417
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":435
* direction = i
* intersect_t = tr
* if self.left_edge[0] <= v_pos[0] and v_pos[0] <= self.right_edge[0] and \ # <<<<<<<<<<<<<<
@@ -15394,7 +15549,7 @@
__pyx_t_3 = ((__pyx_v_v_pos[0]) <= (__pyx_v_self->right_edge[0]));
if (__pyx_t_3) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":418
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":436
* 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 \ # <<<<<<<<<<<<<<
@@ -15406,7 +15561,7 @@
__pyx_t_5 = ((__pyx_v_v_pos[1]) <= (__pyx_v_self->right_edge[1]));
if (__pyx_t_5) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":419
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":437
* 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]: # <<<<<<<<<<<<<<
@@ -15438,7 +15593,7 @@
}
if (__pyx_t_3) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":420
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":438
* 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 # <<<<<<<<<<<<<<
@@ -15450,7 +15605,7 @@
}
__pyx_L8:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":421
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":439
* 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 # <<<<<<<<<<<<<<
@@ -15472,7 +15627,7 @@
}
__pyx_L9:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":422
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":440
* intersect_t = 0.0
* if not ((0.0 <= intersect_t) and (intersect_t < 1.0)): return 0
* for i in range(3): # <<<<<<<<<<<<<<
@@ -15482,7 +15637,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":423
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":441
* 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] # <<<<<<<<<<<<<<
@@ -15491,7 +15646,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":424
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":442
* for i in range(3):
* intersect[i] = v_pos[i] + intersect_t * v_dir[i]
* cur_ind[i] = <int> floor((intersect[i] + # <<<<<<<<<<<<<<
@@ -15500,16 +15655,16 @@
*/
(__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->idds[__pyx_v_i]))));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":427
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":445
* step[i]*1e-8*self.dds[i] -
* self.left_edge[i])*self.idds[i])
* tmax[i] = (((cur_ind[i]+step[i])*self.dds[i])+ # <<<<<<<<<<<<<<
- * self.left_edge[i]-v_pos[i])/v_dir[i]
+ * self.left_edge[i]-v_pos[i])*iv_dir[i]
* # This deals with the asymmetry in having our indices refer to the
*/
- (__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]));
+ (__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_iv_dir[__pyx_v_i]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":432
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":450
* # left edge of a cell, but the right edge of the brick being one
* # extra zone out.
* if cur_ind[i] == self.dims[i] and step[i] < 0: # <<<<<<<<<<<<<<
@@ -15525,7 +15680,7 @@
}
if (__pyx_t_2) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":433
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":451
* # extra zone out.
* if cur_ind[i] == self.dims[i] and step[i] < 0:
* cur_ind[i] = self.dims[i] - 1 # <<<<<<<<<<<<<<
@@ -15537,7 +15692,7 @@
}
__pyx_L12:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":434
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":452
* 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 # <<<<<<<<<<<<<<
@@ -15558,62 +15713,62 @@
}
__pyx_L13:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":435
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":453
* 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: # <<<<<<<<<<<<<<
* tmax[i] = (((cur_ind[i]+1)*self.dds[i])
- * +self.left_edge[i]-v_pos[i])/v_dir[i]
+ * +self.left_edge[i]-v_pos[i])*iv_dir[i]
*/
__pyx_t_4 = ((__pyx_v_step[__pyx_v_i]) > 0);
if (__pyx_t_4) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":436
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":454
* 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]) # <<<<<<<<<<<<<<
- * +self.left_edge[i]-v_pos[i])/v_dir[i]
+ * +self.left_edge[i]-v_pos[i])*iv_dir[i]
* if step[i] < 0:
*/
- (__pyx_v_tmax[__pyx_v_i]) = ((((((__pyx_v_cur_ind[__pyx_v_i]) + 1) * (__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]));
+ (__pyx_v_tmax[__pyx_v_i]) = ((((((__pyx_v_cur_ind[__pyx_v_i]) + 1) * (__pyx_v_self->dds[__pyx_v_i])) + (__pyx_v_self->left_edge[__pyx_v_i])) - (__pyx_v_v_pos[__pyx_v_i])) * (__pyx_v_iv_dir[__pyx_v_i]));
goto __pyx_L14;
}
__pyx_L14:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":438
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":456
* tmax[i] = (((cur_ind[i]+1)*self.dds[i])
- * +self.left_edge[i]-v_pos[i])/v_dir[i]
+ * +self.left_edge[i]-v_pos[i])*iv_dir[i]
* if step[i] < 0: # <<<<<<<<<<<<<<
* tmax[i] = (((cur_ind[i]+0)*self.dds[i])
- * +self.left_edge[i]-v_pos[i])/v_dir[i]
+ * +self.left_edge[i]-v_pos[i])*iv_dir[i]
*/
__pyx_t_4 = ((__pyx_v_step[__pyx_v_i]) < 0);
if (__pyx_t_4) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":439
- * +self.left_edge[i]-v_pos[i])/v_dir[i]
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":457
+ * +self.left_edge[i]-v_pos[i])*iv_dir[i]
* if step[i] < 0:
* 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])
+ * +self.left_edge[i]-v_pos[i])*iv_dir[i]
+ * tdelta[i] = (self.dds[i]*iv_dir[i])
*/
- (__pyx_v_tmax[__pyx_v_i]) = ((((((__pyx_v_cur_ind[__pyx_v_i]) + 0) * (__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]));
+ (__pyx_v_tmax[__pyx_v_i]) = ((((((__pyx_v_cur_ind[__pyx_v_i]) + 0) * (__pyx_v_self->dds[__pyx_v_i])) + (__pyx_v_self->left_edge[__pyx_v_i])) - (__pyx_v_v_pos[__pyx_v_i])) * (__pyx_v_iv_dir[__pyx_v_i]));
goto __pyx_L15;
}
__pyx_L15:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":441
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":459
* 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]) # <<<<<<<<<<<<<<
+ * +self.left_edge[i]-v_pos[i])*iv_dir[i]
+ * tdelta[i] = (self.dds[i]*iv_dir[i]) # <<<<<<<<<<<<<<
* if tdelta[i] < 0: tdelta[i] *= -1
* # We have to jumpstart our calculation
*/
- (__pyx_v_tdelta[__pyx_v_i]) = ((__pyx_v_self->dds[__pyx_v_i]) / (__pyx_v_v_dir[__pyx_v_i]));
+ (__pyx_v_tdelta[__pyx_v_i]) = ((__pyx_v_self->dds[__pyx_v_i]) * (__pyx_v_iv_dir[__pyx_v_i]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":442
- * +self.left_edge[i]-v_pos[i])/v_dir[i]
- * tdelta[i] = (self.dds[i]/v_dir[i])
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":460
+ * +self.left_edge[i]-v_pos[i])*iv_dir[i]
+ * tdelta[i] = (self.dds[i]*iv_dir[i])
* if tdelta[i] < 0: tdelta[i] *= -1 # <<<<<<<<<<<<<<
* # We have to jumpstart our calculation
* enter_t = intersect_t
@@ -15626,7 +15781,7 @@
__pyx_L16:;
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":444
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":462
* if tdelta[i] < 0: tdelta[i] *= -1
* # We have to jumpstart our calculation
* enter_t = intersect_t # <<<<<<<<<<<<<<
@@ -15635,7 +15790,7 @@
*/
__pyx_v_enter_t = __pyx_v_intersect_t;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":445
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":463
* # We have to jumpstart our calculation
* enter_t = intersect_t
* while 1: # <<<<<<<<<<<<<<
@@ -15646,7 +15801,7 @@
__pyx_t_4 = 1;
if (!__pyx_t_4) break;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":448
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":466
* # 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 \ # <<<<<<<<<<<<<<
@@ -15661,7 +15816,7 @@
__pyx_t_2 = (!__pyx_t_4);
if (!__pyx_t_2) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":449
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":467
* # 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 \ # <<<<<<<<<<<<<<
@@ -15676,7 +15831,7 @@
__pyx_t_3 = (!__pyx_t_4);
if (!__pyx_t_3) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":450
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":468
* 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])): # <<<<<<<<<<<<<<
@@ -15699,7 +15854,7 @@
}
if (__pyx_t_3) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":451
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":469
* (not (0 <= cur_ind[1] < self.dims[1])) or \
* (not (0 <= cur_ind[2] < self.dims[2])):
* break # <<<<<<<<<<<<<<
@@ -15711,7 +15866,7 @@
}
__pyx_L19:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":452
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":470
* (not (0 <= cur_ind[2] < self.dims[2])):
* break
* hit += 1 # <<<<<<<<<<<<<<
@@ -15720,7 +15875,7 @@
*/
__pyx_v_hit += 1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":453
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":471
* break
* hit += 1
* if tmax[0] < tmax[1]: # <<<<<<<<<<<<<<
@@ -15730,7 +15885,7 @@
__pyx_t_3 = ((__pyx_v_tmax[0]) < (__pyx_v_tmax[1]));
if (__pyx_t_3) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":454
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":472
* hit += 1
* if tmax[0] < tmax[1]:
* if tmax[0] < tmax[2]: # <<<<<<<<<<<<<<
@@ -15740,7 +15895,7 @@
__pyx_t_3 = ((__pyx_v_tmax[0]) < (__pyx_v_tmax[2]));
if (__pyx_t_3) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":455
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":473
* if tmax[0] < tmax[1]:
* if tmax[0] < tmax[2]:
* exit_t = fmin(tmax[0], 1.0) # <<<<<<<<<<<<<<
@@ -15749,7 +15904,7 @@
*/
__pyx_v_exit_t = __pyx_f_2yt_9amr_utils_fmin((__pyx_v_tmax[0]), 1.0);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":457
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":475
* exit_t = fmin(tmax[0], 1.0)
* self.sample_values(v_pos, v_dir, enter_t, exit_t, cur_ind,
* rgba, tf) # <<<<<<<<<<<<<<
@@ -15758,7 +15913,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_exit_t, __pyx_v_cur_ind, __pyx_v_rgba, __pyx_v_tf);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":458
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":476
* self.sample_values(v_pos, v_dir, enter_t, exit_t, cur_ind,
* rgba, tf)
* cur_ind[0] += step[0] # <<<<<<<<<<<<<<
@@ -15767,7 +15922,7 @@
*/
(__pyx_v_cur_ind[0]) += (__pyx_v_step[0]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":459
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":477
* rgba, tf)
* cur_ind[0] += step[0]
* enter_t = tmax[0] # <<<<<<<<<<<<<<
@@ -15776,7 +15931,7 @@
*/
__pyx_v_enter_t = (__pyx_v_tmax[0]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":460
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":478
* cur_ind[0] += step[0]
* enter_t = tmax[0]
* tmax[0] += tdelta[0] # <<<<<<<<<<<<<<
@@ -15788,7 +15943,7 @@
}
/*else*/ {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":462
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":480
* tmax[0] += tdelta[0]
* else:
* exit_t = fmin(tmax[2], 1.0) # <<<<<<<<<<<<<<
@@ -15797,7 +15952,7 @@
*/
__pyx_v_exit_t = __pyx_f_2yt_9amr_utils_fmin((__pyx_v_tmax[2]), 1.0);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":464
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":482
* exit_t = fmin(tmax[2], 1.0)
* self.sample_values(v_pos, v_dir, enter_t, exit_t, cur_ind,
* rgba, tf) # <<<<<<<<<<<<<<
@@ -15806,7 +15961,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_exit_t, __pyx_v_cur_ind, __pyx_v_rgba, __pyx_v_tf);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":465
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":483
* self.sample_values(v_pos, v_dir, enter_t, exit_t, cur_ind,
* rgba, tf)
* cur_ind[2] += step[2] # <<<<<<<<<<<<<<
@@ -15815,7 +15970,7 @@
*/
(__pyx_v_cur_ind[2]) += (__pyx_v_step[2]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":466
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":484
* rgba, tf)
* cur_ind[2] += step[2]
* enter_t = tmax[2] # <<<<<<<<<<<<<<
@@ -15824,7 +15979,7 @@
*/
__pyx_v_enter_t = (__pyx_v_tmax[2]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":467
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":485
* cur_ind[2] += step[2]
* enter_t = tmax[2]
* tmax[2] += tdelta[2] # <<<<<<<<<<<<<<
@@ -15838,7 +15993,7 @@
}
/*else*/ {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":469
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":487
* tmax[2] += tdelta[2]
* else:
* if tmax[1] < tmax[2]: # <<<<<<<<<<<<<<
@@ -15848,7 +16003,7 @@
__pyx_t_3 = ((__pyx_v_tmax[1]) < (__pyx_v_tmax[2]));
if (__pyx_t_3) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":470
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":488
* else:
* if tmax[1] < tmax[2]:
* exit_t = fmin(tmax[1], 1.0) # <<<<<<<<<<<<<<
@@ -15857,7 +16012,7 @@
*/
__pyx_v_exit_t = __pyx_f_2yt_9amr_utils_fmin((__pyx_v_tmax[1]), 1.0);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":472
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":490
* exit_t = fmin(tmax[1], 1.0)
* self.sample_values(v_pos, v_dir, enter_t, exit_t, cur_ind,
* rgba, tf) # <<<<<<<<<<<<<<
@@ -15866,7 +16021,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_exit_t, __pyx_v_cur_ind, __pyx_v_rgba, __pyx_v_tf);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":473
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":491
* self.sample_values(v_pos, v_dir, enter_t, exit_t, cur_ind,
* rgba, tf)
* cur_ind[1] += step[1] # <<<<<<<<<<<<<<
@@ -15875,7 +16030,7 @@
*/
(__pyx_v_cur_ind[1]) += (__pyx_v_step[1]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":474
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":492
* rgba, tf)
* cur_ind[1] += step[1]
* enter_t = tmax[1] # <<<<<<<<<<<<<<
@@ -15884,7 +16039,7 @@
*/
__pyx_v_enter_t = (__pyx_v_tmax[1]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":475
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":493
* cur_ind[1] += step[1]
* enter_t = tmax[1]
* tmax[1] += tdelta[1] # <<<<<<<<<<<<<<
@@ -15896,7 +16051,7 @@
}
/*else*/ {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":477
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":495
* tmax[1] += tdelta[1]
* else:
* exit_t = fmin(tmax[2], 1.0) # <<<<<<<<<<<<<<
@@ -15905,7 +16060,7 @@
*/
__pyx_v_exit_t = __pyx_f_2yt_9amr_utils_fmin((__pyx_v_tmax[2]), 1.0);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":479
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":497
* exit_t = fmin(tmax[2], 1.0)
* self.sample_values(v_pos, v_dir, enter_t, exit_t, cur_ind,
* rgba, tf) # <<<<<<<<<<<<<<
@@ -15914,7 +16069,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_exit_t, __pyx_v_cur_ind, __pyx_v_rgba, __pyx_v_tf);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":480
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":498
* self.sample_values(v_pos, v_dir, enter_t, exit_t, cur_ind,
* rgba, tf)
* cur_ind[2] += step[2] # <<<<<<<<<<<<<<
@@ -15923,7 +16078,7 @@
*/
(__pyx_v_cur_ind[2]) += (__pyx_v_step[2]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":481
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":499
* rgba, tf)
* cur_ind[2] += step[2]
* enter_t = tmax[2] # <<<<<<<<<<<<<<
@@ -15932,7 +16087,7 @@
*/
__pyx_v_enter_t = (__pyx_v_tmax[2]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":482
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":500
* cur_ind[2] += step[2]
* enter_t = tmax[2]
* tmax[2] += tdelta[2] # <<<<<<<<<<<<<<
@@ -15945,7 +16100,7 @@
}
__pyx_L20:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":483
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":501
* enter_t = tmax[2]
* tmax[2] += tdelta[2]
* if enter_t > 1.0: break # <<<<<<<<<<<<<<
@@ -15961,7 +16116,7 @@
}
__pyx_L18_break:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":484
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":502
* tmax[2] += tdelta[2]
* if enter_t > 1.0: break
* return hit # <<<<<<<<<<<<<<
@@ -15979,7 +16134,7 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":488
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":506
* @cython.boundscheck(False)
* @cython.wraparound(False)
* cdef void sample_values(self, # <<<<<<<<<<<<<<
@@ -15995,6 +16150,7 @@
__pyx_t_5numpy_float64_t __pyx_v_ds[3];
int __pyx_v_dti;
int __pyx_v_i;
+ int __pyx_v_offset;
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
@@ -16003,7 +16159,7 @@
__Pyx_INCREF((PyObject *)__pyx_v_self);
__Pyx_INCREF((PyObject *)__pyx_v_tf);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":498
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":516
* cdef np.float64_t cp[3], dp[3], temp, dt, t, dv
* cdef np.float64_t grad[3], ds[3]
* grad[0] = grad[1] = grad[2] = 0.0 # <<<<<<<<<<<<<<
@@ -16014,26 +16170,35 @@
(__pyx_v_grad[1]) = 0.0;
(__pyx_v_grad[2]) = 0.0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":500
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":518
* grad[0] = grad[1] = grad[2] = 0.0
* cdef int dti, i
* dt = (exit_t - enter_t) / tf.ns # 4 samples should be dt=0.25 # <<<<<<<<<<<<<<
- * for i in range(3):
- * # temp is the left edge of the current cell
+ * cdef int offset = ci[0] * (self.dims[1] + 1) * (self.dims[2] + 1) \
+ * + ci[1] * (self.dims[2] + 1) + ci[2]
*/
__pyx_v_dt = ((__pyx_v_exit_t - __pyx_v_enter_t) / __pyx_v_tf->ns);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":501
- * cdef int dti, i
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":520
* dt = (exit_t - enter_t) / tf.ns # 4 samples should be dt=0.25
- * for i in range(3): # <<<<<<<<<<<<<<
+ * cdef int offset = ci[0] * (self.dims[1] + 1) * (self.dims[2] + 1) \
+ * + ci[1] * (self.dims[2] + 1) + ci[2] # <<<<<<<<<<<<<<
+ * for i in range(3):
+ * # temp is the left edge of the current cell
+ */
+ __pyx_v_offset = (((((__pyx_v_ci[0]) * ((__pyx_v_self->dims[1]) + 1)) * ((__pyx_v_self->dims[2]) + 1)) + ((__pyx_v_ci[1]) * ((__pyx_v_self->dims[2]) + 1))) + (__pyx_v_ci[2]));
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":521
+ * cdef int offset = ci[0] * (self.dims[1] + 1) * (self.dims[2] + 1) \
+ * + ci[1] * (self.dims[2] + 1) + ci[2]
+ * for i in range(3): # <<<<<<<<<<<<<<
* # temp is the left edge of the current cell
* temp = ci[i] * self.dds[i] + self.left_edge[i]
*/
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":503
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":523
* for i in range(3):
* # temp is the left edge of the current cell
* temp = ci[i] * self.dds[i] + self.left_edge[i] # <<<<<<<<<<<<<<
@@ -16042,7 +16207,7 @@
*/
__pyx_v_temp = (((__pyx_v_ci[__pyx_v_i]) * (__pyx_v_self->dds[__pyx_v_i])) + (__pyx_v_self->left_edge[__pyx_v_i]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":505
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":525
* temp = ci[i] * self.dds[i] + self.left_edge[i]
* # this gets us dp as the current first sample position
* dp[i] = (enter_t + 0.5 * dt) * v_dir[i] + v_pos[i] - temp # <<<<<<<<<<<<<<
@@ -16051,7 +16216,7 @@
*/
(__pyx_v_dp[__pyx_v_i]) = ((((__pyx_v_enter_t + (0.5 * __pyx_v_dt)) * (__pyx_v_v_dir[__pyx_v_i])) + (__pyx_v_v_pos[__pyx_v_i])) - __pyx_v_temp);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":506
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":526
* # this gets us dp as the current first sample position
* dp[i] = (enter_t + 0.5 * dt) * v_dir[i] + v_pos[i] - temp
* dp[i] *= self.idds[i] # <<<<<<<<<<<<<<
@@ -16060,7 +16225,7 @@
*/
(__pyx_v_dp[__pyx_v_i]) *= (__pyx_v_self->idds[__pyx_v_i]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":507
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":527
* dp[i] = (enter_t + 0.5 * dt) * v_dir[i] + v_pos[i] - temp
* dp[i] *= self.idds[i]
* ds[i] = v_dir[i] * self.idds[i] * dt # <<<<<<<<<<<<<<
@@ -16070,39 +16235,39 @@
(__pyx_v_ds[__pyx_v_i]) = (((__pyx_v_v_dir[__pyx_v_i]) * (__pyx_v_self->idds[__pyx_v_i])) * __pyx_v_dt);
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":508
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":528
* dp[i] *= self.idds[i]
* ds[i] = v_dir[i] * self.idds[i] * dt
* for dti in range(tf.ns): # <<<<<<<<<<<<<<
* for i in range(self.n_fields):
- * self.dvs[i] = trilinear_interpolate(self.dims, ci, dp, self.data[i])
+ * self.dvs[i] = offset_interpolate(self.dims, dp, self.data[i] + offset)
*/
__pyx_t_1 = __pyx_v_tf->ns;
for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
__pyx_v_dti = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":509
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":529
* ds[i] = v_dir[i] * self.idds[i] * dt
* for dti in range(tf.ns):
* for i in range(self.n_fields): # <<<<<<<<<<<<<<
- * self.dvs[i] = trilinear_interpolate(self.dims, ci, dp, self.data[i])
+ * self.dvs[i] = offset_interpolate(self.dims, dp, self.data[i] + offset)
* #if (dv < tf.x_bounds[0]) or (dv > tf.x_bounds[1]):
*/
__pyx_t_3 = __pyx_v_self->n_fields;
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
__pyx_v_i = __pyx_t_4;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":510
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":530
* for dti in range(tf.ns):
* for i in range(self.n_fields):
- * self.dvs[i] = trilinear_interpolate(self.dims, ci, dp, self.data[i]) # <<<<<<<<<<<<<<
+ * self.dvs[i] = offset_interpolate(self.dims, dp, self.data[i] + offset) # <<<<<<<<<<<<<<
* #if (dv < tf.x_bounds[0]) or (dv > tf.x_bounds[1]):
* # continue
*/
- (__pyx_v_self->dvs[__pyx_v_i]) = trilinear_interpolate(__pyx_v_self->dims, __pyx_v_ci, __pyx_v_dp, (__pyx_v_self->data[__pyx_v_i]));
+ (__pyx_v_self->dvs[__pyx_v_i]) = offset_interpolate(__pyx_v_self->dims, __pyx_v_dp, ((__pyx_v_self->data[__pyx_v_i]) + __pyx_v_offset));
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":513
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":533
* #if (dv < tf.x_bounds[0]) or (dv > tf.x_bounds[1]):
* # continue
* for i in range(3): # <<<<<<<<<<<<<<
@@ -16112,7 +16277,7 @@
for (__pyx_t_3 = 0; __pyx_t_3 < 3; __pyx_t_3+=1) {
__pyx_v_i = __pyx_t_3;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":514
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":534
* # continue
* for i in range(3):
* dp[i] += ds[i] # <<<<<<<<<<<<<<
@@ -16122,7 +16287,7 @@
(__pyx_v_dp[__pyx_v_i]) += (__pyx_v_ds[__pyx_v_i]);
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":515
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":535
* for i in range(3):
* dp[i] += ds[i]
* tf.eval_transfer(dt, self.dvs, rgba, grad) # <<<<<<<<<<<<<<
@@ -16137,7 +16302,7 @@
__Pyx_RefNannyFinishContext();
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":525
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":545
* @cython.boundscheck(False)
* @cython.wraparound(False)
* def __init__(self, grid, int direction, int left): # <<<<<<<<<<<<<<
@@ -16178,31 +16343,31 @@
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__direction);
if (likely(values[1])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left);
if (likely(values[2])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 545; __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[2]; __pyx_lineno = 525; __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[2]; __pyx_lineno = 545; __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[2]; __pyx_lineno = 525; __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[2]; __pyx_lineno = 525; __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[2]; __pyx_lineno = 545; __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[2]; __pyx_lineno = 545; __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[2]; __pyx_lineno = 525; __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[2]; __pyx_lineno = 525; __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[2]; __pyx_lineno = 545; __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[2]; __pyx_lineno = 545; __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[2]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.GridFace.__init__");
return -1;
@@ -16210,7 +16375,7 @@
__Pyx_INCREF((PyObject *)__pyx_v_self);
__Pyx_INCREF(__pyx_v_grid);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":526
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":546
* @cython.wraparound(False)
* def __init__(self, grid, int direction, int left):
* self.direction = direction # <<<<<<<<<<<<<<
@@ -16219,7 +16384,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":527
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":547
* def __init__(self, grid, int direction, int left):
* self.direction = direction
* if left == 1: # <<<<<<<<<<<<<<
@@ -16229,44 +16394,44 @@
__pyx_t_1 = (__pyx_v_left == 1);
if (__pyx_t_1) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":528
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":548
* 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_n_s__LeftEdge); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(__pyx_v_grid, __pyx_n_s__LeftEdge); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, __pyx_v_direction, sizeof(int), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, __pyx_v_direction, sizeof(int), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_4 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_4 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
((struct __pyx_obj_2yt_9amr_utils_GridFace *)__pyx_v_self)->coord = __pyx_t_4;
goto __pyx_L6;
}
/*else*/ {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":530
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":550
* self.coord = grid.LeftEdge[direction]
* else:
* self.coord = grid.RightEdge[direction] # <<<<<<<<<<<<<<
* cdef int i
* for i in range(3):
*/
- __pyx_t_3 = PyObject_GetAttr(__pyx_v_grid, __pyx_n_s__RightEdge); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetAttr(__pyx_v_grid, __pyx_n_s__RightEdge); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_direction, sizeof(int), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_direction, sizeof(int), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_4 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_4 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
((struct __pyx_obj_2yt_9amr_utils_GridFace *)__pyx_v_self)->coord = __pyx_t_4;
}
__pyx_L6:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":532
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":552
* self.coord = grid.RightEdge[direction]
* cdef int i
* for i in range(3): # <<<<<<<<<<<<<<
@@ -16276,40 +16441,40 @@
for (__pyx_t_5 = 0; __pyx_t_5 < 3; __pyx_t_5+=1) {
__pyx_v_i = __pyx_t_5;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":533
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":553
* 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_n_s__LeftEdge); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(__pyx_v_grid, __pyx_n_s__LeftEdge); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_4 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_4 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
(((struct __pyx_obj_2yt_9amr_utils_GridFace *)__pyx_v_self)->left_edge[__pyx_v_i]) = __pyx_t_4;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":534
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":554
* 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_3 = PyObject_GetAttr(__pyx_v_grid, __pyx_n_s__RightEdge); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetAttr(__pyx_v_grid, __pyx_n_s__RightEdge); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_4 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_4 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
(((struct __pyx_obj_2yt_9amr_utils_GridFace *)__pyx_v_self)->right_edge[__pyx_v_i]) = __pyx_t_4;
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":535
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":555
* self.left_edge[i] = grid.LeftEdge[i]
* self.right_edge[i] = grid.RightEdge[i]
* self.left_edge[direction] = self.right_edge[direction] = self.coord # <<<<<<<<<<<<<<
@@ -16333,7 +16498,7 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":539
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":559
* @cython.boundscheck(False)
* @cython.wraparound(False)
* cdef int proj_overlap(self, np.float64_t *left_edge, np.float64_t *right_edge): # <<<<<<<<<<<<<<
@@ -16349,7 +16514,7 @@
__Pyx_RefNannySetupContext("proj_overlap");
__Pyx_INCREF((PyObject *)__pyx_v_self);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":541
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":561
* cdef int proj_overlap(self, np.float64_t *left_edge, np.float64_t *right_edge):
* cdef int xax, yax
* xax = (self.direction + 1) % 3 # <<<<<<<<<<<<<<
@@ -16358,7 +16523,7 @@
*/
__pyx_v_xax = ((__pyx_v_self->direction + 1) % 3);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":542
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":562
* cdef int xax, yax
* xax = (self.direction + 1) % 3
* yax = (self.direction + 2) % 3 # <<<<<<<<<<<<<<
@@ -16367,7 +16532,7 @@
*/
__pyx_v_yax = ((__pyx_v_self->direction + 2) % 3);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":543
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":563
* xax = (self.direction + 1) % 3
* yax = (self.direction + 2) % 3
* if left_edge[xax] >= self.right_edge[xax]: return 0 # <<<<<<<<<<<<<<
@@ -16382,7 +16547,7 @@
}
__pyx_L3:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":544
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":564
* 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 # <<<<<<<<<<<<<<
@@ -16397,7 +16562,7 @@
}
__pyx_L4:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":545
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":565
* 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 # <<<<<<<<<<<<<<
@@ -16412,7 +16577,7 @@
}
__pyx_L5:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":546
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":566
* 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 # <<<<<<<<<<<<<<
@@ -16427,7 +16592,7 @@
}
__pyx_L6:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":547
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":567
* if left_edge[yax] >= self.right_edge[yax]: return 0
* if right_edge[yax] <= self.left_edge[yax]: return 0
* return 1 # <<<<<<<<<<<<<<
@@ -16444,7 +16609,7 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":556
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":576
* cdef public object subgrid_faces
* cdef public int parent_grid_id
* def __cinit__(self, int parent_grid_id, # <<<<<<<<<<<<<<
@@ -16492,39 +16657,39 @@
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left_edge);
if (likely(values[1])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right_edge);
if (likely(values[2])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 3:
values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__subgrid_faces);
if (likely(values[3])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 576; __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[2]; __pyx_lineno = 556; __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[2]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
- __pyx_v_parent_grid_id = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_parent_grid_id == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_parent_grid_id = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_parent_grid_id == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_v_left_edge = ((PyArrayObject *)values[1]);
__pyx_v_right_edge = ((PyArrayObject *)values[2]);
__pyx_v_subgrid_faces = values[3];
} else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
goto __pyx_L5_argtuple_error;
} else {
- __pyx_v_parent_grid_id = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((__pyx_v_parent_grid_id == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_parent_grid_id = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((__pyx_v_parent_grid_id == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_v_left_edge = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
__pyx_v_right_edge = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 2));
__pyx_v_subgrid_faces = PyTuple_GET_ITEM(__pyx_args, 3);
}
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[2]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.ProtoPrism.__cinit__");
return -1;
@@ -16535,22 +16700,22 @@
__Pyx_INCREF(__pyx_v_subgrid_faces);
__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[2]; __pyx_lineno = 557; __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[2]; __pyx_lineno = 558; __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[2]; __pyx_lineno = 577; __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[2]; __pyx_lineno = 578; __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[2]; __pyx_lineno = 556; __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[2]; __pyx_lineno = 576; __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[2]; __pyx_lineno = 556; __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[2]; __pyx_lineno = 576; __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":560
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":580
* np.ndarray[np.float64_t, ndim=1] right_edge,
* subgrid_faces):
* self.parent_grid_id = parent_grid_id # <<<<<<<<<<<<<<
@@ -16559,7 +16724,7 @@
*/
((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->parent_grid_id = __pyx_v_parent_grid_id;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":562
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":582
* self.parent_grid_id = parent_grid_id
* cdef int i
* self.LeftEdge = left_edge # <<<<<<<<<<<<<<
@@ -16572,7 +16737,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":563
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":583
* cdef int i
* self.LeftEdge = left_edge
* self.RightEdge = right_edge # <<<<<<<<<<<<<<
@@ -16585,7 +16750,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":564
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":584
* self.LeftEdge = left_edge
* self.RightEdge = right_edge
* for i in range(3): # <<<<<<<<<<<<<<
@@ -16595,7 +16760,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":565
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":585
* self.RightEdge = right_edge
* for i in range(3):
* self.left_edge[i] = left_edge[i] # <<<<<<<<<<<<<<
@@ -16610,11 +16775,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[2]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[2]; __pyx_lineno = 585; __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":566
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":586
* for i in range(3):
* self.left_edge[i] = left_edge[i]
* self.right_edge[i] = right_edge[i] # <<<<<<<<<<<<<<
@@ -16629,12 +16794,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[2]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[2]; __pyx_lineno = 586; __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":567
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":587
* self.left_edge[i] = left_edge[i]
* self.right_edge[i] = right_edge[i]
* self.subgrid_faces = subgrid_faces # <<<<<<<<<<<<<<
@@ -16670,7 +16835,7 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":571
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":591
* @cython.boundscheck(False)
* @cython.wraparound(False)
* def sweep(self, int direction = 0, int stack = 0): # <<<<<<<<<<<<<<
@@ -16722,15 +16887,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[2]; __pyx_lineno = 571; __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[2]; __pyx_lineno = 591; __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[2]; __pyx_lineno = 571; __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[2]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
__pyx_v_direction = ((int)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[2]; __pyx_lineno = 571; __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[2]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
__pyx_v_stack = ((int)0);
}
@@ -16738,15 +16903,15 @@
__pyx_v_direction = ((int)0);
__pyx_v_stack = ((int)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[2]; __pyx_lineno = 571; __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[2]; __pyx_lineno = 571; __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[2]; __pyx_lineno = 591; __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[2]; __pyx_lineno = 591; __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[2]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("sweep", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.ProtoPrism.sweep");
return NULL;
@@ -16758,7 +16923,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":575
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":595
* cdef GridFace face
* cdef np.float64_t proto_split[3]
* for i in range(3): proto_split[i] = self.right_edge[i] # <<<<<<<<<<<<<<
@@ -16770,19 +16935,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":576
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":596
* 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_t_3 = __Pyx_GetItemInt(((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->subgrid_faces, __pyx_v_direction, sizeof(int), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetItemInt(((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->subgrid_faces, __pyx_v_direction, sizeof(int), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) {
__pyx_t_2 = 0; __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4);
} else {
- __pyx_t_2 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
@@ -16796,17 +16961,17 @@
} else {
__pyx_t_3 = PyIter_Next(__pyx_t_4);
if (!__pyx_t_3) {
- if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
break;
}
__Pyx_GOTREF(__pyx_t_3);
}
- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_2yt_9amr_utils_GridFace))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_2yt_9amr_utils_GridFace))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 596; __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_3);
__pyx_t_3 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":577
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":597
* for i in range(3): proto_split[i] = self.right_edge[i]
* for face in self.subgrid_faces[direction]:
* proto_split[direction] = face.coord # <<<<<<<<<<<<<<
@@ -16815,7 +16980,7 @@
*/
(__pyx_v_proto_split[__pyx_v_direction]) = __pyx_v_face->coord;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":578
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":598
* for face in self.subgrid_faces[direction]:
* proto_split[direction] = face.coord
* if proto_split[direction] <= self.left_edge[direction]: # <<<<<<<<<<<<<<
@@ -16825,7 +16990,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":579
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":599
* proto_split[direction] = face.coord
* if proto_split[direction] <= self.left_edge[direction]:
* continue # <<<<<<<<<<<<<<
@@ -16837,7 +17002,7 @@
}
__pyx_L10:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":580
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":600
* if proto_split[direction] <= self.left_edge[direction]:
* continue
* if proto_split[direction] == self.right_edge[direction]: # <<<<<<<<<<<<<<
@@ -16847,7 +17012,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":581
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":601
* continue
* if proto_split[direction] == self.right_edge[direction]:
* if stack == 2: return [self] # <<<<<<<<<<<<<<
@@ -16857,7 +17022,7 @@
__pyx_t_5 = (__pyx_v_stack == 2);
if (__pyx_t_5) {
__Pyx_XDECREF(__pyx_r);
- __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
__Pyx_INCREF(__pyx_v_self);
PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_self);
@@ -16870,7 +17035,7 @@
}
__pyx_L12:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":582
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":602
* if proto_split[direction] == self.right_edge[direction]:
* if stack == 2: return [self]
* return self.sweep((direction + 1) % 3, stack + 1) # <<<<<<<<<<<<<<
@@ -16878,13 +17043,13 @@
* left, right = self.split(proto_split, direction)
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__sweep); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__sweep); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_6 = PyInt_FromLong(((__pyx_v_direction + 1) % 3)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 582; __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[2]; __pyx_lineno = 602; __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[2]; __pyx_lineno = 582; __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[2]; __pyx_lineno = 602; __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[2]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
__Pyx_GIVEREF(__pyx_t_6);
@@ -16892,7 +17057,7 @@
__Pyx_GIVEREF(__pyx_t_7);
__pyx_t_6 = 0;
__pyx_t_7 = 0;
- __pyx_t_7 = PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
@@ -16904,7 +17069,7 @@
}
__pyx_L11:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":583
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":603
* if stack == 2: return [self]
* return self.sweep((direction + 1) % 3, stack + 1)
* if face.proj_overlap(self.left_edge, proto_split) == 1: # <<<<<<<<<<<<<<
@@ -16914,14 +17079,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":584
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":604
* 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[2]; __pyx_lineno = 584; __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[2]; __pyx_lineno = 604; __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;
@@ -16935,14 +17100,14 @@
__pyx_v_right = __pyx_t_3;
__pyx_t_3 = 0;
} else {
- __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_8 = __Pyx_UnpackItem(__pyx_t_6, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_UnpackItem(__pyx_t_6, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_6, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_6, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- if (__Pyx_EndUnpack(__pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_EndUnpack(__pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_v_left);
__pyx_v_left = __pyx_t_8;
@@ -16952,23 +17117,23 @@
__pyx_t_3 = 0;
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":585
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":605
* 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_n_s__sweep); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_GetAttr(__pyx_v_left, __pyx_n_s__sweep); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_3 = PyInt_FromLong(((__pyx_v_direction + 1) % 3)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(((__pyx_v_direction + 1) % 3)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
@@ -16976,23 +17141,23 @@
__pyx_v_LC = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":586
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":606
* left, right = self.split(proto_split, direction)
* LC = left.sweep((direction + 1) % 3)
* RC = right.sweep(direction) # <<<<<<<<<<<<<<
* return LC + RC
* raise RuntimeError
*/
- __pyx_t_3 = PyObject_GetAttr(__pyx_v_right, __pyx_n_s__sweep); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetAttr(__pyx_v_right, __pyx_n_s__sweep); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_8 = PyInt_FromLong(__pyx_v_direction); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyInt_FromLong(__pyx_v_direction); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
__Pyx_GIVEREF(__pyx_t_8);
__pyx_t_8 = 0;
- __pyx_t_8 = PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
@@ -17000,7 +17165,7 @@
__pyx_v_RC = __pyx_t_8;
__pyx_t_8 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":587
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":607
* LC = left.sweep((direction + 1) % 3)
* RC = right.sweep(direction)
* return LC + RC # <<<<<<<<<<<<<<
@@ -17008,7 +17173,7 @@
*
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_8 = PyNumber_Add(__pyx_v_LC, __pyx_v_RC); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyNumber_Add(__pyx_v_LC, __pyx_v_RC); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__pyx_r = __pyx_t_8;
__pyx_t_8 = 0;
@@ -17021,7 +17186,7 @@
}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":588
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":608
* RC = right.sweep(direction)
* return LC + RC
* raise RuntimeError # <<<<<<<<<<<<<<
@@ -17029,7 +17194,7 @@
* @cython.boundscheck(False)
*/
__Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0);
- {__pyx_filename = __pyx_f[2]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[2]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
@@ -17053,7 +17218,7 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":592
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":612
* @cython.boundscheck(False)
* @cython.wraparound(False)
* cdef object split(self, np.float64_t *sp, int direction): # <<<<<<<<<<<<<<
@@ -17076,39 +17241,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":594
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":614
* 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_n_s__copy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->LeftEdge, __pyx_n_s__copy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 614; __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[2]; __pyx_lineno = 594; __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[2]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 614; __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":595
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":615
* 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_n_s__copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(__pyx_v_self->RightEdge, __pyx_n_s__copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 615; __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[2]; __pyx_lineno = 595; __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[2]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 615; __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":597
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":617
* cdef np.ndarray split_right = self.RightEdge.copy()
*
* for i in range(3): split_left[i] = self.right_edge[i] # <<<<<<<<<<<<<<
@@ -17117,42 +17282,42 @@
*/
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[2]; __pyx_lineno = 597; __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[2]; __pyx_lineno = 617; __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[2]; __pyx_lineno = 597; __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[2]; __pyx_lineno = 617; __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":598
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":618
*
* for i in range(3): split_left[i] = self.right_edge[i]
* split_left[direction] = sp[direction] # <<<<<<<<<<<<<<
* left = ProtoPrism(self.parent_grid_id, 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[2]; __pyx_lineno = 598; __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[2]; __pyx_lineno = 618; __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[2]; __pyx_lineno = 598; __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[2]; __pyx_lineno = 618; __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":599
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":619
* for i in range(3): split_left[i] = self.right_edge[i]
* split_left[direction] = sp[direction]
* left = ProtoPrism(self.parent_grid_id, self.LeftEdge, split_left, # <<<<<<<<<<<<<<
* self.subgrid_faces)
*
*/
- __pyx_t_1 = PyInt_FromLong(__pyx_v_self->parent_grid_id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_self->parent_grid_id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":600
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":620
* split_left[direction] = sp[direction]
* left = ProtoPrism(self.parent_grid_id, self.LeftEdge, split_left,
* self.subgrid_faces) # <<<<<<<<<<<<<<
*
* for i in range(3): split_right[i] = self.left_edge[i]
*/
- __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
@@ -17166,14 +17331,14 @@
PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_self->subgrid_faces);
__Pyx_GIVEREF(__pyx_v_self->subgrid_faces);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_2yt_9amr_utils_ProtoPrism)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_2yt_9amr_utils_ProtoPrism)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_v_left);
__pyx_v_left = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":602
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":622
* self.subgrid_faces)
*
* for i in range(3): split_right[i] = self.left_edge[i] # <<<<<<<<<<<<<<
@@ -17182,42 +17347,42 @@
*/
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->left_edge[__pyx_v_i])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->left_edge[__pyx_v_i])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- if (__Pyx_SetItemInt(((PyObject *)__pyx_v_split_right), __pyx_v_i, __pyx_t_1, sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetItemInt(((PyObject *)__pyx_v_split_right), __pyx_v_i, __pyx_t_1, sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 622; __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":603
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":623
*
* for i in range(3): split_right[i] = self.left_edge[i]
* split_right[direction] = sp[direction] # <<<<<<<<<<<<<<
* right = ProtoPrism(self.parent_grid_id, split_right, self.RightEdge,
* self.subgrid_faces)
*/
- __pyx_t_1 = PyFloat_FromDouble((__pyx_v_sp[__pyx_v_direction])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 603; __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[2]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- if (__Pyx_SetItemInt(((PyObject *)__pyx_v_split_right), __pyx_v_direction, __pyx_t_1, sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetItemInt(((PyObject *)__pyx_v_split_right), __pyx_v_direction, __pyx_t_1, sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 623; __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":604
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":624
* for i in range(3): split_right[i] = self.left_edge[i]
* split_right[direction] = sp[direction]
* right = ProtoPrism(self.parent_grid_id, split_right, self.RightEdge, # <<<<<<<<<<<<<<
* self.subgrid_faces)
*
*/
- __pyx_t_1 = PyInt_FromLong(__pyx_v_self->parent_grid_id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_self->parent_grid_id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":605
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":625
* split_right[direction] = sp[direction]
* right = ProtoPrism(self.parent_grid_id, split_right, self.RightEdge,
* self.subgrid_faces) # <<<<<<<<<<<<<<
*
* return (left, right)
*/
- __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
@@ -17231,14 +17396,14 @@
PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_self->subgrid_faces);
__Pyx_GIVEREF(__pyx_v_self->subgrid_faces);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_2yt_9amr_utils_ProtoPrism)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_2yt_9amr_utils_ProtoPrism)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__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":607
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":627
* self.subgrid_faces)
*
* return (left, right) # <<<<<<<<<<<<<<
@@ -17246,7 +17411,7 @@
* @cython.boundscheck(False)
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_left);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_left);
@@ -17276,7 +17441,7 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":611
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":631
* @cython.boundscheck(False)
* @cython.wraparound(False)
* def get_brick(self, np.ndarray[np.float64_t, ndim=1] grid_left_edge, # <<<<<<<<<<<<<<
@@ -17338,17 +17503,17 @@
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__grid_dds);
if (likely(values[1])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("get_brick", 1, 3, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("get_brick", 1, 3, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__child_mask);
if (likely(values[2])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("get_brick", 1, 3, 3, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("get_brick", 1, 3, 3, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 631; __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[2]; __pyx_lineno = 611; __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[2]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
__pyx_v_grid_left_edge = ((PyArrayObject *)values[0]);
__pyx_v_grid_dds = ((PyArrayObject *)values[1]);
@@ -17362,7 +17527,7 @@
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("get_brick", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("get_brick", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.ProtoPrism.get_brick");
return NULL;
@@ -17374,22 +17539,22 @@
__pyx_bstruct_dims.buf = NULL;
__pyx_bstruct_grid_left_edge.buf = NULL;
__pyx_bstruct_grid_dds.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[2]; __pyx_lineno = 611; __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[2]; __pyx_lineno = 612; __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[2]; __pyx_lineno = 631; __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[2]; __pyx_lineno = 632; __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[2]; __pyx_lineno = 611; __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[2]; __pyx_lineno = 631; __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[2]; __pyx_lineno = 611; __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[2]; __pyx_lineno = 631; __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];
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":618
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":638
* cdef PartitionedGrid PG
* cdef int li[3], ri[3], idims[3], i
* for i in range(3): # <<<<<<<<<<<<<<
@@ -17399,7 +17564,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":619
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":639
* 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]) # <<<<<<<<<<<<<<
@@ -17410,7 +17575,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":620
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":640
* 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]) # <<<<<<<<<<<<<<
@@ -17421,7 +17586,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":621
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":641
* 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] # <<<<<<<<<<<<<<
@@ -17431,20 +17596,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":622
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":642
* 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[2]; __pyx_lineno = 622; __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[2]; __pyx_lineno = 642; __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[2]; __pyx_lineno = 622; __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[2]; __pyx_lineno = 642; __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[2]; __pyx_lineno = 622; __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[2]; __pyx_lineno = 642; __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[2]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6);
__Pyx_GIVEREF(__pyx_t_6);
@@ -17455,17 +17620,17 @@
__pyx_t_6 = 0;
__pyx_t_7 = 0;
__pyx_t_8 = 0;
- __pyx_t_8 = PyObject_GetItem(__pyx_v_child_mask, __pyx_t_9); if (!__pyx_t_8) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_GetItem(__pyx_v_child_mask, __pyx_t_9); if (!__pyx_t_8) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_9 = PyObject_RichCompare(__pyx_t_8, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyObject_RichCompare(__pyx_t_8, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 622; __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[2]; __pyx_lineno = 642; __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[2]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_9));
__pyx_r = ((PyObject *)__pyx_t_9);
__pyx_t_9 = 0;
@@ -17474,38 +17639,38 @@
}
__pyx_L8:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":623
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":643
* 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_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
- __pyx_t_8 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__empty); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__empty); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_INCREF(__pyx_int_3);
PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_int_3);
__Pyx_GIVEREF(__pyx_int_3);
- __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_7));
- if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__int64)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_6 = PyEval_CallObjectWithKeywords(__pyx_t_8, __pyx_t_9, ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__int64)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyEval_CallObjectWithKeywords(__pyx_t_8, __pyx_t_9, ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
- if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_11 = ((PyArrayObject *)__pyx_t_6);
{
__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[2]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[2]; __pyx_lineno = 643; __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];
}
@@ -17514,7 +17679,7 @@
__pyx_v_dims = ((PyArrayObject *)__pyx_t_6);
__pyx_t_6 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":624
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":644
* 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): # <<<<<<<<<<<<<<
@@ -17524,7 +17689,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":625
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":645
* cdef np.ndarray[np.int64_t, ndim=1] dims = np.empty(3, dtype='int64')
* for i in range(3):
* dims[i] = idims[i] # <<<<<<<<<<<<<<
@@ -17535,17 +17700,17 @@
*__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":630
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":650
* #PG = PartitionedGrid(self.parent_grid_id, new_data,
* # self.LeftEdge, self.RightEdge, dims)
* return ((li[0], ri[0]), (li[1], ri[1]), (li[2], ri[2]), dims) # <<<<<<<<<<<<<<
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_6 = PyInt_FromLong((__pyx_v_li[0])); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 630; __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[2]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = PyInt_FromLong((__pyx_v_ri[0])); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyInt_FromLong((__pyx_v_ri[0])); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6);
__Pyx_GIVEREF(__pyx_t_6);
@@ -17553,11 +17718,11 @@
__Pyx_GIVEREF(__pyx_t_7);
__pyx_t_6 = 0;
__pyx_t_7 = 0;
- __pyx_t_7 = PyInt_FromLong((__pyx_v_li[1])); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 630; __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[2]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_6 = PyInt_FromLong((__pyx_v_ri[1])); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyInt_FromLong((__pyx_v_ri[1])); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
__Pyx_GIVEREF(__pyx_t_7);
@@ -17565,11 +17730,11 @@
__Pyx_GIVEREF(__pyx_t_6);
__pyx_t_7 = 0;
__pyx_t_6 = 0;
- __pyx_t_6 = PyInt_FromLong((__pyx_v_li[2])); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyInt_FromLong((__pyx_v_li[2])); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = PyInt_FromLong((__pyx_v_ri[2])); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyInt_FromLong((__pyx_v_ri[2])); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_13);
PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_6);
__Pyx_GIVEREF(__pyx_t_6);
@@ -17577,7 +17742,7 @@
__Pyx_GIVEREF(__pyx_t_7);
__pyx_t_6 = 0;
__pyx_t_7 = 0;
- __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_9);
__Pyx_GIVEREF(__pyx_t_9);
@@ -20400,31 +20565,31 @@
*
* # This is something of a translation of the matplotlib _png module
* cdef png_byte *pix_buffer = <png_byte *> buffer.data # <<<<<<<<<<<<<<
- * cdef int width = buffer.shape[0]
- * cdef int height = buffer.shape[1]
+ * cdef int width = buffer.shape[1]
+ * cdef int height = buffer.shape[0]
*/
__pyx_v_pix_buffer = ((png_byte *)__pyx_v_buffer->data);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":107
* # This is something of a translation of the matplotlib _png module
* cdef png_byte *pix_buffer = <png_byte *> buffer.data
- * cdef int width = buffer.shape[0] # <<<<<<<<<<<<<<
- * cdef int height = buffer.shape[1]
+ * cdef int width = buffer.shape[1] # <<<<<<<<<<<<<<
+ * cdef int height = buffer.shape[0]
*
*/
- __pyx_v_width = (__pyx_v_buffer->dimensions[0]);
+ __pyx_v_width = (__pyx_v_buffer->dimensions[1]);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":108
* cdef png_byte *pix_buffer = <png_byte *> buffer.data
- * cdef int width = buffer.shape[0]
- * cdef int height = buffer.shape[1] # <<<<<<<<<<<<<<
+ * cdef int width = buffer.shape[1]
+ * cdef int height = buffer.shape[0] # <<<<<<<<<<<<<<
*
* cdef FILE* fileobj = fopen(filename, "wb")
*/
- __pyx_v_height = (__pyx_v_buffer->dimensions[1]);
+ __pyx_v_height = (__pyx_v_buffer->dimensions[0]);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":110
- * cdef int height = buffer.shape[1]
+ * cdef int height = buffer.shape[0]
*
* cdef FILE* fileobj = fopen(filename, "wb") # <<<<<<<<<<<<<<
* cdef png_bytep *row_pointers
@@ -21304,84 +21469,2232 @@
*/
__pyx_t_14 = 1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/fortran_reader.pyx":65
- * moff = (slab_start[0] ) * strides[0] \
- * + (slab_start[1] + j) * strides[1] \
- * + (slab_start[2] + i) * strides[2] # <<<<<<<<<<<<<<
- * #print offset + 4 * moff, pos
- * fseek(f, offset + 4 * moff, SEEK_SET)
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/fortran_reader.pyx":65
+ * moff = (slab_start[0] ) * strides[0] \
+ * + (slab_start[1] + j) * strides[1] \
+ * + (slab_start[2] + i) * strides[2] # <<<<<<<<<<<<<<
+ * #print offset + 4 * moff, pos
+ * fseek(f, offset + 4 * moff, SEEK_SET)
+ */
+ __pyx_t_15 = 2;
+ __pyx_v_moff = ((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_slab_start.buf, __pyx_t_13, __pyx_bstride_0_slab_start)) * (__pyx_v_strides[0])) + (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_slab_start.buf, __pyx_t_14, __pyx_bstride_0_slab_start)) + __pyx_v_j) * (__pyx_v_strides[1]))) + (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_slab_start.buf, __pyx_t_15, __pyx_bstride_0_slab_start)) + __pyx_v_i) * (__pyx_v_strides[2])));
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/fortran_reader.pyx":67
+ * + (slab_start[2] + i) * strides[2]
+ * #print offset + 4 * moff, pos
+ * fseek(f, offset + 4 * moff, SEEK_SET) # <<<<<<<<<<<<<<
+ * fread(<void *> (data + pos), 4, slab_size[0], f)
+ * pos += slab_size[0]
+ */
+ fseek(__pyx_v_f, (__pyx_v_offset + (4 * __pyx_v_moff)), SEEK_SET);
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/fortran_reader.pyx":68
+ * #print offset + 4 * moff, pos
+ * fseek(f, offset + 4 * moff, SEEK_SET)
+ * fread(<void *> (data + pos), 4, slab_size[0], f) # <<<<<<<<<<<<<<
+ * pos += slab_size[0]
+ * return buffer
+ */
+ __pyx_t_16 = 0;
+ fread(((void *)(__pyx_v_data + __pyx_v_pos)), 4, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_slab_size.buf, __pyx_t_16, __pyx_bstride_0_slab_size)), __pyx_v_f);
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/fortran_reader.pyx":69
+ * fseek(f, offset + 4 * moff, SEEK_SET)
+ * fread(<void *> (data + pos), 4, slab_size[0], f)
+ * pos += slab_size[0] # <<<<<<<<<<<<<<
+ * return buffer
+ */
+ __pyx_t_17 = 0;
+ __pyx_v_pos += (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_slab_size.buf, __pyx_t_17, __pyx_bstride_0_slab_size));
+ }
+ }
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/fortran_reader.pyx":70
+ * fread(<void *> (data + pos), 4, slab_size[0], f)
+ * pos += slab_size[0]
+ * return buffer # <<<<<<<<<<<<<<
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(((PyObject *)__pyx_v_buffer));
+ __pyx_r = ((PyObject *)__pyx_v_buffer);
+ goto __pyx_L0;
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
+ __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
+ __Pyx_SafeReleaseBuffer(&__pyx_bstruct_slab_size);
+ __Pyx_SafeReleaseBuffer(&__pyx_bstruct_slab_start);
+ __Pyx_SafeReleaseBuffer(&__pyx_bstruct_root_size);
+ __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
+ __Pyx_AddTraceback("yt.amr_utils.read_tiger_section");
+ __pyx_r = NULL;
+ goto __pyx_L2;
+ __pyx_L0:;
+ __Pyx_SafeReleaseBuffer(&__pyx_bstruct_slab_size);
+ __Pyx_SafeReleaseBuffer(&__pyx_bstruct_slab_start);
+ __Pyx_SafeReleaseBuffer(&__pyx_bstruct_root_size);
+ __pyx_L2:;
+ __Pyx_XDECREF((PyObject *)__pyx_v_buffer);
+ __Pyx_DECREF((PyObject *)__pyx_v_slab_start);
+ __Pyx_DECREF((PyObject *)__pyx_v_slab_size);
+ __Pyx_DECREF((PyObject *)__pyx_v_root_size);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":47
+ * QuadTreeNode *children[2][2]
+ *
+ * cdef void QTN_add_value(QuadTreeNode *self, # <<<<<<<<<<<<<<
+ * np.float64_t *val, np.float64_t weight_val):
+ * cdef int i
+ */
+
+static void __pyx_f_2yt_9amr_utils_QTN_add_value(struct __pyx_t_2yt_9amr_utils_QuadTreeNode *__pyx_v_self, __pyx_t_5numpy_float64_t *__pyx_v_val, __pyx_t_5numpy_float64_t __pyx_v_weight_val) {
+ int __pyx_v_i;
+ int __pyx_t_1;
+ int __pyx_t_2;
+ __Pyx_RefNannySetupContext("QTN_add_value");
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":50
+ * np.float64_t *val, np.float64_t weight_val):
+ * cdef int i
+ * for i in range(self.nvals): # <<<<<<<<<<<<<<
+ * self.val[i] += val[i]
+ * self.weight_val += weight_val
+ */
+ __pyx_t_1 = __pyx_v_self->nvals;
+ for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
+ __pyx_v_i = __pyx_t_2;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":51
+ * cdef int i
+ * for i in range(self.nvals):
+ * self.val[i] += val[i] # <<<<<<<<<<<<<<
+ * self.weight_val += weight_val
+ *
+ */
+ (__pyx_v_self->val[__pyx_v_i]) += (__pyx_v_val[__pyx_v_i]);
+ }
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":52
+ * for i in range(self.nvals):
+ * self.val[i] += val[i]
+ * self.weight_val += weight_val # <<<<<<<<<<<<<<
+ *
+ * cdef void QTN_refine(QuadTreeNode *self):
+ */
+ __pyx_v_self->weight_val += __pyx_v_weight_val;
+
+ __Pyx_RefNannyFinishContext();
+}
+
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":54
+ * self.weight_val += weight_val
+ *
+ * cdef void QTN_refine(QuadTreeNode *self): # <<<<<<<<<<<<<<
+ * cdef int i, j, i1, j1
+ * cdef np.int64_t npos[2]
+ */
+
+static void __pyx_f_2yt_9amr_utils_QTN_refine(struct __pyx_t_2yt_9amr_utils_QuadTreeNode *__pyx_v_self) {
+ int __pyx_v_i;
+ int __pyx_v_j;
+ __pyx_t_5numpy_int64_t __pyx_v_npos[2];
+ int __pyx_t_1;
+ int __pyx_t_2;
+ __Pyx_RefNannySetupContext("QTN_refine");
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":58
+ * cdef np.int64_t npos[2]
+ * cdef QuadTreeNode *node
+ * for i in range(2): # <<<<<<<<<<<<<<
+ * npos[0] = self.pos[0] * 2 + i
+ * for j in range(2):
+ */
+ for (__pyx_t_1 = 0; __pyx_t_1 < 2; __pyx_t_1+=1) {
+ __pyx_v_i = __pyx_t_1;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":59
+ * cdef QuadTreeNode *node
+ * for i in range(2):
+ * npos[0] = self.pos[0] * 2 + i # <<<<<<<<<<<<<<
+ * for j in range(2):
+ * npos[1] = self.pos[1] * 2 + j
+ */
+ (__pyx_v_npos[0]) = (((__pyx_v_self->pos[0]) * 2) + __pyx_v_i);
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":60
+ * for i in range(2):
+ * npos[0] = self.pos[0] * 2 + i
+ * for j in range(2): # <<<<<<<<<<<<<<
+ * npos[1] = self.pos[1] * 2 + j
+ * # We have to be careful with allocation...
+ */
+ for (__pyx_t_2 = 0; __pyx_t_2 < 2; __pyx_t_2+=1) {
+ __pyx_v_j = __pyx_t_2;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":61
+ * npos[0] = self.pos[0] * 2 + i
+ * for j in range(2):
+ * npos[1] = self.pos[1] * 2 + j # <<<<<<<<<<<<<<
+ * # We have to be careful with allocation...
+ * self.children[i][j] = QTN_initialize(
+ */
+ (__pyx_v_npos[1]) = (((__pyx_v_self->pos[1]) * 2) + __pyx_v_j);
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":63
+ * npos[1] = self.pos[1] * 2 + j
+ * # We have to be careful with allocation...
+ * self.children[i][j] = QTN_initialize( # <<<<<<<<<<<<<<
+ * npos,
+ * self.nvals, self.val, self.weight_val,
+ */
+ ((__pyx_v_self->children[__pyx_v_i])[__pyx_v_j]) = __pyx_f_2yt_9amr_utils_QTN_initialize(__pyx_v_npos, __pyx_v_self->nvals, __pyx_v_self->val, __pyx_v_self->weight_val, (__pyx_v_self->level + 1));
+ }
+ }
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":67
+ * self.nvals, self.val, self.weight_val,
+ * self.level + 1)
+ * for i in range(self.nvals): self.val[i] = 0.0 # <<<<<<<<<<<<<<
+ * self.weight_val = 0.0
+ *
+ */
+ __pyx_t_1 = __pyx_v_self->nvals;
+ for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
+ __pyx_v_i = __pyx_t_2;
+ (__pyx_v_self->val[__pyx_v_i]) = 0.0;
+ }
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":68
+ * self.level + 1)
+ * for i in range(self.nvals): self.val[i] = 0.0
+ * self.weight_val = 0.0 # <<<<<<<<<<<<<<
+ *
+ * cdef QuadTreeNode *QTN_initialize(np.int64_t pos[2], int nvals,
+ */
+ __pyx_v_self->weight_val = 0.0;
+
+ __Pyx_RefNannyFinishContext();
+}
+
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":70
+ * self.weight_val = 0.0
+ *
+ * cdef QuadTreeNode *QTN_initialize(np.int64_t pos[2], int nvals, # <<<<<<<<<<<<<<
+ * np.float64_t *val, np.float64_t weight_val,
+ * int level):
+ */
+
+static struct __pyx_t_2yt_9amr_utils_QuadTreeNode *__pyx_f_2yt_9amr_utils_QTN_initialize(__pyx_t_5numpy_int64_t *__pyx_v_pos, int __pyx_v_nvals, __pyx_t_5numpy_float64_t *__pyx_v_val, __pyx_t_5numpy_float64_t __pyx_v_weight_val, int __pyx_v_level) {
+ struct __pyx_t_2yt_9amr_utils_QuadTreeNode *__pyx_v_node;
+ int __pyx_v_i;
+ int __pyx_v_j;
+ struct __pyx_t_2yt_9amr_utils_QuadTreeNode *__pyx_r;
+ int __pyx_t_1;
+ int __pyx_t_2;
+ __Pyx_RefNannySetupContext("QTN_initialize");
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":75
+ * cdef QuadTreeNode *node
+ * cdef int i, j
+ * node = <QuadTreeNode *> malloc(sizeof(QuadTreeNode)) # <<<<<<<<<<<<<<
+ * node.pos[0] = pos[0]
+ * node.pos[1] = pos[1]
+ */
+ __pyx_v_node = ((struct __pyx_t_2yt_9amr_utils_QuadTreeNode *)malloc((sizeof(struct __pyx_t_2yt_9amr_utils_QuadTreeNode))));
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":76
+ * cdef int i, j
+ * node = <QuadTreeNode *> malloc(sizeof(QuadTreeNode))
+ * node.pos[0] = pos[0] # <<<<<<<<<<<<<<
+ * node.pos[1] = pos[1]
+ * node.nvals = nvals
+ */
+ (__pyx_v_node->pos[0]) = (__pyx_v_pos[0]);
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":77
+ * node = <QuadTreeNode *> malloc(sizeof(QuadTreeNode))
+ * node.pos[0] = pos[0]
+ * node.pos[1] = pos[1] # <<<<<<<<<<<<<<
+ * node.nvals = nvals
+ * node.val = <np.float64_t *> malloc(
+ */
+ (__pyx_v_node->pos[1]) = (__pyx_v_pos[1]);
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":78
+ * node.pos[0] = pos[0]
+ * node.pos[1] = pos[1]
+ * node.nvals = nvals # <<<<<<<<<<<<<<
+ * node.val = <np.float64_t *> malloc(
+ * nvals * sizeof(np.float64_t))
+ */
+ __pyx_v_node->nvals = __pyx_v_nvals;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":79
+ * node.pos[1] = pos[1]
+ * node.nvals = nvals
+ * node.val = <np.float64_t *> malloc( # <<<<<<<<<<<<<<
+ * nvals * sizeof(np.float64_t))
+ * for i in range(nvals):
+ */
+ __pyx_v_node->val = ((__pyx_t_5numpy_float64_t *)malloc((__pyx_v_nvals * (sizeof(__pyx_t_5numpy_float64_t)))));
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":81
+ * node.val = <np.float64_t *> malloc(
+ * nvals * sizeof(np.float64_t))
+ * for i in range(nvals): # <<<<<<<<<<<<<<
+ * node.val[i] = val[i]
+ * node.weight_val = weight_val
+ */
+ __pyx_t_1 = __pyx_v_nvals;
+ for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
+ __pyx_v_i = __pyx_t_2;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":82
+ * nvals * sizeof(np.float64_t))
+ * for i in range(nvals):
+ * node.val[i] = val[i] # <<<<<<<<<<<<<<
+ * node.weight_val = weight_val
+ * for i in range(2):
+ */
+ (__pyx_v_node->val[__pyx_v_i]) = (__pyx_v_val[__pyx_v_i]);
+ }
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":83
+ * for i in range(nvals):
+ * node.val[i] = val[i]
+ * node.weight_val = weight_val # <<<<<<<<<<<<<<
+ * for i in range(2):
+ * for j in range(2):
+ */
+ __pyx_v_node->weight_val = __pyx_v_weight_val;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":84
+ * node.val[i] = val[i]
+ * node.weight_val = weight_val
+ * for i in range(2): # <<<<<<<<<<<<<<
+ * for j in range(2):
+ * node.children[i][j] = NULL
+ */
+ for (__pyx_t_1 = 0; __pyx_t_1 < 2; __pyx_t_1+=1) {
+ __pyx_v_i = __pyx_t_1;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":85
+ * node.weight_val = weight_val
+ * for i in range(2):
+ * for j in range(2): # <<<<<<<<<<<<<<
+ * node.children[i][j] = NULL
+ * node.level = level
+ */
+ for (__pyx_t_2 = 0; __pyx_t_2 < 2; __pyx_t_2+=1) {
+ __pyx_v_j = __pyx_t_2;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":86
+ * for i in range(2):
+ * for j in range(2):
+ * node.children[i][j] = NULL # <<<<<<<<<<<<<<
+ * node.level = level
+ * return node
+ */
+ ((__pyx_v_node->children[__pyx_v_i])[__pyx_v_j]) = NULL;
+ }
+ }
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":87
+ * for j in range(2):
+ * node.children[i][j] = NULL
+ * node.level = level # <<<<<<<<<<<<<<
+ * return node
+ *
+ */
+ __pyx_v_node->level = __pyx_v_level;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":88
+ * node.children[i][j] = NULL
+ * node.level = level
+ * return node # <<<<<<<<<<<<<<
+ *
+ * cdef void QTN_free(QuadTreeNode *node):
+ */
+ __pyx_r = __pyx_v_node;
+ goto __pyx_L0;
+
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":90
+ * return node
+ *
+ * cdef void QTN_free(QuadTreeNode *node): # <<<<<<<<<<<<<<
+ * cdef int i, j
+ * for i in range(2):
+ */
+
+static void __pyx_f_2yt_9amr_utils_QTN_free(struct __pyx_t_2yt_9amr_utils_QuadTreeNode *__pyx_v_node) {
+ int __pyx_v_i;
+ int __pyx_v_j;
+ int __pyx_t_1;
+ int __pyx_t_2;
+ int __pyx_t_3;
+ __Pyx_RefNannySetupContext("QTN_free");
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":92
+ * cdef void QTN_free(QuadTreeNode *node):
+ * cdef int i, j
+ * for i in range(2): # <<<<<<<<<<<<<<
+ * for j in range(2):
+ * if node.children[i][j] == NULL: continue
+ */
+ for (__pyx_t_1 = 0; __pyx_t_1 < 2; __pyx_t_1+=1) {
+ __pyx_v_i = __pyx_t_1;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":93
+ * cdef int i, j
+ * for i in range(2):
+ * for j in range(2): # <<<<<<<<<<<<<<
+ * if node.children[i][j] == NULL: continue
+ * QTN_free(node.children[i][j])
+ */
+ for (__pyx_t_2 = 0; __pyx_t_2 < 2; __pyx_t_2+=1) {
+ __pyx_v_j = __pyx_t_2;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":94
+ * for i in range(2):
+ * for j in range(2):
+ * if node.children[i][j] == NULL: continue # <<<<<<<<<<<<<<
+ * QTN_free(node.children[i][j])
+ * free(node.val)
+ */
+ __pyx_t_3 = (((__pyx_v_node->children[__pyx_v_i])[__pyx_v_j]) == NULL);
+ if (__pyx_t_3) {
+ goto __pyx_L5_continue;
+ goto __pyx_L7;
+ }
+ __pyx_L7:;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":95
+ * for j in range(2):
+ * if node.children[i][j] == NULL: continue
+ * QTN_free(node.children[i][j]) # <<<<<<<<<<<<<<
+ * free(node.val)
+ * free(node)
+ */
+ __pyx_f_2yt_9amr_utils_QTN_free(((__pyx_v_node->children[__pyx_v_i])[__pyx_v_j]));
+ __pyx_L5_continue:;
+ }
+ }
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":96
+ * if node.children[i][j] == NULL: continue
+ * QTN_free(node.children[i][j])
+ * free(node.val) # <<<<<<<<<<<<<<
+ * free(node)
+ *
+ */
+ free(__pyx_v_node->val);
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":97
+ * QTN_free(node.children[i][j])
+ * free(node.val)
+ * free(node) # <<<<<<<<<<<<<<
+ *
+ * cdef class QuadTree:
+ */
+ free(__pyx_v_node);
+
+ __Pyx_RefNannyFinishContext();
+}
+
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":105
+ * cdef np.int64_t top_grid_dims[2]
+ *
+ * def __cinit__(self, np.ndarray[np.int64_t, ndim=1] top_grid_dims, # <<<<<<<<<<<<<<
+ * int nvals):
+ * cdef int i, j
+ */
+
+static int __pyx_pf_2yt_9amr_utils_8QuadTree___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_8QuadTree___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyArrayObject *__pyx_v_top_grid_dims = 0;
+ int __pyx_v_nvals;
+ int __pyx_v_i;
+ int __pyx_v_j;
+ __pyx_t_5numpy_int64_t __pyx_v_pos[2];
+ __pyx_t_5numpy_float64_t *__pyx_v_vals;
+ __pyx_t_5numpy_float64_t __pyx_v_weight_val;
+ Py_buffer __pyx_bstruct_top_grid_dims;
+ Py_ssize_t __pyx_bstride_0_top_grid_dims = 0;
+ Py_ssize_t __pyx_bshape_0_top_grid_dims = 0;
+ int __pyx_r;
+ int __pyx_t_1;
+ int __pyx_t_2;
+ long __pyx_t_3;
+ long __pyx_t_4;
+ long __pyx_t_5;
+ long __pyx_t_6;
+ __pyx_t_5numpy_int64_t __pyx_t_7;
+ long __pyx_t_8;
+ long __pyx_t_9;
+ __pyx_t_5numpy_int64_t __pyx_t_10;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__top_grid_dims,&__pyx_n_s__nvals,0};
+ __Pyx_RefNannySetupContext("__cinit__");
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
+ PyObject* values[2] = {0,0};
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 0:
+ values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__top_grid_dims);
+ if (likely(values[0])) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nvals);
+ if (likely(values[1])) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[10]; __pyx_lineno = 105; __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[10]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ __pyx_v_top_grid_dims = ((PyArrayObject *)values[0]);
+ __pyx_v_nvals = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_nvals == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ __pyx_v_top_grid_dims = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
+ __pyx_v_nvals = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_nvals == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[10]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("yt.amr_utils.QuadTree.__cinit__");
+ return -1;
+ __pyx_L4_argument_unpacking_done:;
+ __Pyx_INCREF((PyObject *)__pyx_v_self);
+ __Pyx_INCREF((PyObject *)__pyx_v_top_grid_dims);
+ __pyx_bstruct_top_grid_dims.buf = NULL;
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_top_grid_dims), __pyx_ptype_5numpy_ndarray, 1, "top_grid_dims", 0))) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {
+ __Pyx_BufFmt_StackElem __pyx_stack[1];
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_top_grid_dims, (PyObject*)__pyx_v_top_grid_dims, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_bstride_0_top_grid_dims = __pyx_bstruct_top_grid_dims.strides[0];
+ __pyx_bshape_0_top_grid_dims = __pyx_bstruct_top_grid_dims.shape[0];
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":111
+ * cdef np.int64_t pos[2]
+ * cdef np.float64_t *vals = <np.float64_t *> alloca(
+ * sizeof(np.float64_t)*nvals) # <<<<<<<<<<<<<<
+ * cdef np.float64_t weight_val = 0.0
+ * self.nvals = nvals
+ */
+ __pyx_v_vals = ((__pyx_t_5numpy_float64_t *)alloca(((sizeof(__pyx_t_5numpy_float64_t)) * __pyx_v_nvals)));
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":112
+ * cdef np.float64_t *vals = <np.float64_t *> alloca(
+ * sizeof(np.float64_t)*nvals)
+ * cdef np.float64_t weight_val = 0.0 # <<<<<<<<<<<<<<
+ * self.nvals = nvals
+ * for i in range(nvals): vals[i] = 0.0
+ */
+ __pyx_v_weight_val = 0.0;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":113
+ * sizeof(np.float64_t)*nvals)
+ * cdef np.float64_t weight_val = 0.0
+ * self.nvals = nvals # <<<<<<<<<<<<<<
+ * for i in range(nvals): vals[i] = 0.0
+ *
+ */
+ ((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self)->nvals = __pyx_v_nvals;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":114
+ * cdef np.float64_t weight_val = 0.0
+ * self.nvals = nvals
+ * for i in range(nvals): vals[i] = 0.0 # <<<<<<<<<<<<<<
+ *
+ * self.top_grid_dims[0] = top_grid_dims[0]
+ */
+ __pyx_t_1 = __pyx_v_nvals;
+ for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
+ __pyx_v_i = __pyx_t_2;
+ (__pyx_v_vals[__pyx_v_i]) = 0.0;
+ }
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":116
+ * for i in range(nvals): vals[i] = 0.0
+ *
+ * self.top_grid_dims[0] = top_grid_dims[0] # <<<<<<<<<<<<<<
+ * self.top_grid_dims[1] = top_grid_dims[1]
+ *
+ */
+ __pyx_t_3 = 0;
+ __pyx_t_1 = -1;
+ if (__pyx_t_3 < 0) {
+ __pyx_t_3 += __pyx_bshape_0_top_grid_dims;
+ if (unlikely(__pyx_t_3 < 0)) __pyx_t_1 = 0;
+ } else if (unlikely(__pyx_t_3 >= __pyx_bshape_0_top_grid_dims)) __pyx_t_1 = 0;
+ if (unlikely(__pyx_t_1 != -1)) {
+ __Pyx_RaiseBufferIndexError(__pyx_t_1);
+ {__pyx_filename = __pyx_f[10]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ (((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self)->top_grid_dims[0]) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_top_grid_dims.buf, __pyx_t_3, __pyx_bstride_0_top_grid_dims));
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":117
+ *
+ * self.top_grid_dims[0] = top_grid_dims[0]
+ * self.top_grid_dims[1] = top_grid_dims[1] # <<<<<<<<<<<<<<
+ *
+ * # This wouldn't be necessary if we did bitshifting...
+ */
+ __pyx_t_4 = 1;
+ __pyx_t_1 = -1;
+ if (__pyx_t_4 < 0) {
+ __pyx_t_4 += __pyx_bshape_0_top_grid_dims;
+ if (unlikely(__pyx_t_4 < 0)) __pyx_t_1 = 0;
+ } else if (unlikely(__pyx_t_4 >= __pyx_bshape_0_top_grid_dims)) __pyx_t_1 = 0;
+ if (unlikely(__pyx_t_1 != -1)) {
+ __Pyx_RaiseBufferIndexError(__pyx_t_1);
+ {__pyx_filename = __pyx_f[10]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ (((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self)->top_grid_dims[1]) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_top_grid_dims.buf, __pyx_t_4, __pyx_bstride_0_top_grid_dims));
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":120
+ *
+ * # This wouldn't be necessary if we did bitshifting...
+ * for i in range(80): # <<<<<<<<<<<<<<
+ * self.po2[i] = 2**i
+ * self.root_nodes = <QuadTreeNode ***> \
+ */
+ for (__pyx_t_1 = 0; __pyx_t_1 < 80; __pyx_t_1+=1) {
+ __pyx_v_i = __pyx_t_1;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":121
+ * # This wouldn't be necessary if we did bitshifting...
+ * for i in range(80):
+ * self.po2[i] = 2**i # <<<<<<<<<<<<<<
+ * self.root_nodes = <QuadTreeNode ***> \
+ * malloc(sizeof(QuadTreeNode **) * top_grid_dims[0])
+ */
+ (((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self)->po2[__pyx_v_i]) = __Pyx_pow_long(2, __pyx_v_i);
+ }
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":123
+ * self.po2[i] = 2**i
+ * self.root_nodes = <QuadTreeNode ***> \
+ * malloc(sizeof(QuadTreeNode **) * top_grid_dims[0]) # <<<<<<<<<<<<<<
+ *
+ * # We initialize our root values to 0.0.
+ */
+ __pyx_t_5 = 0;
+ __pyx_t_1 = -1;
+ if (__pyx_t_5 < 0) {
+ __pyx_t_5 += __pyx_bshape_0_top_grid_dims;
+ if (unlikely(__pyx_t_5 < 0)) __pyx_t_1 = 0;
+ } else if (unlikely(__pyx_t_5 >= __pyx_bshape_0_top_grid_dims)) __pyx_t_1 = 0;
+ if (unlikely(__pyx_t_1 != -1)) {
+ __Pyx_RaiseBufferIndexError(__pyx_t_1);
+ {__pyx_filename = __pyx_f[10]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":122
+ * for i in range(80):
+ * self.po2[i] = 2**i
+ * self.root_nodes = <QuadTreeNode ***> \ # <<<<<<<<<<<<<<
+ * malloc(sizeof(QuadTreeNode **) * top_grid_dims[0])
+ *
+ */
+ ((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self)->root_nodes = ((struct __pyx_t_2yt_9amr_utils_QuadTreeNode ***)malloc(((sizeof(struct __pyx_t_2yt_9amr_utils_QuadTreeNode **)) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_top_grid_dims.buf, __pyx_t_5, __pyx_bstride_0_top_grid_dims)))));
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":126
+ *
+ * # We initialize our root values to 0.0.
+ * for i in range(top_grid_dims[0]): # <<<<<<<<<<<<<<
+ * pos[0] = i
+ * self.root_nodes[i] = <QuadTreeNode **> \
+ */
+ __pyx_t_6 = 0;
+ __pyx_t_1 = -1;
+ if (__pyx_t_6 < 0) {
+ __pyx_t_6 += __pyx_bshape_0_top_grid_dims;
+ if (unlikely(__pyx_t_6 < 0)) __pyx_t_1 = 0;
+ } else if (unlikely(__pyx_t_6 >= __pyx_bshape_0_top_grid_dims)) __pyx_t_1 = 0;
+ if (unlikely(__pyx_t_1 != -1)) {
+ __Pyx_RaiseBufferIndexError(__pyx_t_1);
+ {__pyx_filename = __pyx_f[10]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_7 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_top_grid_dims.buf, __pyx_t_6, __pyx_bstride_0_top_grid_dims));
+ for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_7; __pyx_t_1+=1) {
+ __pyx_v_i = __pyx_t_1;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":127
+ * # We initialize our root values to 0.0.
+ * for i in range(top_grid_dims[0]):
+ * pos[0] = i # <<<<<<<<<<<<<<
+ * self.root_nodes[i] = <QuadTreeNode **> \
+ * malloc(sizeof(QuadTreeNode *) * top_grid_dims[1])
+ */
+ (__pyx_v_pos[0]) = __pyx_v_i;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":129
+ * pos[0] = i
+ * self.root_nodes[i] = <QuadTreeNode **> \
+ * malloc(sizeof(QuadTreeNode *) * top_grid_dims[1]) # <<<<<<<<<<<<<<
+ * for j in range(top_grid_dims[1]):
+ * pos[1] = j
+ */
+ __pyx_t_8 = 1;
+ __pyx_t_2 = -1;
+ if (__pyx_t_8 < 0) {
+ __pyx_t_8 += __pyx_bshape_0_top_grid_dims;
+ if (unlikely(__pyx_t_8 < 0)) __pyx_t_2 = 0;
+ } else if (unlikely(__pyx_t_8 >= __pyx_bshape_0_top_grid_dims)) __pyx_t_2 = 0;
+ if (unlikely(__pyx_t_2 != -1)) {
+ __Pyx_RaiseBufferIndexError(__pyx_t_2);
+ {__pyx_filename = __pyx_f[10]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":128
+ * for i in range(top_grid_dims[0]):
+ * pos[0] = i
+ * self.root_nodes[i] = <QuadTreeNode **> \ # <<<<<<<<<<<<<<
+ * malloc(sizeof(QuadTreeNode *) * top_grid_dims[1])
+ * for j in range(top_grid_dims[1]):
+ */
+ (((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self)->root_nodes[__pyx_v_i]) = ((struct __pyx_t_2yt_9amr_utils_QuadTreeNode **)malloc(((sizeof(struct __pyx_t_2yt_9amr_utils_QuadTreeNode *)) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_top_grid_dims.buf, __pyx_t_8, __pyx_bstride_0_top_grid_dims)))));
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":130
+ * self.root_nodes[i] = <QuadTreeNode **> \
+ * malloc(sizeof(QuadTreeNode *) * top_grid_dims[1])
+ * for j in range(top_grid_dims[1]): # <<<<<<<<<<<<<<
+ * pos[1] = j
+ * self.root_nodes[i][j] = QTN_initialize(
+ */
+ __pyx_t_9 = 1;
+ __pyx_t_2 = -1;
+ if (__pyx_t_9 < 0) {
+ __pyx_t_9 += __pyx_bshape_0_top_grid_dims;
+ if (unlikely(__pyx_t_9 < 0)) __pyx_t_2 = 0;
+ } else if (unlikely(__pyx_t_9 >= __pyx_bshape_0_top_grid_dims)) __pyx_t_2 = 0;
+ if (unlikely(__pyx_t_2 != -1)) {
+ __Pyx_RaiseBufferIndexError(__pyx_t_2);
+ {__pyx_filename = __pyx_f[10]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_10 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_top_grid_dims.buf, __pyx_t_9, __pyx_bstride_0_top_grid_dims));
+ for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_10; __pyx_t_2+=1) {
+ __pyx_v_j = __pyx_t_2;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":131
+ * malloc(sizeof(QuadTreeNode *) * top_grid_dims[1])
+ * for j in range(top_grid_dims[1]):
+ * pos[1] = j # <<<<<<<<<<<<<<
+ * self.root_nodes[i][j] = QTN_initialize(
+ * pos, nvals, vals, weight_val, 0)
+ */
+ (__pyx_v_pos[1]) = __pyx_v_j;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":132
+ * for j in range(top_grid_dims[1]):
+ * pos[1] = j
+ * self.root_nodes[i][j] = QTN_initialize( # <<<<<<<<<<<<<<
+ * pos, nvals, vals, weight_val, 0)
+ *
+ */
+ ((((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self)->root_nodes[__pyx_v_i])[__pyx_v_j]) = __pyx_f_2yt_9amr_utils_QTN_initialize(__pyx_v_pos, __pyx_v_nvals, __pyx_v_vals, __pyx_v_weight_val, 0);
+ }
+ }
+
+ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
+ __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
+ __Pyx_SafeReleaseBuffer(&__pyx_bstruct_top_grid_dims);
+ __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
+ __Pyx_AddTraceback("yt.amr_utils.QuadTree.__cinit__");
+ __pyx_r = -1;
+ goto __pyx_L2;
+ __pyx_L0:;
+ __Pyx_SafeReleaseBuffer(&__pyx_bstruct_top_grid_dims);
+ __pyx_L2:;
+ __Pyx_DECREF((PyObject *)__pyx_v_self);
+ __Pyx_DECREF((PyObject *)__pyx_v_top_grid_dims);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":135
+ * pos, nvals, vals, weight_val, 0)
+ *
+ * cdef void add_to_position(self, # <<<<<<<<<<<<<<
+ * int level, np.int64_t pos[2],
+ * np.float64_t *val,
+ */
+
+static void __pyx_f_2yt_9amr_utils_8QuadTree_add_to_position(struct __pyx_obj_2yt_9amr_utils_QuadTree *__pyx_v_self, int __pyx_v_level, __pyx_t_5numpy_int64_t *__pyx_v_pos, __pyx_t_5numpy_float64_t *__pyx_v_val, __pyx_t_5numpy_float64_t __pyx_v_weight_val) {
+ int __pyx_v_i;
+ int __pyx_v_j;
+ struct __pyx_t_2yt_9amr_utils_QuadTreeNode *__pyx_v_node;
+ __pyx_t_5numpy_int64_t __pyx_v_fac;
+ PyObject *__pyx_v_L;
+ Py_ssize_t __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ Py_ssize_t __pyx_t_6;
+ __Pyx_RefNannySetupContext("add_to_position");
+ __Pyx_INCREF((PyObject *)__pyx_v_self);
+ __pyx_v_L = Py_None; __Pyx_INCREF(Py_None);
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":141
+ * cdef int i, j
+ * cdef QuadTreeNode *node
+ * node = self.find_on_root_level(pos, level) # <<<<<<<<<<<<<<
+ * cdef np.int64_t fac
+ * for L in range(level):
+ */
+ __pyx_v_node = ((struct __pyx_vtabstruct_2yt_9amr_utils_QuadTree *)__pyx_v_self->__pyx_vtab)->find_on_root_level(__pyx_v_self, __pyx_v_pos, __pyx_v_level);
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":143
+ * node = self.find_on_root_level(pos, level)
+ * cdef np.int64_t fac
+ * for L in range(level): # <<<<<<<<<<<<<<
+ * if node.children[0][0] == NULL:
+ * QTN_refine(node)
+ */
+ __pyx_t_2 = PyInt_FromLong(__pyx_v_level); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__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_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
+ __pyx_t_1 = 0; __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3);
+ } else {
+ __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ for (;;) {
+ if (likely(PyList_CheckExact(__pyx_t_3))) {
+ if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_3)) break;
+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_2); __pyx_t_1++;
+ } else if (likely(PyTuple_CheckExact(__pyx_t_3))) {
+ if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_2); __pyx_t_1++;
+ } else {
+ __pyx_t_2 = PyIter_Next(__pyx_t_3);
+ if (!__pyx_t_2) {
+ if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ }
+ __Pyx_DECREF(__pyx_v_L);
+ __pyx_v_L = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":144
+ * cdef np.int64_t fac
+ * for L in range(level):
+ * if node.children[0][0] == NULL: # <<<<<<<<<<<<<<
+ * QTN_refine(node)
+ * # Maybe we should use bitwise operators?
+ */
+ __pyx_t_4 = (((__pyx_v_node->children[0])[0]) == NULL);
+ if (__pyx_t_4) {
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":145
+ * for L in range(level):
+ * if node.children[0][0] == NULL:
+ * QTN_refine(node) # <<<<<<<<<<<<<<
+ * # Maybe we should use bitwise operators?
+ * fac = self.po2[level - L - 1]
+ */
+ __pyx_f_2yt_9amr_utils_QTN_refine(__pyx_v_node);
+ goto __pyx_L5;
+ }
+ __pyx_L5:;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":147
+ * QTN_refine(node)
+ * # Maybe we should use bitwise operators?
+ * fac = self.po2[level - L - 1] # <<<<<<<<<<<<<<
+ * i = (pos[0] >= fac*(2*node.pos[0]+1))
+ * j = (pos[1] >= fac*(2*node.pos[1]+1))
+ */
+ __pyx_t_2 = PyInt_FromLong(__pyx_v_level); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = PyNumber_Subtract(__pyx_t_2, __pyx_v_L); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyNumber_Subtract(__pyx_t_5, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_fac = (__pyx_v_self->po2[__pyx_t_6]);
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":148
+ * # Maybe we should use bitwise operators?
+ * fac = self.po2[level - L - 1]
+ * i = (pos[0] >= fac*(2*node.pos[0]+1)) # <<<<<<<<<<<<<<
+ * j = (pos[1] >= fac*(2*node.pos[1]+1))
+ * node = node.children[i][j]
+ */
+ __pyx_v_i = ((__pyx_v_pos[0]) >= (__pyx_v_fac * ((2 * (__pyx_v_node->pos[0])) + 1)));
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":149
+ * fac = self.po2[level - L - 1]
+ * i = (pos[0] >= fac*(2*node.pos[0]+1))
+ * j = (pos[1] >= fac*(2*node.pos[1]+1)) # <<<<<<<<<<<<<<
+ * node = node.children[i][j]
+ * QTN_add_value(node, val, weight_val)
+ */
+ __pyx_v_j = ((__pyx_v_pos[1]) >= (__pyx_v_fac * ((2 * (__pyx_v_node->pos[1])) + 1)));
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":150
+ * i = (pos[0] >= fac*(2*node.pos[0]+1))
+ * j = (pos[1] >= fac*(2*node.pos[1]+1))
+ * node = node.children[i][j] # <<<<<<<<<<<<<<
+ * QTN_add_value(node, val, weight_val)
+ *
+ */
+ __pyx_v_node = ((__pyx_v_node->children[__pyx_v_i])[__pyx_v_j]);
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":151
+ * j = (pos[1] >= fac*(2*node.pos[1]+1))
+ * node = node.children[i][j]
+ * QTN_add_value(node, val, weight_val) # <<<<<<<<<<<<<<
+ *
+ * cdef QuadTreeNode *find_on_root_level(self, np.int64_t pos[2], int level):
+ */
+ __pyx_f_2yt_9amr_utils_QTN_add_value(__pyx_v_node, __pyx_v_val, __pyx_v_weight_val);
+
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_WriteUnraisable("yt.amr_utils.QuadTree.add_to_position");
+ __pyx_L0:;
+ __Pyx_DECREF(__pyx_v_L);
+ __Pyx_DECREF((PyObject *)__pyx_v_self);
+ __Pyx_RefNannyFinishContext();
+}
+
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":153
+ * QTN_add_value(node, val, weight_val)
+ *
+ * cdef QuadTreeNode *find_on_root_level(self, np.int64_t pos[2], int level): # <<<<<<<<<<<<<<
+ * # We need this because the root level won't just have four children
+ * # So we find on the root level, then we traverse the tree.
+ */
+
+static struct __pyx_t_2yt_9amr_utils_QuadTreeNode *__pyx_f_2yt_9amr_utils_8QuadTree_find_on_root_level(struct __pyx_obj_2yt_9amr_utils_QuadTree *__pyx_v_self, __pyx_t_5numpy_int64_t *__pyx_v_pos, int __pyx_v_level) {
+ __pyx_t_5numpy_int64_t __pyx_v_i;
+ __pyx_t_5numpy_int64_t __pyx_v_j;
+ struct __pyx_t_2yt_9amr_utils_QuadTreeNode *__pyx_r;
+ __Pyx_RefNannySetupContext("find_on_root_level");
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":157
+ * # So we find on the root level, then we traverse the tree.
+ * cdef np.int64_t i, j
+ * i = <np.int64_t> (pos[0] / self.po2[level]) # <<<<<<<<<<<<<<
+ * j = <np.int64_t> (pos[1] / self.po2[level])
+ * return self.root_nodes[i][j]
+ */
+ __pyx_v_i = ((__pyx_t_5numpy_int64_t)((__pyx_v_pos[0]) / (__pyx_v_self->po2[__pyx_v_level])));
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":158
+ * cdef np.int64_t i, j
+ * i = <np.int64_t> (pos[0] / self.po2[level])
+ * j = <np.int64_t> (pos[1] / self.po2[level]) # <<<<<<<<<<<<<<
+ * return self.root_nodes[i][j]
+ *
+ */
+ __pyx_v_j = ((__pyx_t_5numpy_int64_t)((__pyx_v_pos[1]) / (__pyx_v_self->po2[__pyx_v_level])));
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":159
+ * i = <np.int64_t> (pos[0] / self.po2[level])
+ * j = <np.int64_t> (pos[1] / self.po2[level])
+ * return self.root_nodes[i][j] # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_r = ((__pyx_v_self->root_nodes[__pyx_v_i])[__pyx_v_j]);
+ goto __pyx_L0;
+
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":164
+ * @cython.boundscheck(False)
+ * @cython.wraparound(False)
+ * def add_array_to_tree(self, int level, # <<<<<<<<<<<<<<
+ * np.ndarray[np.int64_t, ndim=1] pxs,
+ * np.ndarray[np.int64_t, ndim=1] pys,
+ */
+
+static PyObject *__pyx_pf_2yt_9amr_utils_8QuadTree_add_array_to_tree(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pf_2yt_9amr_utils_8QuadTree_add_array_to_tree(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ int __pyx_v_level;
+ PyArrayObject *__pyx_v_pxs = 0;
+ PyArrayObject *__pyx_v_pys = 0;
+ PyArrayObject *__pyx_v_pvals = 0;
+ PyArrayObject *__pyx_v_pweight_vals = 0;
+ int __pyx_v_np;
+ int __pyx_v_p;
+ __pyx_t_5numpy_float64_t *__pyx_v_vals;
+ __pyx_t_5numpy_float64_t *__pyx_v_data;
+ __pyx_t_5numpy_int64_t __pyx_v_pos[2];
+ Py_buffer __pyx_bstruct_pweight_vals;
+ Py_ssize_t __pyx_bstride_0_pweight_vals = 0;
+ Py_ssize_t __pyx_bshape_0_pweight_vals = 0;
+ Py_buffer __pyx_bstruct_pxs;
+ Py_ssize_t __pyx_bstride_0_pxs = 0;
+ Py_ssize_t __pyx_bshape_0_pxs = 0;
+ Py_buffer __pyx_bstruct_pvals;
+ Py_ssize_t __pyx_bstride_0_pvals = 0;
+ Py_ssize_t __pyx_bstride_1_pvals = 0;
+ Py_ssize_t __pyx_bshape_0_pvals = 0;
+ Py_ssize_t __pyx_bshape_1_pvals = 0;
+ Py_buffer __pyx_bstruct_pys;
+ Py_ssize_t __pyx_bstride_0_pys = 0;
+ Py_ssize_t __pyx_bshape_0_pys = 0;
+ PyObject *__pyx_r = NULL;
+ int __pyx_t_1;
+ int __pyx_t_2;
+ int __pyx_t_3;
+ int __pyx_t_4;
+ int __pyx_t_5;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__level,&__pyx_n_s__pxs,&__pyx_n_s__pys,&__pyx_n_s__pvals,&__pyx_n_s__pweight_vals,0};
+ __Pyx_RefNannySetupContext("add_array_to_tree");
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
+ PyObject* values[5] = {0,0,0,0,0};
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 0:
+ values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__level);
+ if (likely(values[0])) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pxs);
+ if (likely(values[1])) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("add_array_to_tree", 1, 5, 5, 1); {__pyx_filename = __pyx_f[10]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 2:
+ values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pys);
+ if (likely(values[2])) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("add_array_to_tree", 1, 5, 5, 2); {__pyx_filename = __pyx_f[10]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 3:
+ values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pvals);
+ if (likely(values[3])) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("add_array_to_tree", 1, 5, 5, 3); {__pyx_filename = __pyx_f[10]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 4:
+ values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pweight_vals);
+ if (likely(values[4])) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("add_array_to_tree", 1, 5, 5, 4); {__pyx_filename = __pyx_f[10]; __pyx_lineno = 164; __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), "add_array_to_tree") < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ __pyx_v_level = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_level == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_pxs = ((PyArrayObject *)values[1]);
+ __pyx_v_pys = ((PyArrayObject *)values[2]);
+ __pyx_v_pvals = ((PyArrayObject *)values[3]);
+ __pyx_v_pweight_vals = ((PyArrayObject *)values[4]);
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ __pyx_v_level = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((__pyx_v_level == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_pxs = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
+ __pyx_v_pys = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 2));
+ __pyx_v_pvals = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 3));
+ __pyx_v_pweight_vals = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 4));
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("add_array_to_tree", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[10]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("yt.amr_utils.QuadTree.add_array_to_tree");
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __Pyx_INCREF((PyObject *)__pyx_v_self);
+ __Pyx_INCREF((PyObject *)__pyx_v_pxs);
+ __Pyx_INCREF((PyObject *)__pyx_v_pys);
+ __Pyx_INCREF((PyObject *)__pyx_v_pvals);
+ __Pyx_INCREF((PyObject *)__pyx_v_pweight_vals);
+ __pyx_bstruct_pxs.buf = NULL;
+ __pyx_bstruct_pys.buf = NULL;
+ __pyx_bstruct_pvals.buf = NULL;
+ __pyx_bstruct_pweight_vals.buf = NULL;
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pxs), __pyx_ptype_5numpy_ndarray, 1, "pxs", 0))) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pys), __pyx_ptype_5numpy_ndarray, 1, "pys", 0))) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pvals), __pyx_ptype_5numpy_ndarray, 1, "pvals", 0))) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pweight_vals), __pyx_ptype_5numpy_ndarray, 1, "pweight_vals", 0))) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {
+ __Pyx_BufFmt_StackElem __pyx_stack[1];
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_pxs, (PyObject*)__pyx_v_pxs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_bstride_0_pxs = __pyx_bstruct_pxs.strides[0];
+ __pyx_bshape_0_pxs = __pyx_bstruct_pxs.shape[0];
+ {
+ __Pyx_BufFmt_StackElem __pyx_stack[1];
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_pys, (PyObject*)__pyx_v_pys, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_bstride_0_pys = __pyx_bstruct_pys.strides[0];
+ __pyx_bshape_0_pys = __pyx_bstruct_pys.shape[0];
+ {
+ __Pyx_BufFmt_StackElem __pyx_stack[1];
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_pvals, (PyObject*)__pyx_v_pvals, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_bstride_0_pvals = __pyx_bstruct_pvals.strides[0]; __pyx_bstride_1_pvals = __pyx_bstruct_pvals.strides[1];
+ __pyx_bshape_0_pvals = __pyx_bstruct_pvals.shape[0]; __pyx_bshape_1_pvals = __pyx_bstruct_pvals.shape[1];
+ {
+ __Pyx_BufFmt_StackElem __pyx_stack[1];
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_pweight_vals, (PyObject*)__pyx_v_pweight_vals, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_bstride_0_pweight_vals = __pyx_bstruct_pweight_vals.strides[0];
+ __pyx_bshape_0_pweight_vals = __pyx_bstruct_pweight_vals.shape[0];
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":169
+ * np.ndarray[np.float64_t, ndim=2] pvals,
+ * np.ndarray[np.float64_t, ndim=1] pweight_vals):
+ * cdef int np = pxs.shape[0] # <<<<<<<<<<<<<<
+ * cdef int p
+ * cdef cnp.float64_t *vals
+ */
+ __pyx_v_np = (__pyx_v_pxs->dimensions[0]);
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":172
+ * cdef int p
+ * cdef cnp.float64_t *vals
+ * cdef cnp.float64_t *data = <cnp.float64_t *> pvals.data # <<<<<<<<<<<<<<
+ * cdef cnp.int64_t pos[2]
+ * for p in range(np):
+ */
+ __pyx_v_data = ((__pyx_t_5numpy_float64_t *)__pyx_v_pvals->data);
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":174
+ * cdef cnp.float64_t *data = <cnp.float64_t *> pvals.data
+ * cdef cnp.int64_t pos[2]
+ * for p in range(np): # <<<<<<<<<<<<<<
+ * vals = data + self.nvals*p
+ * pos[0] = pxs[p]
+ */
+ __pyx_t_1 = __pyx_v_np;
+ for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
+ __pyx_v_p = __pyx_t_2;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":175
+ * cdef cnp.int64_t pos[2]
+ * for p in range(np):
+ * vals = data + self.nvals*p # <<<<<<<<<<<<<<
+ * pos[0] = pxs[p]
+ * pos[1] = pys[p]
+ */
+ __pyx_v_vals = (__pyx_v_data + (((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self)->nvals * __pyx_v_p));
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":176
+ * for p in range(np):
+ * vals = data + self.nvals*p
+ * pos[0] = pxs[p] # <<<<<<<<<<<<<<
+ * pos[1] = pys[p]
+ * self.add_to_position(level, pos, vals, pweight_vals[p])
+ */
+ __pyx_t_3 = __pyx_v_p;
+ (__pyx_v_pos[0]) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_pxs.buf, __pyx_t_3, __pyx_bstride_0_pxs));
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":177
+ * vals = data + self.nvals*p
+ * pos[0] = pxs[p]
+ * pos[1] = pys[p] # <<<<<<<<<<<<<<
+ * self.add_to_position(level, pos, vals, pweight_vals[p])
+ *
+ */
+ __pyx_t_4 = __pyx_v_p;
+ (__pyx_v_pos[1]) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_pys.buf, __pyx_t_4, __pyx_bstride_0_pys));
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":178
+ * pos[0] = pxs[p]
+ * pos[1] = pys[p]
+ * self.add_to_position(level, pos, vals, pweight_vals[p]) # <<<<<<<<<<<<<<
+ *
+ * def add_grid_to_tree(self, int level,
+ */
+ __pyx_t_5 = __pyx_v_p;
+ ((struct __pyx_vtabstruct_2yt_9amr_utils_QuadTree *)((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self)->__pyx_vtab)->add_to_position(((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self), __pyx_v_level, __pyx_v_pos, __pyx_v_vals, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_pweight_vals.buf, __pyx_t_5, __pyx_bstride_0_pweight_vals)));
+ }
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
+ __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
+ __Pyx_SafeReleaseBuffer(&__pyx_bstruct_pweight_vals);
+ __Pyx_SafeReleaseBuffer(&__pyx_bstruct_pxs);
+ __Pyx_SafeReleaseBuffer(&__pyx_bstruct_pvals);
+ __Pyx_SafeReleaseBuffer(&__pyx_bstruct_pys);
+ __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
+ __Pyx_AddTraceback("yt.amr_utils.QuadTree.add_array_to_tree");
+ __pyx_r = NULL;
+ goto __pyx_L2;
+ __pyx_L0:;
+ __Pyx_SafeReleaseBuffer(&__pyx_bstruct_pweight_vals);
+ __Pyx_SafeReleaseBuffer(&__pyx_bstruct_pxs);
+ __Pyx_SafeReleaseBuffer(&__pyx_bstruct_pvals);
+ __Pyx_SafeReleaseBuffer(&__pyx_bstruct_pys);
+ __pyx_L2:;
+ __Pyx_DECREF((PyObject *)__pyx_v_self);
+ __Pyx_DECREF((PyObject *)__pyx_v_pxs);
+ __Pyx_DECREF((PyObject *)__pyx_v_pys);
+ __Pyx_DECREF((PyObject *)__pyx_v_pvals);
+ __Pyx_DECREF((PyObject *)__pyx_v_pweight_vals);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":180
+ * self.add_to_position(level, pos, vals, pweight_vals[p])
+ *
+ * def add_grid_to_tree(self, int level, # <<<<<<<<<<<<<<
+ * np.ndarray[np.int64_t, ndim=1] start_index,
+ * np.ndarray[np.float64_t, ndim=2] pvals,
+ */
+
+static PyObject *__pyx_pf_2yt_9amr_utils_8QuadTree_add_grid_to_tree(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pf_2yt_9amr_utils_8QuadTree_add_grid_to_tree(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ int __pyx_v_level;
+ PyArrayObject *__pyx_v_start_index = 0;
+ PyArrayObject *__pyx_v_pvals = 0;
+ PyArrayObject *__pyx_v_wvals = 0;
+ PyArrayObject *__pyx_v_cm = 0;
+ Py_buffer __pyx_bstruct_cm;
+ Py_ssize_t __pyx_bstride_0_cm = 0;
+ Py_ssize_t __pyx_bstride_1_cm = 0;
+ Py_ssize_t __pyx_bshape_0_cm = 0;
+ Py_ssize_t __pyx_bshape_1_cm = 0;
+ Py_buffer __pyx_bstruct_pvals;
+ Py_ssize_t __pyx_bstride_0_pvals = 0;
+ Py_ssize_t __pyx_bstride_1_pvals = 0;
+ Py_ssize_t __pyx_bshape_0_pvals = 0;
+ Py_ssize_t __pyx_bshape_1_pvals = 0;
+ Py_buffer __pyx_bstruct_wvals;
+ Py_ssize_t __pyx_bstride_0_wvals = 0;
+ Py_ssize_t __pyx_bstride_1_wvals = 0;
+ Py_ssize_t __pyx_bshape_0_wvals = 0;
+ Py_ssize_t __pyx_bshape_1_wvals = 0;
+ Py_buffer __pyx_bstruct_start_index;
+ Py_ssize_t __pyx_bstride_0_start_index = 0;
+ Py_ssize_t __pyx_bshape_0_start_index = 0;
+ PyObject *__pyx_r = NULL;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__level,&__pyx_n_s__start_index,&__pyx_n_s__pvals,&__pyx_n_s__wvals,&__pyx_n_s__cm,0};
+ __Pyx_RefNannySetupContext("add_grid_to_tree");
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
+ PyObject* values[5] = {0,0,0,0,0};
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 0:
+ values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__level);
+ if (likely(values[0])) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start_index);
+ if (likely(values[1])) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("add_grid_to_tree", 1, 5, 5, 1); {__pyx_filename = __pyx_f[10]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 2:
+ values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pvals);
+ if (likely(values[2])) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("add_grid_to_tree", 1, 5, 5, 2); {__pyx_filename = __pyx_f[10]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 3:
+ values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__wvals);
+ if (likely(values[3])) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("add_grid_to_tree", 1, 5, 5, 3); {__pyx_filename = __pyx_f[10]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 4:
+ values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cm);
+ if (likely(values[4])) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("add_grid_to_tree", 1, 5, 5, 4); {__pyx_filename = __pyx_f[10]; __pyx_lineno = 180; __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), "add_grid_to_tree") < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ __pyx_v_level = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_level == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_start_index = ((PyArrayObject *)values[1]);
+ __pyx_v_pvals = ((PyArrayObject *)values[2]);
+ __pyx_v_wvals = ((PyArrayObject *)values[3]);
+ __pyx_v_cm = ((PyArrayObject *)values[4]);
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ __pyx_v_level = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((__pyx_v_level == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_start_index = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
+ __pyx_v_pvals = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 2));
+ __pyx_v_wvals = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 3));
+ __pyx_v_cm = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 4));
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("add_grid_to_tree", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[10]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("yt.amr_utils.QuadTree.add_grid_to_tree");
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_bstruct_start_index.buf = NULL;
+ __pyx_bstruct_pvals.buf = NULL;
+ __pyx_bstruct_wvals.buf = NULL;
+ __pyx_bstruct_cm.buf = NULL;
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_start_index), __pyx_ptype_5numpy_ndarray, 1, "start_index", 0))) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pvals), __pyx_ptype_5numpy_ndarray, 1, "pvals", 0))) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_wvals), __pyx_ptype_5numpy_ndarray, 1, "wvals", 0))) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cm), __pyx_ptype_5numpy_ndarray, 1, "cm", 0))) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {
+ __Pyx_BufFmt_StackElem __pyx_stack[1];
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_start_index, (PyObject*)__pyx_v_start_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_bstride_0_start_index = __pyx_bstruct_start_index.strides[0];
+ __pyx_bshape_0_start_index = __pyx_bstruct_start_index.shape[0];
+ {
+ __Pyx_BufFmt_StackElem __pyx_stack[1];
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_pvals, (PyObject*)__pyx_v_pvals, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_bstride_0_pvals = __pyx_bstruct_pvals.strides[0]; __pyx_bstride_1_pvals = __pyx_bstruct_pvals.strides[1];
+ __pyx_bshape_0_pvals = __pyx_bstruct_pvals.shape[0]; __pyx_bshape_1_pvals = __pyx_bstruct_pvals.shape[1];
+ {
+ __Pyx_BufFmt_StackElem __pyx_stack[1];
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_wvals, (PyObject*)__pyx_v_wvals, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_bstride_0_wvals = __pyx_bstruct_wvals.strides[0]; __pyx_bstride_1_wvals = __pyx_bstruct_wvals.strides[1];
+ __pyx_bshape_0_wvals = __pyx_bstruct_wvals.shape[0]; __pyx_bshape_1_wvals = __pyx_bstruct_wvals.shape[1];
+ {
+ __Pyx_BufFmt_StackElem __pyx_stack[1];
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_cm, (PyObject*)__pyx_v_cm, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_bstride_0_cm = __pyx_bstruct_cm.strides[0]; __pyx_bstride_1_cm = __pyx_bstruct_cm.strides[1];
+ __pyx_bshape_0_cm = __pyx_bstruct_cm.shape[0]; __pyx_bshape_1_cm = __pyx_bstruct_cm.shape[1];
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
+ __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
+ __Pyx_SafeReleaseBuffer(&__pyx_bstruct_cm);
+ __Pyx_SafeReleaseBuffer(&__pyx_bstruct_pvals);
+ __Pyx_SafeReleaseBuffer(&__pyx_bstruct_wvals);
+ __Pyx_SafeReleaseBuffer(&__pyx_bstruct_start_index);
+ __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
+ __Pyx_AddTraceback("yt.amr_utils.QuadTree.add_grid_to_tree");
+ __pyx_r = NULL;
+ goto __pyx_L2;
+ __pyx_L0:;
+ __Pyx_SafeReleaseBuffer(&__pyx_bstruct_cm);
+ __Pyx_SafeReleaseBuffer(&__pyx_bstruct_pvals);
+ __Pyx_SafeReleaseBuffer(&__pyx_bstruct_wvals);
+ __Pyx_SafeReleaseBuffer(&__pyx_bstruct_start_index);
+ __pyx_L2:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":189
+ * @cython.boundscheck(False)
+ * @cython.wraparound(False)
+ * def get_all_from_level(self, int level, int count_only = 0): # <<<<<<<<<<<<<<
+ * cdef int i, j
+ * cdef int total = 0
+ */
+
+static PyObject *__pyx_pf_2yt_9amr_utils_8QuadTree_get_all_from_level(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pf_2yt_9amr_utils_8QuadTree_get_all_from_level(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ int __pyx_v_level;
+ int __pyx_v_count_only;
+ int __pyx_v_i;
+ int __pyx_v_j;
+ int __pyx_v_total;
+ PyObject *__pyx_v_vals;
+ PyArrayObject *__pyx_v_npos;
+ PyArrayObject *__pyx_v_nvals;
+ PyArrayObject *__pyx_v_nwvals;
+ __pyx_t_5numpy_int64_t __pyx_v_curpos;
+ __pyx_t_5numpy_int64_t *__pyx_v_pdata;
+ __pyx_t_5numpy_float64_t *__pyx_v_vdata;
+ __pyx_t_5numpy_float64_t *__pyx_v_wdata;
+ Py_buffer __pyx_bstruct_nwvals;
+ Py_ssize_t __pyx_bstride_0_nwvals = 0;
+ Py_ssize_t __pyx_bshape_0_nwvals = 0;
+ Py_buffer __pyx_bstruct_nvals;
+ Py_ssize_t __pyx_bstride_0_nvals = 0;
+ Py_ssize_t __pyx_bstride_1_nvals = 0;
+ Py_ssize_t __pyx_bshape_0_nvals = 0;
+ Py_ssize_t __pyx_bshape_1_nvals = 0;
+ Py_buffer __pyx_bstruct_npos;
+ Py_ssize_t __pyx_bstride_0_npos = 0;
+ Py_ssize_t __pyx_bstride_1_npos = 0;
+ Py_ssize_t __pyx_bshape_0_npos = 0;
+ Py_ssize_t __pyx_bshape_1_npos = 0;
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ __pyx_t_5numpy_int64_t __pyx_t_2;
+ int __pyx_t_3;
+ __pyx_t_5numpy_int64_t __pyx_t_4;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ PyArrayObject *__pyx_t_9 = NULL;
+ PyObject *__pyx_t_10 = NULL;
+ PyObject *__pyx_t_11 = NULL;
+ PyObject *__pyx_t_12 = NULL;
+ PyArrayObject *__pyx_t_13 = NULL;
+ PyArrayObject *__pyx_t_14 = NULL;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__level,&__pyx_n_s__count_only,0};
+ __Pyx_RefNannySetupContext("get_all_from_level");
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
+ PyObject* values[2] = {0,0};
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 0:
+ values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__level);
+ if (likely(values[0])) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (kw_args > 1) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__count_only);
+ if (unlikely(value)) { values[1] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "get_all_from_level") < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ __pyx_v_level = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_level == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (values[1]) {
+ __pyx_v_count_only = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_count_only == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ } else {
+ __pyx_v_count_only = ((int)0);
+ }
+ } else {
+ __pyx_v_count_only = ((int)0);
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: __pyx_v_count_only = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_count_only == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ case 1: __pyx_v_level = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((__pyx_v_level == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("get_all_from_level", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[10]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("yt.amr_utils.QuadTree.get_all_from_level");
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __Pyx_INCREF((PyObject *)__pyx_v_self);
+ __pyx_v_vals = Py_None; __Pyx_INCREF(Py_None);
+ __pyx_v_npos = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
+ __pyx_v_nvals = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
+ __pyx_v_nwvals = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
+ __pyx_bstruct_npos.buf = NULL;
+ __pyx_bstruct_nvals.buf = NULL;
+ __pyx_bstruct_nwvals.buf = NULL;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":191
+ * def get_all_from_level(self, int level, int count_only = 0):
+ * cdef int i, j
+ * cdef int total = 0 # <<<<<<<<<<<<<<
+ * vals = []
+ * for i in range(self.top_grid_dims[0]):
+ */
+ __pyx_v_total = 0;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":192
+ * cdef int i, j
+ * cdef int total = 0
+ * vals = [] # <<<<<<<<<<<<<<
+ * for i in range(self.top_grid_dims[0]):
+ * for j in range(self.top_grid_dims[1]):
+ */
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+ __Pyx_DECREF(__pyx_v_vals);
+ __pyx_v_vals = ((PyObject *)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":193
+ * cdef int total = 0
+ * vals = []
+ * for i in range(self.top_grid_dims[0]): # <<<<<<<<<<<<<<
+ * for j in range(self.top_grid_dims[1]):
+ * total += self.count_at_level(self.root_nodes[i][j], level)
+ */
+ __pyx_t_2 = (((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self)->top_grid_dims[0]);
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":194
+ * vals = []
+ * for i in range(self.top_grid_dims[0]):
+ * for j in range(self.top_grid_dims[1]): # <<<<<<<<<<<<<<
+ * total += self.count_at_level(self.root_nodes[i][j], level)
+ * if count_only: return total
+ */
+ __pyx_t_4 = (((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self)->top_grid_dims[1]);
+ for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
+ __pyx_v_j = __pyx_t_5;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":195
+ * for i in range(self.top_grid_dims[0]):
+ * for j in range(self.top_grid_dims[1]):
+ * total += self.count_at_level(self.root_nodes[i][j], level) # <<<<<<<<<<<<<<
+ * if count_only: return total
+ * # Allocate our array
+ */
+ __pyx_v_total += ((struct __pyx_vtabstruct_2yt_9amr_utils_QuadTree *)((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self)->__pyx_vtab)->count_at_level(((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self), ((((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self)->root_nodes[__pyx_v_i])[__pyx_v_j]), __pyx_v_level);
+ }
+ }
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":196
+ * for j in range(self.top_grid_dims[1]):
+ * total += self.count_at_level(self.root_nodes[i][j], level)
+ * if count_only: return total # <<<<<<<<<<<<<<
+ * # Allocate our array
+ * cdef np.ndarray[np.int64_t, ndim=2] npos
+ */
+ __pyx_t_3 = __pyx_v_count_only;
+ if (__pyx_t_3) {
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_total); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+ goto __pyx_L10;
+ }
+ __pyx_L10:;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":201
+ * cdef np.ndarray[np.float64_t, ndim=2] nvals
+ * cdef np.ndarray[np.float64_t, ndim=1] nwvals
+ * npos = np.zeros( (total, 2), dtype='int64') # <<<<<<<<<<<<<<
+ * nvals = np.zeros( (total, self.nvals), dtype='float64')
+ * nwvals = np.zeros( total, dtype='float64')
+ */
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__zeros); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_total); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_int_2);
+ PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_int_2);
+ __Pyx_GIVEREF(__pyx_int_2);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_7);
+ __pyx_t_7 = 0;
+ __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_7));
+ if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__int64)) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyEval_CallObjectWithKeywords(__pyx_t_6, __pyx_t_1, ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
+ if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = ((PyArrayObject *)__pyx_t_8);
+ {
+ __Pyx_BufFmt_StackElem __pyx_stack[1];
+ __Pyx_SafeReleaseBuffer(&__pyx_bstruct_npos);
+ __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_npos, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
+ if (unlikely(__pyx_t_3 < 0)) {
+ PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_npos, (PyObject*)__pyx_v_npos, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
+ Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12);
+ __Pyx_RaiseBufferFallbackError();
+ } else {
+ PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
+ }
+ }
+ __pyx_bstride_0_npos = __pyx_bstruct_npos.strides[0]; __pyx_bstride_1_npos = __pyx_bstruct_npos.strides[1];
+ __pyx_bshape_0_npos = __pyx_bstruct_npos.shape[0]; __pyx_bshape_1_npos = __pyx_bstruct_npos.shape[1];
+ if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_9 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_v_npos));
+ __pyx_v_npos = ((PyArrayObject *)__pyx_t_8);
+ __pyx_t_8 = 0;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":202
+ * cdef np.ndarray[np.float64_t, ndim=1] nwvals
+ * npos = np.zeros( (total, 2), dtype='int64')
+ * nvals = np.zeros( (total, self.nvals), dtype='float64') # <<<<<<<<<<<<<<
+ * nwvals = np.zeros( total, dtype='float64')
+ * cdef np.int64_t curpos = 0
+ */
+ __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_7 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__zeros); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = PyInt_FromLong(__pyx_v_total); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_1 = PyInt_FromLong(((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self)->nvals); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_t_8 = 0;
+ __pyx_t_1 = 0;
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_6));
+ if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__float64)) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyEval_CallObjectWithKeywords(__pyx_t_7, __pyx_t_1, ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+ if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = ((PyArrayObject *)__pyx_t_8);
+ {
+ __Pyx_BufFmt_StackElem __pyx_stack[1];
+ __Pyx_SafeReleaseBuffer(&__pyx_bstruct_nvals);
+ __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_nvals, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
+ if (unlikely(__pyx_t_3 < 0)) {
+ PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10);
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_nvals, (PyObject*)__pyx_v_nvals, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
+ Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10);
+ __Pyx_RaiseBufferFallbackError();
+ } else {
+ PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10);
+ }
+ }
+ __pyx_bstride_0_nvals = __pyx_bstruct_nvals.strides[0]; __pyx_bstride_1_nvals = __pyx_bstruct_nvals.strides[1];
+ __pyx_bshape_0_nvals = __pyx_bstruct_nvals.shape[0]; __pyx_bshape_1_nvals = __pyx_bstruct_nvals.shape[1];
+ if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_13 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_v_nvals));
+ __pyx_v_nvals = ((PyArrayObject *)__pyx_t_8);
+ __pyx_t_8 = 0;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":203
+ * npos = np.zeros( (total, 2), dtype='int64')
+ * nvals = np.zeros( (total, self.nvals), dtype='float64')
+ * nwvals = np.zeros( total, dtype='float64') # <<<<<<<<<<<<<<
+ * cdef np.int64_t curpos = 0
+ * cdef np.int64_t *pdata = <np.int64_t *> npos.data
+ */
+ __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_6 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__zeros); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = PyInt_FromLong(__pyx_v_total); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_8));
+ if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__float64)) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyEval_CallObjectWithKeywords(__pyx_t_6, __pyx_t_1, ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
+ if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = ((PyArrayObject *)__pyx_t_7);
+ {
+ __Pyx_BufFmt_StackElem __pyx_stack[1];
+ __Pyx_SafeReleaseBuffer(&__pyx_bstruct_nwvals);
+ __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_nwvals, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
+ if (unlikely(__pyx_t_3 < 0)) {
+ PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_nwvals, (PyObject*)__pyx_v_nwvals, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
+ Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12);
+ __Pyx_RaiseBufferFallbackError();
+ } else {
+ PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
+ }
+ }
+ __pyx_bstride_0_nwvals = __pyx_bstruct_nwvals.strides[0];
+ __pyx_bshape_0_nwvals = __pyx_bstruct_nwvals.shape[0];
+ if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_14 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_v_nwvals));
+ __pyx_v_nwvals = ((PyArrayObject *)__pyx_t_7);
+ __pyx_t_7 = 0;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":204
+ * nvals = np.zeros( (total, self.nvals), dtype='float64')
+ * nwvals = np.zeros( total, dtype='float64')
+ * cdef np.int64_t curpos = 0 # <<<<<<<<<<<<<<
+ * cdef np.int64_t *pdata = <np.int64_t *> npos.data
+ * cdef np.float64_t *vdata = <np.float64_t *> nvals.data
+ */
+ __pyx_v_curpos = 0;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":205
+ * nwvals = np.zeros( total, dtype='float64')
+ * cdef np.int64_t curpos = 0
+ * cdef np.int64_t *pdata = <np.int64_t *> npos.data # <<<<<<<<<<<<<<
+ * cdef np.float64_t *vdata = <np.float64_t *> nvals.data
+ * cdef np.float64_t *wdata = <np.float64_t *> nwvals.data
+ */
+ __pyx_v_pdata = ((__pyx_t_5numpy_int64_t *)__pyx_v_npos->data);
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":206
+ * cdef np.int64_t curpos = 0
+ * cdef np.int64_t *pdata = <np.int64_t *> npos.data
+ * cdef np.float64_t *vdata = <np.float64_t *> nvals.data # <<<<<<<<<<<<<<
+ * cdef np.float64_t *wdata = <np.float64_t *> nwvals.data
+ * for i in range(self.top_grid_dims[0]):
+ */
+ __pyx_v_vdata = ((__pyx_t_5numpy_float64_t *)__pyx_v_nvals->data);
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":207
+ * cdef np.int64_t *pdata = <np.int64_t *> npos.data
+ * cdef np.float64_t *vdata = <np.float64_t *> nvals.data
+ * cdef np.float64_t *wdata = <np.float64_t *> nwvals.data # <<<<<<<<<<<<<<
+ * for i in range(self.top_grid_dims[0]):
+ * for j in range(self.top_grid_dims[1]):
+ */
+ __pyx_v_wdata = ((__pyx_t_5numpy_float64_t *)__pyx_v_nwvals->data);
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":208
+ * cdef np.float64_t *vdata = <np.float64_t *> nvals.data
+ * cdef np.float64_t *wdata = <np.float64_t *> nwvals.data
+ * for i in range(self.top_grid_dims[0]): # <<<<<<<<<<<<<<
+ * for j in range(self.top_grid_dims[1]):
+ * curpos += self.fill_from_level(self.root_nodes[i][j],
+ */
+ __pyx_t_2 = (((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self)->top_grid_dims[0]);
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":209
+ * cdef np.float64_t *wdata = <np.float64_t *> nwvals.data
+ * for i in range(self.top_grid_dims[0]):
+ * for j in range(self.top_grid_dims[1]): # <<<<<<<<<<<<<<
+ * curpos += self.fill_from_level(self.root_nodes[i][j],
+ * level, curpos, pdata, vdata, wdata)
+ */
+ __pyx_t_4 = (((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self)->top_grid_dims[1]);
+ for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
+ __pyx_v_j = __pyx_t_5;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":211
+ * for j in range(self.top_grid_dims[1]):
+ * curpos += self.fill_from_level(self.root_nodes[i][j],
+ * level, curpos, pdata, vdata, wdata) # <<<<<<<<<<<<<<
+ * return npos, nvals, nwvals
+ *
+ */
+ __pyx_v_curpos += ((struct __pyx_vtabstruct_2yt_9amr_utils_QuadTree *)((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self)->__pyx_vtab)->fill_from_level(((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self), ((((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self)->root_nodes[__pyx_v_i])[__pyx_v_j]), __pyx_v_level, __pyx_v_curpos, __pyx_v_pdata, __pyx_v_vdata, __pyx_v_wdata);
+ }
+ }
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":212
+ * curpos += self.fill_from_level(self.root_nodes[i][j],
+ * level, curpos, pdata, vdata, wdata)
+ * return npos, nvals, nwvals # <<<<<<<<<<<<<<
+ *
+ * cdef int count_at_level(self, QuadTreeNode *node, int level):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_INCREF(((PyObject *)__pyx_v_npos));
+ PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_npos));
+ __Pyx_GIVEREF(((PyObject *)__pyx_v_npos));
+ __Pyx_INCREF(((PyObject *)__pyx_v_nvals));
+ PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_nvals));
+ __Pyx_GIVEREF(((PyObject *)__pyx_v_nvals));
+ __Pyx_INCREF(((PyObject *)__pyx_v_nwvals));
+ PyTuple_SET_ITEM(__pyx_t_7, 2, ((PyObject *)__pyx_v_nwvals));
+ __Pyx_GIVEREF(((PyObject *)__pyx_v_nwvals));
+ __pyx_r = __pyx_t_7;
+ __pyx_t_7 = 0;
+ 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_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
+ __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
+ __Pyx_SafeReleaseBuffer(&__pyx_bstruct_nwvals);
+ __Pyx_SafeReleaseBuffer(&__pyx_bstruct_nvals);
+ __Pyx_SafeReleaseBuffer(&__pyx_bstruct_npos);
+ __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
+ __Pyx_AddTraceback("yt.amr_utils.QuadTree.get_all_from_level");
+ __pyx_r = NULL;
+ goto __pyx_L2;
+ __pyx_L0:;
+ __Pyx_SafeReleaseBuffer(&__pyx_bstruct_nwvals);
+ __Pyx_SafeReleaseBuffer(&__pyx_bstruct_nvals);
+ __Pyx_SafeReleaseBuffer(&__pyx_bstruct_npos);
+ __pyx_L2:;
+ __Pyx_DECREF(__pyx_v_vals);
+ __Pyx_DECREF((PyObject *)__pyx_v_npos);
+ __Pyx_DECREF((PyObject *)__pyx_v_nvals);
+ __Pyx_DECREF((PyObject *)__pyx_v_nwvals);
+ __Pyx_DECREF((PyObject *)__pyx_v_self);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":214
+ * return npos, nvals, nwvals
+ *
+ * cdef int count_at_level(self, QuadTreeNode *node, int level): # <<<<<<<<<<<<<<
+ * cdef int i, j
+ * # We only really return a non-zero, calculated value if we are at the
+ */
+
+static int __pyx_f_2yt_9amr_utils_8QuadTree_count_at_level(struct __pyx_obj_2yt_9amr_utils_QuadTree *__pyx_v_self, struct __pyx_t_2yt_9amr_utils_QuadTreeNode *__pyx_v_node, int __pyx_v_level) {
+ int __pyx_v_i;
+ int __pyx_v_j;
+ int __pyx_v_count;
+ int __pyx_r;
+ int __pyx_t_1;
+ int __pyx_t_2;
+ int __pyx_t_3;
+ __Pyx_RefNannySetupContext("count_at_level");
+ __Pyx_INCREF((PyObject *)__pyx_v_self);
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":218
+ * # We only really return a non-zero, calculated value if we are at the
+ * # level in question.
+ * if node.level == level: # <<<<<<<<<<<<<<
+ * # We return 1 if there are no finer points at this level and zero
+ * # if there are
+ */
+ __pyx_t_1 = (__pyx_v_node->level == __pyx_v_level);
+ if (__pyx_t_1) {
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":221
+ * # We return 1 if there are no finer points at this level and zero
+ * # if there are
+ * return (node.children[0][0] == NULL) # <<<<<<<<<<<<<<
+ * if node.children[0][0] == NULL: return 0
+ * cdef int count = 0
+ */
+ __pyx_r = (((__pyx_v_node->children[0])[0]) == NULL);
+ goto __pyx_L0;
+ goto __pyx_L3;
+ }
+ __pyx_L3:;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":222
+ * # if there are
+ * return (node.children[0][0] == NULL)
+ * if node.children[0][0] == NULL: return 0 # <<<<<<<<<<<<<<
+ * cdef int count = 0
+ * for i in range(2):
+ */
+ __pyx_t_1 = (((__pyx_v_node->children[0])[0]) == NULL);
+ if (__pyx_t_1) {
+ __pyx_r = 0;
+ goto __pyx_L0;
+ goto __pyx_L4;
+ }
+ __pyx_L4:;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":223
+ * return (node.children[0][0] == NULL)
+ * if node.children[0][0] == NULL: return 0
+ * cdef int count = 0 # <<<<<<<<<<<<<<
+ * for i in range(2):
+ * for j in range(2):
+ */
+ __pyx_v_count = 0;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":224
+ * if node.children[0][0] == NULL: return 0
+ * cdef int count = 0
+ * for i in range(2): # <<<<<<<<<<<<<<
+ * for j in range(2):
+ * count += self.count_at_level(node.children[i][j], level)
+ */
+ 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/QuadTree.pyx":225
+ * cdef int count = 0
+ * for i in range(2):
+ * for j in range(2): # <<<<<<<<<<<<<<
+ * count += self.count_at_level(node.children[i][j], level)
+ * return count
+ */
+ 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/QuadTree.pyx":226
+ * for i in range(2):
+ * for j in range(2):
+ * count += self.count_at_level(node.children[i][j], level) # <<<<<<<<<<<<<<
+ * return count
+ *
+ */
+ __pyx_v_count += ((struct __pyx_vtabstruct_2yt_9amr_utils_QuadTree *)__pyx_v_self->__pyx_vtab)->count_at_level(__pyx_v_self, ((__pyx_v_node->children[__pyx_v_i])[__pyx_v_j]), __pyx_v_level);
+ }
+ }
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":227
+ * for j in range(2):
+ * count += self.count_at_level(node.children[i][j], level)
+ * return count # <<<<<<<<<<<<<<
+ *
+ * cdef int fill_from_level(self, QuadTreeNode *node, int level,
+ */
+ __pyx_r = __pyx_v_count;
+ goto __pyx_L0;
+
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_DECREF((PyObject *)__pyx_v_self);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":229
+ * return count
+ *
+ * cdef int fill_from_level(self, QuadTreeNode *node, int level, # <<<<<<<<<<<<<<
+ * np.int64_t curpos,
+ * np.int64_t *pdata,
+ */
+
+static int __pyx_f_2yt_9amr_utils_8QuadTree_fill_from_level(struct __pyx_obj_2yt_9amr_utils_QuadTree *__pyx_v_self, struct __pyx_t_2yt_9amr_utils_QuadTreeNode *__pyx_v_node, int __pyx_v_level, __pyx_t_5numpy_int64_t __pyx_v_curpos, __pyx_t_5numpy_int64_t *__pyx_v_pdata, __pyx_t_5numpy_float64_t *__pyx_v_vdata, __pyx_t_5numpy_float64_t *__pyx_v_wdata) {
+ int __pyx_v_i;
+ int __pyx_v_j;
+ __pyx_t_5numpy_int64_t __pyx_v_added;
+ int __pyx_r;
+ int __pyx_t_1;
+ int __pyx_t_2;
+ int __pyx_t_3;
+ __Pyx_RefNannySetupContext("fill_from_level");
+ __Pyx_INCREF((PyObject *)__pyx_v_self);
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":235
+ * np.float64_t *wdata):
+ * cdef int i, j
+ * if node.level == level: # <<<<<<<<<<<<<<
+ * if node.children[0][0] != NULL: return 0
+ * for i in range(self.nvals):
+ */
+ __pyx_t_1 = (__pyx_v_node->level == __pyx_v_level);
+ if (__pyx_t_1) {
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":236
+ * cdef int i, j
+ * if node.level == level:
+ * if node.children[0][0] != NULL: return 0 # <<<<<<<<<<<<<<
+ * for i in range(self.nvals):
+ * vdata[self.nvals * curpos + i] = node.val[i]
+ */
+ __pyx_t_1 = (((__pyx_v_node->children[0])[0]) != NULL);
+ if (__pyx_t_1) {
+ __pyx_r = 0;
+ goto __pyx_L0;
+ goto __pyx_L4;
+ }
+ __pyx_L4:;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":237
+ * if node.level == level:
+ * if node.children[0][0] != NULL: return 0
+ * for i in range(self.nvals): # <<<<<<<<<<<<<<
+ * vdata[self.nvals * curpos + i] = node.val[i]
+ * wdata[curpos] = node.weight_val
+ */
+ __pyx_t_2 = __pyx_v_self->nvals;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":238
+ * if node.children[0][0] != NULL: return 0
+ * for i in range(self.nvals):
+ * vdata[self.nvals * curpos + i] = node.val[i] # <<<<<<<<<<<<<<
+ * wdata[curpos] = node.weight_val
+ * pdata[curpos * 2] = node.pos[0]
+ */
+ (__pyx_v_vdata[((__pyx_v_self->nvals * __pyx_v_curpos) + __pyx_v_i)]) = (__pyx_v_node->val[__pyx_v_i]);
+ }
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":239
+ * for i in range(self.nvals):
+ * vdata[self.nvals * curpos + i] = node.val[i]
+ * wdata[curpos] = node.weight_val # <<<<<<<<<<<<<<
+ * pdata[curpos * 2] = node.pos[0]
+ * pdata[curpos * 2 + 1] = node.pos[1]
+ */
+ (__pyx_v_wdata[__pyx_v_curpos]) = __pyx_v_node->weight_val;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":240
+ * vdata[self.nvals * curpos + i] = node.val[i]
+ * wdata[curpos] = node.weight_val
+ * pdata[curpos * 2] = node.pos[0] # <<<<<<<<<<<<<<
+ * pdata[curpos * 2 + 1] = node.pos[1]
+ * return 1
+ */
+ (__pyx_v_pdata[(__pyx_v_curpos * 2)]) = (__pyx_v_node->pos[0]);
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":241
+ * wdata[curpos] = node.weight_val
+ * pdata[curpos * 2] = node.pos[0]
+ * pdata[curpos * 2 + 1] = node.pos[1] # <<<<<<<<<<<<<<
+ * return 1
+ * if node.children[0][0] == NULL: return 0
+ */
+ (__pyx_v_pdata[((__pyx_v_curpos * 2) + 1)]) = (__pyx_v_node->pos[1]);
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":242
+ * pdata[curpos * 2] = node.pos[0]
+ * pdata[curpos * 2 + 1] = node.pos[1]
+ * return 1 # <<<<<<<<<<<<<<
+ * if node.children[0][0] == NULL: return 0
+ * cdef np.int64_t added = 0
+ */
+ __pyx_r = 1;
+ goto __pyx_L0;
+ goto __pyx_L3;
+ }
+ __pyx_L3:;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":243
+ * pdata[curpos * 2 + 1] = node.pos[1]
+ * return 1
+ * if node.children[0][0] == NULL: return 0 # <<<<<<<<<<<<<<
+ * cdef np.int64_t added = 0
+ * for i in range(2):
+ */
+ __pyx_t_1 = (((__pyx_v_node->children[0])[0]) == NULL);
+ if (__pyx_t_1) {
+ __pyx_r = 0;
+ goto __pyx_L0;
+ goto __pyx_L7;
+ }
+ __pyx_L7:;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":244
+ * return 1
+ * if node.children[0][0] == NULL: return 0
+ * cdef np.int64_t added = 0 # <<<<<<<<<<<<<<
+ * for i in range(2):
+ * for j in range(2):
+ */
+ __pyx_v_added = 0;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":245
+ * if node.children[0][0] == NULL: return 0
+ * cdef np.int64_t added = 0
+ * for i in range(2): # <<<<<<<<<<<<<<
+ * for j in range(2):
+ * added += self.fill_from_level(node.children[i][j],
+ */
+ 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/QuadTree.pyx":246
+ * cdef np.int64_t added = 0
+ * for i in range(2):
+ * for j in range(2): # <<<<<<<<<<<<<<
+ * added += self.fill_from_level(node.children[i][j],
+ * level, curpos + added, pdata, vdata, wdata)
+ */
+ 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/QuadTree.pyx":248
+ * for j in range(2):
+ * added += self.fill_from_level(node.children[i][j],
+ * level, curpos + added, pdata, vdata, wdata) # <<<<<<<<<<<<<<
+ * return added
+ *
+ */
+ __pyx_v_added += ((struct __pyx_vtabstruct_2yt_9amr_utils_QuadTree *)__pyx_v_self->__pyx_vtab)->fill_from_level(__pyx_v_self, ((__pyx_v_node->children[__pyx_v_i])[__pyx_v_j]), __pyx_v_level, (__pyx_v_curpos + __pyx_v_added), __pyx_v_pdata, __pyx_v_vdata, __pyx_v_wdata);
+ }
+ }
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":249
+ * added += self.fill_from_level(node.children[i][j],
+ * level, curpos + added, pdata, vdata, wdata)
+ * return added # <<<<<<<<<<<<<<
+ *
+ * def __dealloc__(self):
+ */
+ __pyx_r = __pyx_v_added;
+ goto __pyx_L0;
+
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_DECREF((PyObject *)__pyx_v_self);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":251
+ * return added
+ *
+ * def __dealloc__(self): # <<<<<<<<<<<<<<
+ * cdef int i, j
+ * for i in range(self.top_grid_dims[0]):
*/
- __pyx_t_15 = 2;
- __pyx_v_moff = ((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_slab_start.buf, __pyx_t_13, __pyx_bstride_0_slab_start)) * (__pyx_v_strides[0])) + (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_slab_start.buf, __pyx_t_14, __pyx_bstride_0_slab_start)) + __pyx_v_j) * (__pyx_v_strides[1]))) + (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_slab_start.buf, __pyx_t_15, __pyx_bstride_0_slab_start)) + __pyx_v_i) * (__pyx_v_strides[2])));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/fortran_reader.pyx":67
- * + (slab_start[2] + i) * strides[2]
- * #print offset + 4 * moff, pos
- * fseek(f, offset + 4 * moff, SEEK_SET) # <<<<<<<<<<<<<<
- * fread(<void *> (data + pos), 4, slab_size[0], f)
- * pos += slab_size[0]
+static void __pyx_pf_2yt_9amr_utils_8QuadTree___dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_pf_2yt_9amr_utils_8QuadTree___dealloc__(PyObject *__pyx_v_self) {
+ int __pyx_v_i;
+ int __pyx_v_j;
+ __pyx_t_5numpy_int64_t __pyx_t_1;
+ int __pyx_t_2;
+ __pyx_t_5numpy_int64_t __pyx_t_3;
+ int __pyx_t_4;
+ __Pyx_RefNannySetupContext("__dealloc__");
+ __Pyx_INCREF((PyObject *)__pyx_v_self);
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":253
+ * def __dealloc__(self):
+ * cdef int i, j
+ * for i in range(self.top_grid_dims[0]): # <<<<<<<<<<<<<<
+ * for j in range(self.top_grid_dims[1]):
+ * QTN_free(self.root_nodes[i][j])
*/
- fseek(__pyx_v_f, (__pyx_v_offset + (4 * __pyx_v_moff)), SEEK_SET);
+ __pyx_t_1 = (((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self)->top_grid_dims[0]);
+ for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
+ __pyx_v_i = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/fortran_reader.pyx":68
- * #print offset + 4 * moff, pos
- * fseek(f, offset + 4 * moff, SEEK_SET)
- * fread(<void *> (data + pos), 4, slab_size[0], f) # <<<<<<<<<<<<<<
- * pos += slab_size[0]
- * return buffer
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":254
+ * cdef int i, j
+ * for i in range(self.top_grid_dims[0]):
+ * for j in range(self.top_grid_dims[1]): # <<<<<<<<<<<<<<
+ * QTN_free(self.root_nodes[i][j])
+ * free(self.root_nodes[i])
*/
- __pyx_t_16 = 0;
- fread(((void *)(__pyx_v_data + __pyx_v_pos)), 4, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_slab_size.buf, __pyx_t_16, __pyx_bstride_0_slab_size)), __pyx_v_f);
+ __pyx_t_3 = (((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self)->top_grid_dims[1]);
+ for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
+ __pyx_v_j = __pyx_t_4;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/fortran_reader.pyx":69
- * fseek(f, offset + 4 * moff, SEEK_SET)
- * fread(<void *> (data + pos), 4, slab_size[0], f)
- * pos += slab_size[0] # <<<<<<<<<<<<<<
- * return buffer
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":255
+ * for i in range(self.top_grid_dims[0]):
+ * for j in range(self.top_grid_dims[1]):
+ * QTN_free(self.root_nodes[i][j]) # <<<<<<<<<<<<<<
+ * free(self.root_nodes[i])
+ * free(self.root_nodes)
*/
- __pyx_t_17 = 0;
- __pyx_v_pos += (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_slab_size.buf, __pyx_t_17, __pyx_bstride_0_slab_size));
+ __pyx_f_2yt_9amr_utils_QTN_free(((((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self)->root_nodes[__pyx_v_i])[__pyx_v_j]));
}
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":256
+ * for j in range(self.top_grid_dims[1]):
+ * QTN_free(self.root_nodes[i][j])
+ * free(self.root_nodes[i]) # <<<<<<<<<<<<<<
+ * free(self.root_nodes)
+ */
+ free((((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self)->root_nodes[__pyx_v_i]));
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/fortran_reader.pyx":70
- * fread(<void *> (data + pos), 4, slab_size[0], f)
- * pos += slab_size[0]
- * return buffer # <<<<<<<<<<<<<<
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":257
+ * QTN_free(self.root_nodes[i][j])
+ * free(self.root_nodes[i])
+ * free(self.root_nodes) # <<<<<<<<<<<<<<
*/
- __Pyx_XDECREF(__pyx_r);
- __Pyx_INCREF(((PyObject *)__pyx_v_buffer));
- __pyx_r = ((PyObject *)__pyx_v_buffer);
- goto __pyx_L0;
+ free(((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self)->root_nodes);
- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_4);
- __Pyx_XDECREF(__pyx_t_5);
- __Pyx_XDECREF(__pyx_t_6);
- { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
- __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
- __Pyx_SafeReleaseBuffer(&__pyx_bstruct_slab_size);
- __Pyx_SafeReleaseBuffer(&__pyx_bstruct_slab_start);
- __Pyx_SafeReleaseBuffer(&__pyx_bstruct_root_size);
- __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
- __Pyx_AddTraceback("yt.amr_utils.read_tiger_section");
- __pyx_r = NULL;
- goto __pyx_L2;
- __pyx_L0:;
- __Pyx_SafeReleaseBuffer(&__pyx_bstruct_slab_size);
- __Pyx_SafeReleaseBuffer(&__pyx_bstruct_slab_start);
- __Pyx_SafeReleaseBuffer(&__pyx_bstruct_root_size);
- __pyx_L2:;
- __Pyx_XDECREF((PyObject *)__pyx_v_buffer);
- __Pyx_DECREF((PyObject *)__pyx_v_slab_start);
- __Pyx_DECREF((PyObject *)__pyx_v_slab_size);
- __Pyx_DECREF((PyObject *)__pyx_v_root_size);
- __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_DECREF((PyObject *)__pyx_v_self);
__Pyx_RefNannyFinishContext();
- return __pyx_r;
}
/* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":187
@@ -21511,17 +23824,17 @@
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
*/
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(((PyObject *)__pyx_kp_u_7));
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_u_7));
__Pyx_GIVEREF(((PyObject *)__pyx_kp_u_7));
- __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__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[10]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[11]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L6;
}
__pyx_L6:;
@@ -21557,17 +23870,17 @@
*
* info.buf = PyArray_DATA(self)
*/
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_INCREF(((PyObject *)__pyx_kp_u_8));
PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_u_8));
__Pyx_GIVEREF(((PyObject *)__pyx_kp_u_8));
- __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__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[10]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[11]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L7;
}
__pyx_L7:;
@@ -21834,17 +24147,17 @@
* if t == NPY_BYTE: f = "b"
* elif t == NPY_UBYTE: f = "B"
*/
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(((PyObject *)__pyx_kp_u_9));
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_u_9));
__Pyx_GIVEREF(((PyObject *)__pyx_kp_u_9));
- __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__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[10]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[11]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L13;
}
__pyx_L13:;
@@ -22078,22 +24391,22 @@
* info.format = f
* return
*/
- __pyx_t_5 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_10), __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_10), __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__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, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__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[10]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[11]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_L14:;
@@ -22153,7 +24466,7 @@
* f[0] = 0 # Terminate format string
*
*/
- __pyx_t_9 = __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_9 == NULL)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __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_9 == NULL)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_f = __pyx_t_9;
/* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":276
@@ -22272,7 +24585,7 @@
* cdef inline object PyArray_MultiIterNew2(a, b):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -22311,7 +24624,7 @@
* cdef inline object PyArray_MultiIterNew3(a, b, c):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -22350,7 +24663,7 @@
* cdef inline object PyArray_MultiIterNew4(a, b, c, d):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -22389,7 +24702,7 @@
* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -22428,7 +24741,7 @@
* cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -22509,7 +24822,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[10]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
for (;;) {
if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
@@ -22525,9 +24838,9 @@
* child, new_offset = fields
*
*/
- __pyx_t_3 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (!__pyx_t_3) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (!__pyx_t_3) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected tuple, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected tuple, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_v_fields));
__pyx_v_fields = ((PyObject *)__pyx_t_3);
__pyx_t_3 = 0;
@@ -22542,7 +24855,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_t_3 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_3);
- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_4 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_4);
__Pyx_DECREF(((PyObject *)__pyx_v_child));
__pyx_v_child = ((PyArray_Descr *)__pyx_t_3);
@@ -22552,7 +24865,7 @@
__pyx_t_4 = 0;
} else {
__Pyx_UnpackTupleError(((PyObject *)__pyx_v_fields), 2);
- {__pyx_filename = __pyx_f[10]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[11]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
/* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":785
@@ -22562,21 +24875,21 @@
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
*
*/
- __pyx_t_4 = PyInt_FromLong((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_15, Py_LT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_15, Py_LT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 785; __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[11]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_6) {
@@ -22587,17 +24900,17 @@
*
* if ((child.byteorder == '>' and little_endian) or
*/
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_INCREF(((PyObject *)__pyx_kp_u_11));
PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_u_11));
__Pyx_GIVEREF(((PyObject *)__pyx_kp_u_11));
- __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- {__pyx_filename = __pyx_f[10]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[11]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L5;
}
__pyx_L5:;
@@ -22644,17 +24957,17 @@
* # One could encode it in the format string and have Cython
* # complain instead, BUT: < and > in format strings also imply
*/
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(((PyObject *)__pyx_kp_u_9));
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_u_9));
__Pyx_GIVEREF(((PyObject *)__pyx_kp_u_9));
- __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_5, 0, 0);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- {__pyx_filename = __pyx_f[10]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[11]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L6;
}
__pyx_L6:;
@@ -22667,12 +24980,12 @@
* f += 1
*/
while (1) {
- __pyx_t_5 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 800; __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[11]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (!__pyx_t_6) break;
@@ -22730,7 +25043,7 @@
* if end - f < 5:
* raise RuntimeError(u"Format string allocated too short.")
*/
- __pyx_t_3 = PyInt_FromLong(__pyx_v_child->type_num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(__pyx_v_child->type_num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_v_t);
__pyx_v_t = __pyx_t_3;
@@ -22753,17 +25066,17 @@
*
* # Until ticket #99 is fixed, use integers to avoid warnings
*/
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(((PyObject *)__pyx_kp_u_12));
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_u_12));
__Pyx_GIVEREF(((PyObject *)__pyx_kp_u_12));
- __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_5, 0, 0);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- {__pyx_filename = __pyx_f[10]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[11]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L10;
}
__pyx_L10:;
@@ -22775,12 +25088,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[10]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 98;
@@ -22794,12 +25107,12 @@
* elif t == NPY_SHORT: f[0] = 104 #"h"
* elif t == NPY_USHORT: f[0] = 72 #"H"
*/
- __pyx_t_3 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 814; __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[11]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 66;
@@ -22813,12 +25126,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[10]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 104;
@@ -22832,12 +25145,12 @@
* elif t == NPY_INT: f[0] = 105 #"i"
* elif t == NPY_UINT: f[0] = 73 #"I"
*/
- __pyx_t_3 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 816; __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[11]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 72;
@@ -22851,12 +25164,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[10]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 105;
@@ -22870,12 +25183,12 @@
* elif t == NPY_LONG: f[0] = 108 #"l"
* elif t == NPY_ULONG: f[0] = 76 #"L"
*/
- __pyx_t_3 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 818; __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[11]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 73;
@@ -22889,12 +25202,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[10]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 108;
@@ -22908,12 +25221,12 @@
* elif t == NPY_LONGLONG: f[0] = 113 #"q"
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
*/
- __pyx_t_3 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 820; __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[11]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 76;
@@ -22927,12 +25240,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[10]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 113;
@@ -22946,12 +25259,12 @@
* elif t == NPY_FLOAT: f[0] = 102 #"f"
* elif t == NPY_DOUBLE: f[0] = 100 #"d"
*/
- __pyx_t_3 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 822; __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[11]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 81;
@@ -22965,12 +25278,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[10]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 102;
@@ -22984,12 +25297,12 @@
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
*/
- __pyx_t_3 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 824; __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[11]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 100;
@@ -23003,12 +25316,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[10]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 103;
@@ -23022,12 +25335,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_3 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 826; __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[11]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 90;
@@ -23043,12 +25356,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[10]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 90;
@@ -23064,12 +25377,12 @@
* elif t == NPY_OBJECT: f[0] = 79 #"O"
* else:
*/
- __pyx_t_3 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 828; __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[11]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 90;
@@ -23085,12 +25398,12 @@
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
*/
- __pyx_t_5 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 79;
@@ -23105,19 +25418,19 @@
* f += 1
* else:
*/
- __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_10), __pyx_v_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_10), __pyx_v_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- {__pyx_filename = __pyx_f[10]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[11]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_L11:;
@@ -23140,7 +25453,7 @@
* return f
*
*/
- __pyx_t_10 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_f = __pyx_t_10;
}
__pyx_L9:;
@@ -24981,6 +27294,189 @@
0, /*tp_version_tag*/
#endif
};
+static struct __pyx_vtabstruct_2yt_9amr_utils_QuadTree __pyx_vtable_2yt_9amr_utils_QuadTree;
+
+static PyObject *__pyx_tp_new_2yt_9amr_utils_QuadTree(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_2yt_9amr_utils_QuadTree *p;
+ PyObject *o = (*t->tp_alloc)(t, 0);
+ if (!o) return 0;
+ p = ((struct __pyx_obj_2yt_9amr_utils_QuadTree *)o);
+ p->__pyx_vtab = __pyx_vtabptr_2yt_9amr_utils_QuadTree;
+ if (__pyx_pf_2yt_9amr_utils_8QuadTree___cinit__(o, a, k) < 0) {
+ Py_DECREF(o); o = 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_2yt_9amr_utils_QuadTree(PyObject *o) {
+ {
+ PyObject *etype, *eval, *etb;
+ PyErr_Fetch(&etype, &eval, &etb);
+ ++Py_REFCNT(o);
+ __pyx_pf_2yt_9amr_utils_8QuadTree___dealloc__(o);
+ if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
+ --Py_REFCNT(o);
+ PyErr_Restore(etype, eval, etb);
+ }
+ (*Py_TYPE(o)->tp_free)(o);
+}
+
+static struct PyMethodDef __pyx_methods_2yt_9amr_utils_QuadTree[] = {
+ {__Pyx_NAMESTR("add_array_to_tree"), (PyCFunction)__pyx_pf_2yt_9amr_utils_8QuadTree_add_array_to_tree, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("add_grid_to_tree"), (PyCFunction)__pyx_pf_2yt_9amr_utils_8QuadTree_add_grid_to_tree, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("get_all_from_level"), (PyCFunction)__pyx_pf_2yt_9amr_utils_8QuadTree_get_all_from_level, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
+ {0, 0, 0, 0}
+};
+
+static PyNumberMethods __pyx_tp_as_number_QuadTree = {
+ 0, /*nb_add*/
+ 0, /*nb_subtract*/
+ 0, /*nb_multiply*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*nb_divide*/
+ #endif
+ 0, /*nb_remainder*/
+ 0, /*nb_divmod*/
+ 0, /*nb_power*/
+ 0, /*nb_negative*/
+ 0, /*nb_positive*/
+ 0, /*nb_absolute*/
+ 0, /*nb_nonzero*/
+ 0, /*nb_invert*/
+ 0, /*nb_lshift*/
+ 0, /*nb_rshift*/
+ 0, /*nb_and*/
+ 0, /*nb_xor*/
+ 0, /*nb_or*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*nb_coerce*/
+ #endif
+ 0, /*nb_int*/
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*reserved*/
+ #else
+ 0, /*nb_long*/
+ #endif
+ 0, /*nb_float*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*nb_oct*/
+ #endif
+ #if PY_MAJOR_VERSION < 3
+ 0, /*nb_hex*/
+ #endif
+ 0, /*nb_inplace_add*/
+ 0, /*nb_inplace_subtract*/
+ 0, /*nb_inplace_multiply*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*nb_inplace_divide*/
+ #endif
+ 0, /*nb_inplace_remainder*/
+ 0, /*nb_inplace_power*/
+ 0, /*nb_inplace_lshift*/
+ 0, /*nb_inplace_rshift*/
+ 0, /*nb_inplace_and*/
+ 0, /*nb_inplace_xor*/
+ 0, /*nb_inplace_or*/
+ 0, /*nb_floor_divide*/
+ 0, /*nb_true_divide*/
+ 0, /*nb_inplace_floor_divide*/
+ 0, /*nb_inplace_true_divide*/
+ #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
+ 0, /*nb_index*/
+ #endif
+};
+
+static PySequenceMethods __pyx_tp_as_sequence_QuadTree = {
+ 0, /*sq_length*/
+ 0, /*sq_concat*/
+ 0, /*sq_repeat*/
+ 0, /*sq_item*/
+ 0, /*sq_slice*/
+ 0, /*sq_ass_item*/
+ 0, /*sq_ass_slice*/
+ 0, /*sq_contains*/
+ 0, /*sq_inplace_concat*/
+ 0, /*sq_inplace_repeat*/
+};
+
+static PyMappingMethods __pyx_tp_as_mapping_QuadTree = {
+ 0, /*mp_length*/
+ 0, /*mp_subscript*/
+ 0, /*mp_ass_subscript*/
+};
+
+static PyBufferProcs __pyx_tp_as_buffer_QuadTree = {
+ #if PY_MAJOR_VERSION < 3
+ 0, /*bf_getreadbuffer*/
+ #endif
+ #if PY_MAJOR_VERSION < 3
+ 0, /*bf_getwritebuffer*/
+ #endif
+ #if PY_MAJOR_VERSION < 3
+ 0, /*bf_getsegcount*/
+ #endif
+ #if PY_MAJOR_VERSION < 3
+ 0, /*bf_getcharbuffer*/
+ #endif
+ #if PY_VERSION_HEX >= 0x02060000
+ 0, /*bf_getbuffer*/
+ #endif
+ #if PY_VERSION_HEX >= 0x02060000
+ 0, /*bf_releasebuffer*/
+ #endif
+};
+
+PyTypeObject __pyx_type_2yt_9amr_utils_QuadTree = {
+ PyVarObject_HEAD_INIT(0, 0)
+ __Pyx_NAMESTR("yt.amr_utils.QuadTree"), /*tp_name*/
+ sizeof(struct __pyx_obj_2yt_9amr_utils_QuadTree), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_2yt_9amr_utils_QuadTree, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ 0, /*tp_compare*/
+ 0, /*tp_repr*/
+ &__pyx_tp_as_number_QuadTree, /*tp_as_number*/
+ &__pyx_tp_as_sequence_QuadTree, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping_QuadTree, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ &__pyx_tp_as_buffer_QuadTree, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_2yt_9amr_utils_QuadTree, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_2yt_9amr_utils_QuadTree, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ #if PY_VERSION_HEX >= 0x02060000
+ 0, /*tp_version_tag*/
+ #endif
+};
static struct PyMethodDef __pyx_methods[] = {
{__Pyx_NAMESTR("RecurseOctreeDepthFirst"), (PyCFunction)__pyx_pf_2yt_9amr_utils_RecurseOctreeDepthFirst, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
@@ -25050,6 +27546,7 @@
{&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1},
{&__pyx_n_s__a, __pyx_k__a, sizeof(__pyx_k__a), 0, 0, 1, 1},
{&__pyx_n_s__acenter, __pyx_k__acenter, sizeof(__pyx_k__acenter), 0, 0, 1, 1},
+ {&__pyx_n_s__add_to_position, __pyx_k__add_to_position, sizeof(__pyx_k__add_to_position), 0, 0, 1, 1},
{&__pyx_n_s__aimage, __pyx_k__aimage, sizeof(__pyx_k__aimage), 0, 0, 1, 1},
{&__pyx_n_s__alpha, __pyx_k__alpha, sizeof(__pyx_k__alpha), 0, 0, 1, 1},
{&__pyx_n_s__avp_dir, __pyx_k__avp_dir, sizeof(__pyx_k__avp_dir), 0, 0, 1, 1},
@@ -25072,11 +27569,15 @@
{&__pyx_n_s__center, __pyx_k__center, sizeof(__pyx_k__center), 0, 0, 1, 1},
{&__pyx_n_s__child_indices, __pyx_k__child_indices, sizeof(__pyx_k__child_indices), 0, 0, 1, 1},
{&__pyx_n_s__child_mask, __pyx_k__child_mask, sizeof(__pyx_k__child_mask), 0, 0, 1, 1},
+ {&__pyx_n_s__children, __pyx_k__children, sizeof(__pyx_k__children), 0, 0, 1, 1},
+ {&__pyx_n_s__cm, __pyx_k__cm, sizeof(__pyx_k__cm), 0, 0, 1, 1},
{&__pyx_n_s__coord, __pyx_k__coord, sizeof(__pyx_k__coord), 0, 0, 1, 1},
{&__pyx_n_s__copy, __pyx_k__copy, sizeof(__pyx_k__copy), 0, 0, 1, 1},
{&__pyx_n_s__copy_back, __pyx_k__copy_back, sizeof(__pyx_k__copy_back), 0, 0, 1, 1},
{&__pyx_n_s__copy_into, __pyx_k__copy_into, sizeof(__pyx_k__copy_into), 0, 0, 1, 1},
{&__pyx_n_s__corners, __pyx_k__corners, sizeof(__pyx_k__corners), 0, 0, 1, 1},
+ {&__pyx_n_s__count_at_level, __pyx_k__count_at_level, sizeof(__pyx_k__count_at_level), 0, 0, 1, 1},
+ {&__pyx_n_s__count_only, __pyx_k__count_only, sizeof(__pyx_k__count_only), 0, 0, 1, 1},
{&__pyx_n_s__curpos, __pyx_k__curpos, sizeof(__pyx_k__curpos), 0, 0, 1, 1},
{&__pyx_n_s__data, __pyx_k__data, sizeof(__pyx_k__data), 0, 0, 1, 1},
{&__pyx_n_s__dbin, __pyx_k__dbin, sizeof(__pyx_k__dbin), 0, 0, 1, 1},
@@ -25101,6 +27602,8 @@
{&__pyx_n_s__field_tables, __pyx_k__field_tables, sizeof(__pyx_k__field_tables), 0, 0, 1, 1},
{&__pyx_n_s__fields, __pyx_k__fields, sizeof(__pyx_k__fields), 0, 0, 1, 1},
{&__pyx_n_s__filename, __pyx_k__filename, sizeof(__pyx_k__filename), 0, 0, 1, 1},
+ {&__pyx_n_s__fill_from_level, __pyx_k__fill_from_level, sizeof(__pyx_k__fill_from_level), 0, 0, 1, 1},
+ {&__pyx_n_s__find_on_root_level, __pyx_k__find_on_root_level, sizeof(__pyx_k__find_on_root_level), 0, 0, 1, 1},
{&__pyx_n_s__float32, __pyx_k__float32, sizeof(__pyx_k__float32), 0, 0, 1, 1},
{&__pyx_n_s__float64, __pyx_k__float64, sizeof(__pyx_k__float64), 0, 0, 1, 1},
{&__pyx_n_s__floor, __pyx_k__floor, sizeof(__pyx_k__floor), 0, 0, 1, 1},
@@ -25170,6 +27673,7 @@
{&__pyx_n_s__nshells, __pyx_k__nshells, sizeof(__pyx_k__nshells), 0, 0, 1, 1},
{&__pyx_n_s__numpy, __pyx_k__numpy, sizeof(__pyx_k__numpy), 0, 0, 1, 1},
{&__pyx_n_s__nv, __pyx_k__nv, sizeof(__pyx_k__nv), 0, 0, 1, 1},
+ {&__pyx_n_s__nvals, __pyx_k__nvals, sizeof(__pyx_k__nvals), 0, 0, 1, 1},
{&__pyx_n_s__o_s, __pyx_k__o_s, sizeof(__pyx_k__o_s), 0, 0, 1, 1},
{&__pyx_n_s__obj, __pyx_k__obj, sizeof(__pyx_k__obj), 0, 0, 1, 1},
{&__pyx_n_s__offset, __pyx_k__offset, sizeof(__pyx_k__offset), 0, 0, 1, 1},
@@ -25181,20 +27685,27 @@
{&__pyx_n_s__pdx, __pyx_k__pdx, sizeof(__pyx_k__pdx), 0, 0, 1, 1},
{&__pyx_n_s__pdy, __pyx_k__pdy, sizeof(__pyx_k__pdy), 0, 0, 1, 1},
{&__pyx_n_s__pmask, __pyx_k__pmask, sizeof(__pyx_k__pmask), 0, 0, 1, 1},
+ {&__pyx_n_s__po2, __pyx_k__po2, sizeof(__pyx_k__po2), 0, 0, 1, 1},
{&__pyx_n_s__points, __pyx_k__points, sizeof(__pyx_k__points), 0, 0, 1, 1},
+ {&__pyx_n_s__pos, __pyx_k__pos, sizeof(__pyx_k__pos), 0, 0, 1, 1},
{&__pyx_n_s__posx, __pyx_k__posx, sizeof(__pyx_k__posx), 0, 0, 1, 1},
{&__pyx_n_s__posy, __pyx_k__posy, sizeof(__pyx_k__posy), 0, 0, 1, 1},
{&__pyx_n_s__posz, __pyx_k__posz, sizeof(__pyx_k__posz), 0, 0, 1, 1},
{&__pyx_n_s__proj_overlap, __pyx_k__proj_overlap, sizeof(__pyx_k__proj_overlap), 0, 0, 1, 1},
{&__pyx_n_s__pv, __pyx_k__pv, sizeof(__pyx_k__pv), 0, 0, 1, 1},
+ {&__pyx_n_s__pvals, __pyx_k__pvals, sizeof(__pyx_k__pvals), 0, 0, 1, 1},
+ {&__pyx_n_s__pweight_vals, __pyx_k__pweight_vals, sizeof(__pyx_k__pweight_vals), 0, 0, 1, 1},
{&__pyx_n_s__px, __pyx_k__px, sizeof(__pyx_k__px), 0, 0, 1, 1},
+ {&__pyx_n_s__pxs, __pyx_k__pxs, sizeof(__pyx_k__pxs), 0, 0, 1, 1},
{&__pyx_n_s__py, __pyx_k__py, sizeof(__pyx_k__py), 0, 0, 1, 1},
+ {&__pyx_n_s__pys, __pyx_k__pys, sizeof(__pyx_k__pys), 0, 0, 1, 1},
{&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1},
{&__pyx_n_s__readonly, __pyx_k__readonly, sizeof(__pyx_k__readonly), 0, 0, 1, 1},
{&__pyx_n_s__red, __pyx_k__red, sizeof(__pyx_k__red), 0, 0, 1, 1},
{&__pyx_n_s__refined, __pyx_k__refined, sizeof(__pyx_k__refined), 0, 0, 1, 1},
{&__pyx_n_s__refined_pos, __pyx_k__refined_pos, sizeof(__pyx_k__refined_pos), 0, 0, 1, 1},
{&__pyx_n_s__right_edge, __pyx_k__right_edge, sizeof(__pyx_k__right_edge), 0, 0, 1, 1},
+ {&__pyx_n_s__root_nodes, __pyx_k__root_nodes, sizeof(__pyx_k__root_nodes), 0, 0, 1, 1},
{&__pyx_n_s__root_size, __pyx_k__root_size, sizeof(__pyx_k__root_size), 0, 0, 1, 1},
{&__pyx_n_s__rot_mat, __pyx_k__rot_mat, sizeof(__pyx_k__rot_mat), 0, 0, 1, 1},
{&__pyx_n_s__sample_values, __pyx_k__sample_values, sizeof(__pyx_k__sample_values), 0, 0, 1, 1},
@@ -25204,6 +27715,7 @@
{&__pyx_n_s__slab_start, __pyx_k__slab_start, sizeof(__pyx_k__slab_start), 0, 0, 1, 1},
{&__pyx_n_s__split, __pyx_k__split, sizeof(__pyx_k__split), 0, 0, 1, 1},
{&__pyx_n_s__stack, __pyx_k__stack, sizeof(__pyx_k__stack), 0, 0, 1, 1},
+ {&__pyx_n_s__start_index, __pyx_k__start_index, sizeof(__pyx_k__start_index), 0, 0, 1, 1},
{&__pyx_n_s__strides, __pyx_k__strides, sizeof(__pyx_k__strides), 0, 0, 1, 1},
{&__pyx_n_s__subgrid_faces, __pyx_k__subgrid_faces, sizeof(__pyx_k__subgrid_faces), 0, 0, 1, 1},
{&__pyx_n_s__suboffsets, __pyx_k__suboffsets, sizeof(__pyx_k__suboffsets), 0, 0, 1, 1},
@@ -25212,11 +27724,14 @@
{&__pyx_n_s__tables, __pyx_k__tables, sizeof(__pyx_k__tables), 0, 0, 1, 1},
{&__pyx_n_s__tf, __pyx_k__tf, sizeof(__pyx_k__tf), 0, 0, 1, 1},
{&__pyx_n_s__tf_obj, __pyx_k__tf_obj, sizeof(__pyx_k__tf_obj), 0, 0, 1, 1},
+ {&__pyx_n_s__top_grid_dims, __pyx_k__top_grid_dims, sizeof(__pyx_k__top_grid_dims), 0, 0, 1, 1},
{&__pyx_n_s__type_num, __pyx_k__type_num, sizeof(__pyx_k__type_num), 0, 0, 1, 1},
{&__pyx_n_s__u, __pyx_k__u, sizeof(__pyx_k__u), 0, 0, 1, 1},
{&__pyx_n_s__ug, __pyx_k__ug, sizeof(__pyx_k__ug), 0, 0, 1, 1},
{&__pyx_n_s__v, __pyx_k__v, sizeof(__pyx_k__v), 0, 0, 1, 1},
+ {&__pyx_n_s__val, __pyx_k__val, sizeof(__pyx_k__val), 0, 0, 1, 1},
{&__pyx_n_s__values, __pyx_k__values, sizeof(__pyx_k__values), 0, 0, 1, 1},
+ {&__pyx_n_s__vd_strides, __pyx_k__vd_strides, sizeof(__pyx_k__vd_strides), 0, 0, 1, 1},
{&__pyx_n_s__vp, __pyx_k__vp, sizeof(__pyx_k__vp), 0, 0, 1, 1},
{&__pyx_n_s__vp_dir, __pyx_k__vp_dir, sizeof(__pyx_k__vp_dir), 0, 0, 1, 1},
{&__pyx_n_s__vp_pos, __pyx_k__vp_pos, sizeof(__pyx_k__vp_pos), 0, 0, 1, 1},
@@ -25225,6 +27740,8 @@
{&__pyx_n_s__weight_field_ids, __pyx_k__weight_field_ids, sizeof(__pyx_k__weight_field_ids), 0, 0, 1, 1},
{&__pyx_n_s__weight_table_id, __pyx_k__weight_table_id, sizeof(__pyx_k__weight_table_id), 0, 0, 1, 1},
{&__pyx_n_s__weight_table_ids, __pyx_k__weight_table_ids, sizeof(__pyx_k__weight_table_ids), 0, 0, 1, 1},
+ {&__pyx_n_s__weight_val, __pyx_k__weight_val, sizeof(__pyx_k__weight_val), 0, 0, 1, 1},
+ {&__pyx_n_s__wvals, __pyx_k__wvals, sizeof(__pyx_k__wvals), 0, 0, 1, 1},
{&__pyx_n_s__x, __pyx_k__x, sizeof(__pyx_k__x), 0, 0, 1, 1},
{&__pyx_n_s__x_bins, __pyx_k__x_bins, sizeof(__pyx_k__x_bins), 0, 0, 1, 1},
{&__pyx_n_s__x_bounds, __pyx_k__x_bounds, sizeof(__pyx_k__x_bounds), 0, 0, 1, 1},
@@ -25251,8 +27768,8 @@
#else
__pyx_builtin_xrange = __Pyx_GetName(__pyx_b, __pyx_n_s__xrange); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
- __pyx_builtin_RuntimeError = __Pyx_GetName(__pyx_b, __pyx_n_s__RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_builtin_RuntimeError = __Pyx_GetName(__pyx_b, __pyx_n_s__RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
return 0;
__pyx_L1_error:;
return -1;
@@ -25352,9 +27869,9 @@
*(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[2]; __pyx_lineno = 223; __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[2]; __pyx_lineno = 223; __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[2]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyType_Ready(&__pyx_type_2yt_9amr_utils_VectorPlane) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 222; __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[2]; __pyx_lineno = 222; __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[2]; __pyx_lineno = 222; __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
@@ -25376,9 +27893,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[2]; __pyx_lineno = 294; __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[2]; __pyx_lineno = 294; __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[2]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyType_Ready(&__pyx_type_2yt_9amr_utils_PartitionedGrid) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 299; __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[2]; __pyx_lineno = 299; __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[2]; __pyx_lineno = 299; __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
@@ -25386,9 +27903,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[2]; __pyx_lineno = 517; __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[2]; __pyx_lineno = 517; __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[2]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyType_Ready(&__pyx_type_2yt_9amr_utils_GridFace) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 537; __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[2]; __pyx_lineno = 537; __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[2]; __pyx_lineno = 537; __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
@@ -25396,16 +27913,32 @@
#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[2]; __pyx_lineno = 549; __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[2]; __pyx_lineno = 549; __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[2]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyType_Ready(&__pyx_type_2yt_9amr_utils_ProtoPrism) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 569; __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[2]; __pyx_lineno = 569; __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[2]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_2yt_9amr_utils_ProtoPrism = &__pyx_type_2yt_9amr_utils_ProtoPrism;
+ __pyx_vtabptr_2yt_9amr_utils_QuadTree = &__pyx_vtable_2yt_9amr_utils_QuadTree;
+ #if PY_MAJOR_VERSION >= 3
+ __pyx_vtable_2yt_9amr_utils_QuadTree.add_to_position = (void (*)(struct __pyx_obj_2yt_9amr_utils_QuadTree *, int, __pyx_t_5numpy_int64_t *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t))__pyx_f_2yt_9amr_utils_8QuadTree_add_to_position;
+ __pyx_vtable_2yt_9amr_utils_QuadTree.find_on_root_level = (struct __pyx_t_2yt_9amr_utils_QuadTreeNode *(*)(struct __pyx_obj_2yt_9amr_utils_QuadTree *, __pyx_t_5numpy_int64_t *, int))__pyx_f_2yt_9amr_utils_8QuadTree_find_on_root_level;
+ __pyx_vtable_2yt_9amr_utils_QuadTree.count_at_level = (int (*)(struct __pyx_obj_2yt_9amr_utils_QuadTree *, struct __pyx_t_2yt_9amr_utils_QuadTreeNode *, int))__pyx_f_2yt_9amr_utils_8QuadTree_count_at_level;
+ __pyx_vtable_2yt_9amr_utils_QuadTree.fill_from_level = (int (*)(struct __pyx_obj_2yt_9amr_utils_QuadTree *, struct __pyx_t_2yt_9amr_utils_QuadTreeNode *, int, __pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *))__pyx_f_2yt_9amr_utils_8QuadTree_fill_from_level;
+ #else
+ *(void(**)(void))&__pyx_vtable_2yt_9amr_utils_QuadTree.add_to_position = (void(*)(void))__pyx_f_2yt_9amr_utils_8QuadTree_add_to_position;
+ *(void(**)(void))&__pyx_vtable_2yt_9amr_utils_QuadTree.find_on_root_level = (void(*)(void))__pyx_f_2yt_9amr_utils_8QuadTree_find_on_root_level;
+ *(void(**)(void))&__pyx_vtable_2yt_9amr_utils_QuadTree.count_at_level = (void(*)(void))__pyx_f_2yt_9amr_utils_8QuadTree_count_at_level;
+ *(void(**)(void))&__pyx_vtable_2yt_9amr_utils_QuadTree.fill_from_level = (void(*)(void))__pyx_f_2yt_9amr_utils_8QuadTree_fill_from_level;
+ #endif
+ if (PyType_Ready(&__pyx_type_2yt_9amr_utils_QuadTree) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetVtable(__pyx_type_2yt_9amr_utils_QuadTree.tp_dict, __pyx_vtabptr_2yt_9amr_utils_QuadTree) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "QuadTree", (PyObject *)&__pyx_type_2yt_9amr_utils_QuadTree) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_2yt_9amr_utils_QuadTree = &__pyx_type_2yt_9amr_utils_QuadTree;
/*--- Type import code ---*/
- __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/*--- Function import code ---*/
/*--- Execution code ---*/
@@ -25511,6 +28044,18 @@
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":27
+ *
+ *
+ * import numpy as np # <<<<<<<<<<<<<<
+ * cimport numpy as np
+ * # Double up here for def'd functions
+ */
+ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s__np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
/* "/Users/matthewturk/Development/yt/trunk/yt/amr_utils.pyx":1
* """ # <<<<<<<<<<<<<<
* Container file to hold all our Cython routines. This is to avoid problems with
@@ -25572,6 +28117,7 @@
"amr_utils.pyx",
"png_writer.pyx",
"fortran_reader.pyx",
+ "QuadTree.pyx",
"numpy.pxd",
};
@@ -26769,6 +29315,28 @@
return (png_uint_32)-1;
}
+static CYTHON_INLINE long __Pyx_pow_long(long b, long e) {
+ long t = b;
+ switch (e) {
+ case 3:
+ t *= b;
+ case 2:
+ t *= b;
+ case 1:
+ return t;
+ case 0:
+ return 1;
+ }
+ if (unlikely(e<0)) return 0;
+ t = 1;
+ while (likely(e)) {
+ t *= (b * (e&1)) | ((~e)&1); /* 1 or b */
+ b *= b;
+ e >>= 1;
+ }
+ return t;
+}
+
#if CYTHON_CCOMPLEX
#ifdef __cplusplus
static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
@@ -27300,6 +29868,24 @@
}
}
+static void __Pyx_WriteUnraisable(const char *name) {
+ PyObject *old_exc, *old_val, *old_tb;
+ PyObject *ctx;
+ __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
+ #if PY_MAJOR_VERSION < 3
+ ctx = PyString_FromString(name);
+ #else
+ ctx = PyUnicode_FromString(name);
+ #endif
+ __Pyx_ErrRestore(old_exc, old_val, old_tb);
+ if (!ctx) {
+ PyErr_WriteUnraisable(Py_None);
+ } else {
+ PyErr_WriteUnraisable(ctx);
+ Py_DECREF(ctx);
+ }
+}
+
static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
#if PY_VERSION_HEX < 0x03010000
PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
More information about the yt-svn
mailing list