[yt-svn] commit/yt: ngoldbaum: Merged in MatthewTurk/yt (pull request #1945)

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Fri Jan 22 16:51:30 PST 2016


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/62e350b95311/
Changeset:   62e350b95311
Branch:      yt
User:        ngoldbaum
Date:        2016-01-23 00:51:24+00:00
Summary:     Merged in MatthewTurk/yt (pull request #1945)

Rename Cython routines to be consistent
Affected #:  37 files

diff -r eff6841ae4004a3ecb8040858e57badbd3b00021 -r 62e350b9531193afbbb0a6d97d3b1233ef25b4d2 yt/analysis_modules/halo_finding/fof/EnzoFOF.c
--- a/yt/analysis_modules/halo_finding/fof/EnzoFOF.c
+++ b/yt/analysis_modules/halo_finding/fof/EnzoFOF.c
@@ -48,7 +48,7 @@
 
     xpos    = (PyArrayObject *) PyArray_FromAny(oxpos,
                     PyArray_DescrFromType(NPY_FLOAT64), 1, 1,
-                    NPY_INOUT_ARRAY | NPY_UPDATEIFCOPY, NULL);
+                    NPY_ARRAY_INOUT_ARRAY | NPY_ARRAY_UPDATEIFCOPY, NULL);
     if(!xpos){
     PyErr_Format(_FOFerror,
              "EnzoFOF: xpos didn't work.");
@@ -58,7 +58,7 @@
 
     ypos    = (PyArrayObject *) PyArray_FromAny(oypos,
                     PyArray_DescrFromType(NPY_FLOAT64), 1, 1,
-                    NPY_INOUT_ARRAY | NPY_UPDATEIFCOPY, NULL);
+                    NPY_ARRAY_INOUT_ARRAY | NPY_ARRAY_UPDATEIFCOPY, NULL);
     if((!ypos)||(PyArray_SIZE(ypos) != num_particles)) {
     PyErr_Format(_FOFerror,
              "EnzoFOF: xpos and ypos must be the same length.");
@@ -67,7 +67,7 @@
 
     zpos    = (PyArrayObject *) PyArray_FromAny(ozpos,
                     PyArray_DescrFromType(NPY_FLOAT64), 1, 1,
-                    NPY_INOUT_ARRAY | NPY_UPDATEIFCOPY, NULL);
+                    NPY_ARRAY_INOUT_ARRAY | NPY_ARRAY_UPDATEIFCOPY, NULL);
     if((!zpos)||(PyArray_SIZE(zpos) != num_particles)) {
     PyErr_Format(_FOFerror,
              "EnzoFOF: xpos and zpos must be the same length.");
@@ -140,7 +140,8 @@
 
 	kdFinishFoF(kd);
 
-    PyArray_UpdateFlags(particle_group_id, NPY_OWNDATA | particle_group_id->flags);
+    PyArray_UpdateFlags(particle_group_id,
+        NPY_ARRAY_OWNDATA | PyArray_FLAGS(particle_group_id));
     PyObject *return_value = Py_BuildValue("N", particle_group_id);
 
     Py_DECREF(xpos);

diff -r eff6841ae4004a3ecb8040858e57badbd3b00021 -r 62e350b9531193afbbb0a6d97d3b1233ef25b4d2 yt/analysis_modules/halo_finding/hop/EnzoHop.c
--- a/yt/analysis_modules/halo_finding/hop/EnzoHop.c
+++ b/yt/analysis_modules/halo_finding/hop/EnzoHop.c
@@ -42,7 +42,7 @@
 
     *xpos    = (PyArrayObject *) PyArray_FromAny(oxpos,
                     PyArray_DescrFromType(NPY_FLOAT64), 1, 1,
-                    NPY_INOUT_ARRAY | NPY_UPDATEIFCOPY, NULL);
+                    NPY_ARRAY_INOUT_ARRAY | NPY_ARRAY_UPDATEIFCOPY, NULL);
     if(!*xpos){
     PyErr_Format(_HOPerror,
              "EnzoHop: xpos didn't work.");
@@ -52,7 +52,7 @@
 
     *ypos    = (PyArrayObject *) PyArray_FromAny(oypos,
                     PyArray_DescrFromType(NPY_FLOAT64), 1, 1,
-                    NPY_INOUT_ARRAY | NPY_UPDATEIFCOPY, NULL);
+                    NPY_ARRAY_INOUT_ARRAY | NPY_ARRAY_UPDATEIFCOPY, NULL);
     if((!*ypos)||(PyArray_SIZE(*ypos) != num_particles)) {
     PyErr_Format(_HOPerror,
              "EnzoHop: xpos and ypos must be the same length.");
@@ -61,7 +61,7 @@
 
     *zpos    = (PyArrayObject *) PyArray_FromAny(ozpos,
                     PyArray_DescrFromType(NPY_FLOAT64), 1, 1,
-                    NPY_INOUT_ARRAY | NPY_UPDATEIFCOPY, NULL);
+                    NPY_ARRAY_INOUT_ARRAY | NPY_ARRAY_UPDATEIFCOPY, NULL);
     if((!*zpos)||(PyArray_SIZE(*zpos) != num_particles)) {
     PyErr_Format(_HOPerror,
              "EnzoHop: xpos and zpos must be the same length.");
@@ -70,7 +70,7 @@
 
     *mass    = (PyArrayObject *) PyArray_FromAny(omass,
                     PyArray_DescrFromType(NPY_FLOAT64), 1, 1,
-                    NPY_INOUT_ARRAY | NPY_UPDATEIFCOPY, NULL);
+                    NPY_ARRAY_INOUT_ARRAY | NPY_ARRAY_UPDATEIFCOPY, NULL);
     if((!*mass)||(PyArray_SIZE(*mass) != num_particles)) {
     PyErr_Format(_HOPerror,
              "EnzoHop: xpos and mass must be the same length.");
@@ -129,11 +129,11 @@
                     PyArray_DescrFromType(NPY_FLOAT64));
 
     fprintf(stdout, "Copying arrays for %d particles\n", num_particles);
-    kd->np_masses = (npy_float64*) mass->data;
-    kd->np_pos[0] = (npy_float64*) xpos->data;
-    kd->np_pos[1] = (npy_float64*) ypos->data;
-    kd->np_pos[2] = (npy_float64*) zpos->data;
-    kd->np_densities = (npy_float64*) particle_density->data;
+    kd->np_masses = (npy_float64*) PyArray_DATA(mass);
+    kd->np_pos[0] = (npy_float64*) PyArray_DATA(xpos);
+    kd->np_pos[1] = (npy_float64*) PyArray_DATA(ypos);
+    kd->np_pos[2] = (npy_float64*) PyArray_DATA(zpos);
+    kd->np_densities = (npy_float64*) PyArray_DATA(particle_density);
     kd->totalmass = totalmass;
 	for (i = 0; i < num_particles; i++) kd->p[i].np_index = i;
 
@@ -173,8 +173,8 @@
     free(my_comm.gl);
     free_slice(my_comm.s);
 
-    PyArray_UpdateFlags(particle_density, NPY_OWNDATA | particle_density->flags);
-    PyArray_UpdateFlags(particle_group_id, NPY_OWNDATA | particle_group_id->flags);
+    PyArray_UpdateFlags(particle_density, NPY_ARRAY_OWNDATA | PyArray_FLAGS(particle_density));
+    PyArray_UpdateFlags(particle_group_id, NPY_ARRAY_OWNDATA | PyArray_FLAGS(particle_group_id));
     PyObject *return_value = Py_BuildValue("NN", particle_density, particle_group_id);
 
     Py_DECREF(xpos);
@@ -266,11 +266,11 @@
     totalmass /= normalize_to;
 
 
-    self->kd->np_masses = (npy_float64 *)self->mass->data;
-    self->kd->np_pos[0] = (npy_float64 *)self->xpos->data;
-    self->kd->np_pos[1] = (npy_float64 *)self->ypos->data;
-    self->kd->np_pos[2] = (npy_float64 *)self->zpos->data;
-    self->kd->np_densities = (npy_float64 *)self->densities->data;
+    self->kd->np_masses = (npy_float64 *)PyArray_DATA(self->mass);
+    self->kd->np_pos[0] = (npy_float64 *)PyArray_DATA(self->xpos);
+    self->kd->np_pos[1] = (npy_float64 *)PyArray_DATA(self->ypos);
+    self->kd->np_pos[2] = (npy_float64 *)PyArray_DATA(self->zpos);
+    self->kd->np_densities = (npy_float64 *)PyArray_DATA(self->densities);
     self->kd->totalmass = totalmass;
 
     PrepareKD(self->kd);

diff -r eff6841ae4004a3ecb8040858e57badbd3b00021 -r 62e350b9531193afbbb0a6d97d3b1233ef25b4d2 yt/analysis_modules/level_sets/contour_finder.py
--- a/yt/analysis_modules/level_sets/contour_finder.py
+++ b/yt/analysis_modules/level_sets/contour_finder.py
@@ -18,7 +18,7 @@
 from collections import defaultdict
 
 from yt.funcs import mylog, get_pbar
-from yt.utilities.lib.ContourFinding import \
+from yt.utilities.lib.contour_finding import \
     ContourTree, TileContourTree, link_node_contours, \
     update_joins
 from yt.utilities.lib.grid_traversal import \

diff -r eff6841ae4004a3ecb8040858e57badbd3b00021 -r 62e350b9531193afbbb0a6d97d3b1233ef25b4d2 yt/analysis_modules/particle_trajectories/particle_trajectories.py
--- a/yt/analysis_modules/particle_trajectories/particle_trajectories.py
+++ b/yt/analysis_modules/particle_trajectories/particle_trajectories.py
@@ -13,7 +13,7 @@
 
 from yt.data_objects.data_containers import YTFieldData
 from yt.data_objects.time_series import DatasetSeries
-from yt.utilities.lib.CICDeposit import CICSample_3
+from yt.utilities.lib.particle_mesh_operations import CICSample_3
 from yt.utilities.parallel_tools.parallel_analysis_interface import \
     parallel_root_only
 from yt.funcs import mylog, get_pbar

diff -r eff6841ae4004a3ecb8040858e57badbd3b00021 -r 62e350b9531193afbbb0a6d97d3b1233ef25b4d2 yt/data_objects/construction_data_containers.py
--- a/yt/data_objects/construction_data_containers.py
+++ b/yt/data_objects/construction_data_containers.py
@@ -40,9 +40,9 @@
     YTParticleDepositionNotImplemented, \
     YTNoAPIKey, \
     YTTooManyVertices
-from yt.utilities.lib.QuadTree import \
+from yt.utilities.lib.quad_tree import \
     QuadTree
-from yt.utilities.lib.Interpolators import \
+from yt.utilities.lib.interpolators import \
     ghost_zone_interpolate
 from yt.utilities.lib.misc_utilities import \
     fill_region, fill_region_float

diff -r eff6841ae4004a3ecb8040858e57badbd3b00021 -r 62e350b9531193afbbb0a6d97d3b1233ef25b4d2 yt/data_objects/grid_patch.py
--- a/yt/data_objects/grid_patch.py
+++ b/yt/data_objects/grid_patch.py
@@ -24,7 +24,7 @@
 from yt.utilities.exceptions import \
     YTFieldTypeNotFound, \
     YTParticleDepositionNotImplemented
-from yt.utilities.lib.Interpolators import \
+from yt.utilities.lib.interpolators import \
     ghost_zone_interpolate
 
 class AMRGridPatch(YTSelectionContainer):

diff -r eff6841ae4004a3ecb8040858e57badbd3b00021 -r 62e350b9531193afbbb0a6d97d3b1233ef25b4d2 yt/data_objects/profiles.py
--- a/yt/data_objects/profiles.py
+++ b/yt/data_objects/profiles.py
@@ -32,7 +32,7 @@
     new_bin_profile3d
 from yt.utilities.parallel_tools.parallel_analysis_interface import \
     ParallelAnalysisInterface, parallel_objects
-from yt.utilities.lib.CICDeposit import \
+from yt.utilities.lib.particle_mesh_operations import \
     CICDeposit_2, \
     NGPDeposit_2
 

diff -r eff6841ae4004a3ecb8040858e57badbd3b00021 -r 62e350b9531193afbbb0a6d97d3b1233ef25b4d2 yt/utilities/lib/CICDeposit.pyx
--- a/yt/utilities/lib/CICDeposit.pyx
+++ /dev/null
@@ -1,374 +0,0 @@
-"""
-Simple integrators for the radiative transfer equation
-
-
-
-"""
-
-#-----------------------------------------------------------------------------
-# Copyright (c) 2013, yt Development Team.
-#
-# Distributed under the terms of the Modified BSD License.
-#
-# The full license is in the file COPYING.txt, distributed with this software.
-#-----------------------------------------------------------------------------
-
-cimport numpy as np
-cimport cython
-from fp_utils cimport imax, fmax, imin, fmin, iclip, fclip
-
- at cython.boundscheck(False)
- at cython.wraparound(False)
-def CICDeposit_3(np.ndarray[np.float64_t, ndim=1] posx,
-                 np.ndarray[np.float64_t, ndim=1] posy,
-                 np.ndarray[np.float64_t, ndim=1] posz,
-                 np.ndarray[np.float64_t, ndim=1] mass,
-                 np.int64_t npositions,
-                 np.ndarray[np.float64_t, ndim=3] field,
-                 np.ndarray[np.float64_t, ndim=1] leftEdge,
-                 np.ndarray[np.int32_t, ndim=1] gridDimension,
-                 np.float64_t cellSize):
-
-    cdef int i1, j1, k1, n
-    cdef np.float64_t xpos, ypos, zpos
-    cdef np.float64_t fact, edge0, edge1, edge2
-    cdef np.float64_t le0, le1, le2
-    cdef np.float64_t dx, dy, dz, dx2, dy2, dz2
-
-    edge0 = (<np.float64_t> gridDimension[0]) - 0.5001
-    edge1 = (<np.float64_t> gridDimension[1]) - 0.5001
-    edge2 = (<np.float64_t> gridDimension[2]) - 0.5001
-    fact = 1.0 / cellSize
-
-    le0 = leftEdge[0]
-    le1 = leftEdge[1]
-    le2 = leftEdge[2]
-
-    for n in range(npositions):
-
-        # Compute the position of the central cell
-        xpos = (posx[n] - le0)*fact
-        ypos = (posy[n] - le1)*fact
-        zpos = (posz[n] - le2)*fact
-
-        if (xpos < 0.5001) or (xpos > edge0):
-            continue
-        if (ypos < 0.5001) or (ypos > edge1):
-            continue
-        if (zpos < 0.5001) or (zpos > edge2):
-            continue
-
-        i1  = <int> (xpos + 0.5)
-        j1  = <int> (ypos + 0.5)
-        k1  = <int> (zpos + 0.5)
-
-        # Compute the weights
-        dx = (<np.float64_t> i1) + 0.5 - xpos
-        dy = (<np.float64_t> j1) + 0.5 - ypos
-        dz = (<np.float64_t> k1) + 0.5 - zpos
-        dx2 =  1.0 - dx
-        dy2 =  1.0 - dy
-        dz2 =  1.0 - dz
-
-        # Interpolate from field into sumfield
-        field[i1-1,j1-1,k1-1] += mass[n] * dx  * dy  * dz
-        field[i1  ,j1-1,k1-1] += mass[n] * dx2 * dy  * dz
-        field[i1-1,j1  ,k1-1] += mass[n] * dx  * dy2 * dz
-        field[i1  ,j1  ,k1-1] += mass[n] * dx2 * dy2 * dz
-        field[i1-1,j1-1,k1  ] += mass[n] * dx  * dy  * dz2
-        field[i1  ,j1-1,k1  ] += mass[n] * dx2 * dy  * dz2
-        field[i1-1,j1  ,k1  ] += mass[n] * dx  * dy2 * dz2
-        field[i1  ,j1  ,k1  ] += mass[n] * dx2 * dy2 * dz2
-
- at cython.boundscheck(False)
- at cython.wraparound(False)
-def CICDeposit_2(np.ndarray[np.float64_t, ndim=1] posx,
-                 np.ndarray[np.float64_t, ndim=1] posy,
-                 np.ndarray[np.float64_t, ndim=1] mass,
-                 np.int64_t npositions,
-                 np.ndarray[np.float64_t, ndim=2] field,
-                 np.ndarray[np.float64_t, ndim=1] leftEdge,
-                 np.ndarray[np.int32_t, ndim=1] gridDimension,
-                 np.ndarray[np.float64_t, ndim=1] cellSize):
-
-    cdef int i1, j1, n
-    cdef np.float64_t xpos, ypos
-    cdef np.float64_t edge0, edge1
-    cdef np.float64_t le0, le1
-    cdef np.float64_t dx, dy, dx2, dy2
-
-    edge0 = (<np.float64_t> gridDimension[0]) - 0.5001
-    edge1 = (<np.float64_t> gridDimension[1]) - 0.5001
-
-    le0 = leftEdge[0]
-    le1 = leftEdge[1]
-
-    for n in range(npositions):
-
-        # Compute the position of the central cell
-        xpos = (posx[n] - le0)/cellSize[0]
-        ypos = (posy[n] - le1)/cellSize[1]
-
-        if (xpos < 0.5001) or (xpos > edge0):
-            continue
-        if (ypos < 0.5001) or (ypos > edge1):
-            continue
-
-        i1  = <int> (xpos + 0.5)
-        j1  = <int> (ypos + 0.5)
-
-        # Compute the weights
-        dx = (<np.float64_t> i1) + 0.5 - xpos
-        dy = (<np.float64_t> j1) + 0.5 - ypos
-        dx2 =  1.0 - dx
-        dy2 =  1.0 - dy
-
-        # Deposit onto field
-        field[i1-1,j1-1] += mass[n] * dx  * dy
-        field[i1  ,j1-1] += mass[n] * dx2 * dy
-        field[i1-1,j1  ] += mass[n] * dx  * dy2
-        field[i1  ,j1  ] += mass[n] * dx2 * dy2
-
- at cython.boundscheck(False)
- at cython.wraparound(False)
-def NGPDeposit_2(np.ndarray[np.float64_t, ndim=1] posx,
-                 np.ndarray[np.float64_t, ndim=1] posy,
-                 np.ndarray[np.float64_t, ndim=1] mass,
-                 np.int64_t npositions,
-                 np.ndarray[np.float64_t, ndim=2] field,
-                 np.ndarray[np.float64_t, ndim=1] leftEdge,
-                 np.ndarray[np.int32_t, ndim=1] gridDimension,
-                 np.ndarray[np.float64_t, ndim=1] cellSize):
-
-    cdef int i1, j1, n
-    cdef np.float64_t xpos, ypos
-    cdef np.float64_t edge0, edge1
-    cdef np.float64_t le0, le1
-
-    edge0 = (<np.float64_t> gridDimension[0]) - 0.5001
-    edge1 = (<np.float64_t> gridDimension[1]) - 0.5001
-
-    le0 = leftEdge[0]
-    le1 = leftEdge[1]
-
-    for n in range(npositions):
-
-        # Compute the position of the central cell
-        xpos = (posx[n] - le0)/cellSize[0]
-        ypos = (posy[n] - le1)/cellSize[1]
-
-        if (xpos < 0.5001) or (xpos > edge0):
-            continue
-        if (ypos < 0.5001) or (ypos > edge1):
-            continue
-
-        i1  = <int> (xpos + 0.5)
-        j1  = <int> (ypos + 0.5)
-
-        # Deposit onto field
-        field[i1,j1] += mass[n]
-
- at cython.boundscheck(False)
- at cython.wraparound(False)
- at cython.cdivision(True)
-def sample_field_at_positions(np.ndarray[np.float64_t, ndim=3] arr,
-                              np.ndarray[np.float64_t, ndim=1] left_edge,
-                              np.ndarray[np.float64_t, ndim=1] right_edge,
-                              np.ndarray[np.float64_t, ndim=1] pos_x,
-                              np.ndarray[np.float64_t, ndim=1] pos_y,
-                              np.ndarray[np.float64_t, ndim=1] pos_z):
-    cdef np.float64_t idds[3]
-    cdef np.float64_t pp[3]
-    cdef int dims[3]
-    cdef int ind[3]
-    cdef int i, j, npart
-    npart = pos_x.shape[0]
-    cdef np.ndarray[np.float64_t, ndim=1] sample
-    sample = np.zeros(npart, dtype='float64')
-    for i in range(3):
-        dims[i] = arr.shape[i]
-        idds[i] = (<np.float64_t> dims[i]) / (right_edge[i] - left_edge[i])
-    for i in range(npart):
-        if not ((left_edge[0] <= pos_x[i] <= right_edge[0]) and
-                (left_edge[1] <= pos_y[i] <= right_edge[1]) and
-                (left_edge[2] <= pos_z[i] <= right_edge[2])):
-            continue
-        ind[0] = <int> ((pos_x[i] - left_edge[0]) * idds[0])
-        ind[1] = <int> ((pos_y[i] - left_edge[1]) * idds[1])
-        ind[2] = <int> ((pos_z[i] - left_edge[2]) * idds[2])
-        sample[i] = arr[ind[0], ind[1], ind[2]]
-    return sample
-
- at cython.boundscheck(False)
- at cython.wraparound(False)
- at cython.cdivision(True)
-def CICSample_3(np.ndarray[np.float64_t, ndim=1] posx,
-                np.ndarray[np.float64_t, ndim=1] posy,
-                np.ndarray[np.float64_t, ndim=1] posz,
-                np.ndarray[np.float64_t, ndim=1] sample,
-                np.int64_t npositions,
-                np.ndarray[np.float64_t, ndim=3] field,
-                np.ndarray[np.float64_t, ndim=1] leftEdge,
-                np.ndarray[np.int32_t, ndim=1] gridDimension,
-                np.float64_t cellSize):
-
-    cdef int i1, j1, k1, n
-    cdef np.float64_t xpos, ypos, zpos
-    cdef np.float64_t fact, edge0, edge1, edge2
-    cdef np.float64_t le0, le1, le2
-    cdef np.float64_t dx, dy, dz, dx2, dy2, dz2
-
-    edge0 = (<np.float64_t> gridDimension[0]) - 0.5001
-    edge1 = (<np.float64_t> gridDimension[1]) - 0.5001
-    edge2 = (<np.float64_t> gridDimension[2]) - 0.5001
-    fact = 1.0 / cellSize
-
-    le0 = leftEdge[0]
-    le1 = leftEdge[1]
-    le2 = leftEdge[2]
-
-    for n in range(npositions):
-
-        # Compute the position of the central cell
-
-        xpos = (posx[n]-le0)*fact
-        ypos = (posy[n]-le1)*fact
-        zpos = (posz[n]-le2)*fact
-
-        if (xpos < -1 or ypos < -1 or zpos < -1 or
-            xpos >= edge0+1.5001 or ypos >= edge1+1.5001 or zpos >= edge2+1.5001):
-            continue
-
-        xpos = fclip(xpos, 0.5001, edge0)
-        ypos = fclip(ypos, 0.5001, edge1)
-        zpos = fclip(zpos, 0.5001, edge2)
-
-        i1  = <int> (xpos + 0.5)
-        j1  = <int> (ypos + 0.5)
-        k1  = <int> (zpos + 0.5)
-
-        # Compute the weights
-        dx = (<float> i1) + 0.5 - xpos
-        dy = (<float> j1) + 0.5 - ypos
-        dz = (<float> k1) + 0.5 - zpos
-        dx2 =  1.0 - dx
-        dy2 =  1.0 - dy
-        dz2 =  1.0 - dz
-
-        # Interpolate from field onto the particle
-        sample[n] = (field[i1-1,j1-1,k1-1] * dx  * dy  * dz +
-                     field[i1  ,j1-1,k1-1] * dx2 * dy  * dz +
-                     field[i1-1,j1  ,k1-1] * dx  * dy2 * dz +
-                     field[i1  ,j1  ,k1-1] * dx2 * dy2 * dz +
-                     field[i1-1,j1-1,k1  ] * dx  * dy  * dz2 +
-                     field[i1  ,j1-1,k1  ] * dx2 * dy  * dz2 +
-                     field[i1-1,j1  ,k1  ] * dx  * dy2 * dz2 +
-                     field[i1  ,j1  ,k1  ] * dx2 * dy2 * dz2)
-
- at cython.boundscheck(False)
- at cython.wraparound(False)
- at cython.cdivision(True)
-def assign_particles_to_cells(np.ndarray[np.int32_t, ndim=1] levels, #for cells
-                              np.ndarray[np.float32_t, ndim=2] left_edges, #many cells
-                              np.ndarray[np.float32_t, ndim=2] right_edges,
-                              np.ndarray[np.float32_t, ndim=1] pos_x, #particle
-                              np.ndarray[np.float32_t, ndim=1] pos_y,
-                              np.ndarray[np.float32_t, ndim=1] pos_z):
-    #for every cell, assign the particles belonging to it,
-    #skipping previously assigned particles
-    cdef long level_max = np.max(levels)
-    cdef long i,j,level
-    cdef long npart = pos_x.shape[0]
-    cdef long ncells = left_edges.shape[0]
-    cdef np.ndarray[np.int32_t, ndim=1] assign = np.zeros(npart,dtype='int32')-1
-    for level in range(level_max,0,-1):
-        #start with the finest level
-        for i in range(ncells):
-            #go through every cell on the finest level first
-            if not levels[i] == level: continue
-            for j in range(npart):
-                #iterate over all particles, skip if assigned
-                if assign[j]>-1: continue
-                if (left_edges[i,0] <= pos_x[j] <= right_edges[i,0]):
-                    if (left_edges[i,1] <= pos_y[j] <= right_edges[i,1]):
-                        if (left_edges[i,2] <= pos_z[j] <= right_edges[i,2]):
-                            assign[j]=i
-    return assign
-
-
-
- at cython.boundscheck(False)
- at cython.wraparound(False)
- at cython.cdivision(True)
-def assign_particles_to_cell_lists(np.ndarray[np.int32_t, ndim=1] levels, #for cells
-                              np.ndarray[np.int32_t,ndim=1] assign,
-                              np.int64_t level_max,
-                              np.ndarray[np.float32_t, ndim=2] left_edges, #many cells
-                              np.ndarray[np.float32_t, ndim=2] right_edges,
-                              np.ndarray[np.float32_t, ndim=1] pos_x, #particle
-                              np.ndarray[np.float32_t, ndim=1] pos_y,
-                              np.ndarray[np.float32_t, ndim=1] pos_z):
-    #for every cell, assign the particles belonging to it,
-    #skipping previously assigned particles
-    #Todo: instead of iterating every particles, could use kdtree
-    cdef long i,j,level
-    cdef long npart = pos_x.shape[0]
-    cdef long ncells = left_edges.shape[0]
-    #cdef np.ndarray[np.int32_t, ndim=1] assign
-    #assign = np.zeros(npart,dtype='int32')-1
-    index_lists = []
-    for level in range(level_max,-1,-1):
-        #start with the finest level
-        for i in range(ncells):
-            #go through every cell on the finest level first
-            if not levels[i] == level: continue
-            index_list = []
-            for j in range(npart):
-                #iterate over all particles, skip if assigned
-                if assign[j]>-1: continue
-                if (left_edges[i,0] <= pos_x[j] <= right_edges[i,0]):
-                    if (left_edges[i,1] <= pos_y[j] <= right_edges[i,1]):
-                        if (left_edges[i,2] <= pos_z[j] <= right_edges[i,2]):
-                            assign[j]=i
-                            index_list += j,
-            index_lists += index_list,
-    return assign,index_lists
-
-
- at cython.boundscheck(False)
- at cython.wraparound(False)
- at cython.cdivision(True)
-def recursive_particle_assignment(grids, grid,
-                                  np.ndarray[np.float32_t, ndim=2] left_edges, #many cells
-                                  np.ndarray[np.float32_t, ndim=2] right_edges,
-                                  np.ndarray[np.float32_t, ndim=1] pos_x, #particle
-                                  np.ndarray[np.float32_t, ndim=1] pos_y,
-                                  np.ndarray[np.float32_t, ndim=1] pos_z):
-    #start on level zero, grid particles onto every mesh
-    #every particle we are fed, we can assume it exists on our grid
-    #must fill in the grid_particle_count array
-    #and particle_indices for every grid
-    cdef long i,j,level
-    cdef long npart = pos_x.shape[0]
-    cdef long ncells = left_edges.shape[0]
-    cdef np.ndarray[np.int32_t, ndim=1] assigned       = np.zeros(npart,dtype='int32')
-    cdef np.ndarray[np.int32_t, ndim=1] never_assigned = np.ones(npart,dtype='int32')
-    for i in np.unique(grid.child_index_mask):
-        if i== -1: continue
-        #assigned to this subgrid
-        assigned = np.zeros(npart,dtype='int32')
-        for j in range(npart):
-            if (left_edges[i,0] <= pos_x[j] <= right_edges[i,0]):
-                if (left_edges[i,1] <= pos_y[j] <= right_edges[i,1]):
-                    if (left_edges[i,2] <= pos_z[j] <= right_edges[i,2]):
-                       assigned[j]=1
-                       never_assigned[j]=0
-        if np.sum(assigned)>0:
-            recursive_particle_assignment(grids,grid,left_edges,right_edges,
-                                           pos_x[assigned],pos_y[assigned],pos_z[assigned])
-    #now we have assigned particles to other subgrids, we are left with particles on our grid
-
-
-
-
-

diff -r eff6841ae4004a3ecb8040858e57badbd3b00021 -r 62e350b9531193afbbb0a6d97d3b1233ef25b4d2 yt/utilities/lib/ContourFinding.pxd
--- a/yt/utilities/lib/ContourFinding.pxd
+++ /dev/null
@@ -1,61 +0,0 @@
-"""
-Contour finding exports
-
-
-
-"""
-
-#-----------------------------------------------------------------------------
-# Copyright (c) 2013, yt Development Team.
-#
-# Distributed under the terms of the Modified BSD License.
-#
-# The full license is in the file COPYING.txt, distributed with this software.
-#-----------------------------------------------------------------------------
-
-
-cimport numpy as np
-cimport cython
-
-cdef inline np.int64_t i64max(np.int64_t i0, np.int64_t i1):
-    if i0 > i1: return i0
-    return i1
-
-cdef inline np.int64_t i64min(np.int64_t i0, np.int64_t i1):
-    if i0 < i1: return i0
-    return i1
-
-cdef extern from "math.h":
-    double fabs(double x)
-
-cdef extern from "stdlib.h":
-    # NOTE that size_t might not be int
-    void *alloca(int)
-
-cdef struct ContourID
-
-cdef struct ContourID:
-    np.int64_t contour_id
-    ContourID *parent
-    ContourID *next
-    ContourID *prev
-    np.int64_t count
-
-cdef struct CandidateContour
-
-cdef struct CandidateContour:
-    np.int64_t contour_id
-    np.int64_t join_id
-    CandidateContour *next
-
-cdef ContourID *contour_create(np.int64_t contour_id,
-                               ContourID *prev = ?)
-cdef void contour_delete(ContourID *node)
-cdef ContourID *contour_find(ContourID *node)
-cdef void contour_union(ContourID *node1, ContourID *node2)
-cdef int candidate_contains(CandidateContour *first,
-                            np.int64_t contour_id,
-                            np.int64_t join_id = ?)
-cdef CandidateContour *candidate_add(CandidateContour *first,
-                                     np.int64_t contour_id,
-                                     np.int64_t join_id = ?)

diff -r eff6841ae4004a3ecb8040858e57badbd3b00021 -r 62e350b9531193afbbb0a6d97d3b1233ef25b4d2 yt/utilities/lib/ContourFinding.pyx
--- a/yt/utilities/lib/ContourFinding.pyx
+++ /dev/null
@@ -1,729 +0,0 @@
-"""
-A two-pass contour finding algorithm
-
-
-
-"""
-
-#-----------------------------------------------------------------------------
-# Copyright (c) 2013, yt Development Team.
-#
-# Distributed under the terms of the Modified BSD License.
-#
-# The full license is in the file COPYING.txt, distributed with this software.
-#-----------------------------------------------------------------------------
-
-import numpy as np
-cimport numpy as np
-cimport cython
-from libc.stdlib cimport malloc, free, realloc
-from yt.geometry.selection_routines cimport \
-    SelectorObject, AlwaysSelector, OctreeSubsetSelector, \
-    anyfloat
-from yt.utilities.lib.fp_utils cimport imax
-from yt.geometry.oct_container cimport \
-    OctreeContainer, OctInfo
-from yt.geometry.oct_visitors cimport \
-    Oct
-from .amr_kdtools cimport _find_node, Node
-from .grid_traversal cimport VolumeContainer, PartitionedGrid, \
-    vc_index, vc_pos_index
-import sys
-
-cdef inline ContourID *contour_create(np.int64_t contour_id,
-                               ContourID *prev = NULL):
-    node = <ContourID *> malloc(sizeof(ContourID))
-    #print "Creating contour with id", contour_id
-    node.contour_id = contour_id
-    node.next = node.parent = NULL
-    node.prev = prev
-    node.count = 1
-    if prev != NULL: prev.next = node
-    return node
-
-cdef inline void contour_delete(ContourID *node):
-    if node.prev != NULL: node.prev.next = node.next
-    if node.next != NULL: node.next.prev = node.prev
-    free(node)
-
-cdef inline ContourID *contour_find(ContourID *node):
-    cdef ContourID *temp
-    cdef ContourID *root
-    root = node
-    # First we find the root
-    while root.parent != NULL and root.parent != root:
-        root = root.parent
-    if root == root.parent: root.parent = NULL
-    # Now, we update everything along the tree.
-    # So now everything along the line to the root has the parent set to the
-    # root.
-    while node.parent != NULL:
-        temp = node.parent
-        root.count += node.count
-        node.count = 0
-        node.parent = root
-        node = temp
-    return root
-
-cdef inline void contour_union(ContourID *node1, ContourID *node2):
-    if node1 == node2:
-        return
-    node1 = contour_find(node1)
-    node2 = contour_find(node2)
-    if node1 == node2:
-        return
-    cdef ContourID *pri
-    cdef ContourID *sec
-    if node1.count > node2.count:
-        pri = node1
-        sec = node2
-    elif node2.count > node1.count:
-        pri = node2
-        sec = node1
-    # might be a tie
-    elif node1.contour_id < node2.contour_id:
-        pri = node1
-        sec = node2
-    else:
-        pri = node2
-        sec = node1
-    pri.count += sec.count
-    sec.count = 0
-    sec.parent = pri
-
-cdef inline int candidate_contains(CandidateContour *first,
-                            np.int64_t contour_id,
-                            np.int64_t join_id = -1):
-    while first != NULL:
-        if first.contour_id == contour_id \
-            and first.join_id == join_id: return 1
-        first = first.next
-    return 0
-
-cdef inline CandidateContour *candidate_add(CandidateContour *first,
-                                     np.int64_t contour_id,
-                                     np.int64_t join_id = -1):
-    cdef CandidateContour *node
-    node = <CandidateContour *> malloc(sizeof(CandidateContour))
-    node.contour_id = contour_id
-    node.join_id = join_id
-    node.next = first
-    return node
-
-cdef class ContourTree:
-    # This class is essentially a Union-Find algorithm.  What we want to do is
-    # to, given a connection between two objects, identify the unique ID for
-    # those two objects.  So what we have is a collection of contours, and they
-    # eventually all get joined and contain lots of individual IDs.  But it's
-    # easy to find the *first* contour, i.e., the primary ID, for each of the
-    # subsequent IDs.
-    #
-    # This means that we can connect id 202483 to id 2472, and if id 2472 is
-    # connected to id 143, the connection will *actually* be from 202483 to
-    # 143.  In this way we can speed up joining things and knowing their
-    # "canonical" id.
-    #
-    # This is a multi-step process, since we first want to connect all of the
-    # contours, then we end up wanting to coalesce them, and ultimately we join
-    # them at the end.  The join produces a table that maps the initial to the
-    # final, and we can go through and just update all of those.
-    cdef ContourID *first
-    cdef ContourID *last
-
-    def clear(self):
-        # Here, we wipe out ALL of our contours, but not the pointers to them
-        cdef ContourID *cur
-        cdef ContourID *next
-        cur = self.first
-        while cur != NULL:
-            next = cur.next
-            free(cur)
-            cur = next
-        self.first = self.last = NULL
-
-    def __init__(self):
-        self.first = self.last = NULL
-
-    @cython.boundscheck(False)
-    @cython.wraparound(False)
-    def add_contours(self, np.ndarray[np.int64_t, ndim=1] contour_ids):
-        # This adds new contours, from the given contour IDs, to the tree.
-        # Each one can be connected to a parent, as well as to next/prev in the
-        # set of contours belonging to this tree.
-        cdef int i, n
-        n = contour_ids.shape[0]
-        cdef ContourID *cur = self.last
-        for i in range(n):
-            #print i, contour_ids[i]
-            cur = contour_create(contour_ids[i], cur)
-            if self.first == NULL: self.first = cur
-        self.last = cur
-
-    def add_contour(self, np.int64_t contour_id):
-        self.last = contour_create(contour_id, self.last)
-
-    def cull_candidates(self, np.ndarray[np.int64_t, ndim=3] candidates):
-        # This function looks at each preliminary contour ID belonging to a
-        # given collection of values, and then if need be it creates a new
-        # contour for it.
-        cdef int i, j, k, ni, nj, nk, nc
-        cdef CandidateContour *first = NULL
-        cdef CandidateContour *temp
-        cdef np.int64_t cid
-        nc = 0
-        ni = candidates.shape[0]
-        nj = candidates.shape[1]
-        nk = candidates.shape[2]
-        for i in range(ni):
-            for j in range(nj):
-                for k in range(nk):
-                    cid = candidates[i,j,k]
-                    if cid == -1: continue
-                    if candidate_contains(first, cid) == 0:
-                        nc += 1
-                        first = candidate_add(first, cid)
-        cdef np.ndarray[np.int64_t, ndim=1] contours
-        contours = np.empty(nc, dtype="int64")
-        i = 0
-        # This removes all the temporary contours for this set of contours and
-        # instead constructs a final list of them.
-        while first != NULL:
-            contours[i] = first.contour_id
-            i += 1
-            temp = first.next
-            free(first)
-            first = temp
-        return contours
-
-    def cull_joins(self, np.ndarray[np.int64_t, ndim=2] cjoins):
-        # This coalesces contour IDs, so that we have only the final name
-        # resolutions -- the .join_id from a candidate.  So many items will map
-        # to a single join_id.
-        cdef int i, j, k, ni, nj, nk, nc
-        cdef CandidateContour *first = NULL
-        cdef CandidateContour *temp
-        cdef np.int64_t cid1, cid2
-        nc = 0
-        ni = cjoins.shape[0]
-        for i in range(ni):
-            cid1 = cjoins[i,0]
-            cid2 = cjoins[i,1]
-            if cid1 == -1: continue
-            if cid2 == -1: continue
-            if candidate_contains(first, cid1, cid2) == 0:
-                nc += 1
-                first = candidate_add(first, cid1, cid2)
-        cdef np.ndarray[np.int64_t, ndim=2] contours
-        contours = np.empty((nc,2), dtype="int64")
-        i = 0
-        while first != NULL:
-            contours[i,0] = first.contour_id
-            contours[i,1] = first.join_id
-            i += 1
-            temp = first.next
-            free(first)
-            first = temp
-        return contours
-
-    @cython.boundscheck(False)
-    @cython.wraparound(False)
-    def add_joins(self, np.ndarray[np.int64_t, ndim=2] join_tree):
-        cdef int i, n, ins
-        cdef np.int64_t cid1, cid2
-        # Okay, this requires lots of iteration, unfortunately
-        cdef ContourID *cur
-        cdef ContourID *c1
-        cdef ContourID *c2
-        n = join_tree.shape[0]
-        #print "Counting"
-        #print "Checking", self.count()
-        for i in range(n):
-            ins = 0
-            cid1 = join_tree[i, 0]
-            cid2 = join_tree[i, 1]
-            c1 = c2 = NULL
-            cur = self.first
-            #print "Looking for ", cid1, cid2
-            while c1 == NULL or c2 == NULL:
-                if cur.contour_id == cid1:
-                    c1 = contour_find(cur)
-                if cur.contour_id == cid2:
-                    c2 = contour_find(cur)
-                ins += 1
-                cur = cur.next
-                if cur == NULL: break
-            if c1 == NULL or c2 == NULL:
-                if c1 == NULL: print "  Couldn't find ", cid1
-                if c2 == NULL: print "  Couldn't find ", cid2
-                print "  Inspected ", ins
-                raise RuntimeError
-            else:
-                c1.count = c2.count = 0
-                contour_union(c1, c2)
-
-    def count(self):
-        cdef int n = 0
-        cdef ContourID *cur = self.first
-        while cur != NULL:
-            cur = cur.next
-            n += 1
-        return n
-
-    @cython.boundscheck(False)
-    @cython.wraparound(False)
-    def export(self):
-        cdef int n = self.count()
-        cdef ContourID *cur
-        cdef ContourID *root
-        cur = self.first
-        cdef np.ndarray[np.int64_t, ndim=2] joins
-        joins = np.empty((n, 2), dtype="int64")
-        n = 0
-        while cur != NULL:
-            root = contour_find(cur)
-            joins[n, 0] = cur.contour_id
-            joins[n, 1] = root.contour_id
-            cur = cur.next
-            n += 1
-        return joins
-
-    def __dealloc__(self):
-        self.clear()
-
-cdef class TileContourTree:
-    cdef np.float64_t min_val
-    cdef np.float64_t max_val
-
-    def __init__(self, np.float64_t min_val, np.float64_t max_val):
-        self.min_val = min_val
-        self.max_val = max_val
-
-    @cython.boundscheck(False)
-    @cython.wraparound(False)
-    def identify_contours(self, np.ndarray[np.float64_t, ndim=3] values,
-                                np.ndarray[np.int64_t, ndim=3] contour_ids,
-                                np.ndarray[np.uint8_t, ndim=3] mask,
-                                np.int64_t start):
-        # This just looks at neighbor values and tries to identify which zones
-        # are touching by face within a given brick.
-        cdef int i, j, k, ni, nj, nk, offset
-        cdef int off_i, off_j, off_k, oi, ok, oj
-        cdef ContourID *cur = NULL
-        cdef ContourID *c1
-        cdef ContourID *c2
-        cdef np.float64_t v
-        cdef np.int64_t nc
-        ni = values.shape[0]
-        nj = values.shape[1]
-        nk = values.shape[2]
-        nc = 0
-        cdef ContourID **container = <ContourID**> malloc(
-                sizeof(ContourID*)*ni*nj*nk)
-        for i in range(ni*nj*nk): container[i] = NULL
-        for i in range(ni):
-            for j in range(nj):
-                for k in range(nk):
-                    v = values[i,j,k]
-                    if mask[i,j,k] == 0: continue
-                    if v < self.min_val or v > self.max_val: continue
-                    nc += 1
-                    c1 = contour_create(nc + start)
-                    cur = container[i*nj*nk + j*nk + k] = c1
-                    for oi in range(3):
-                        off_i = oi - 1 + i
-                        if not (0 <= off_i < ni): continue
-                        for oj in range(3):
-                            off_j = oj - 1 + j
-                            if not (0 <= off_j < nj): continue
-                            for ok in range(3):
-                                if oi == oj == ok == 1: continue
-                                off_k = ok - 1 + k
-                                if not (0 <= off_k < nk): continue
-                                if off_k > k and off_j > j and off_i > i:
-                                    continue
-                                offset = off_i*nj*nk + off_j*nk + off_k
-                                c2 = container[offset]
-                                if c2 == NULL: continue
-                                c2 = contour_find(c2)
-                                cur.count = c2.count = 0
-                                contour_union(cur, c2)
-                                cur = contour_find(cur)
-        for i in range(ni):
-            for j in range(nj):
-                for k in range(nk):
-                    c1 = container[i*nj*nk + j*nk + k]
-                    if c1 == NULL: continue
-                    c1 = contour_find(c1)
-                    contour_ids[i,j,k] = c1.contour_id
-
-        for i in range(ni*nj*nk):
-            if container[i] != NULL: free(container[i])
-        free(container)
-        return nc
-
- at cython.boundscheck(False)
- at cython.wraparound(False)
-def link_node_contours(Node trunk, contours, ContourTree tree,
-        np.ndarray[np.int64_t, ndim=1] node_ids):
-    cdef int n_nodes = node_ids.shape[0]
-    cdef np.int64_t node_ind
-    cdef VolumeContainer **vcs = <VolumeContainer **> malloc(
-        sizeof(VolumeContainer*) * n_nodes)
-    cdef int i
-    cdef PartitionedGrid pg
-    for i in range(n_nodes):
-        pg = contours[node_ids[i]][2]
-        vcs[i] = pg.container
-    cdef np.ndarray[np.uint8_t] examined = np.zeros(n_nodes, "uint8")
-    for nid, cinfo in sorted(contours.items(), key = lambda a: -a[1][0]):
-        level, node_ind, pg, sl = cinfo
-        construct_boundary_relationships(trunk, tree, node_ind,
-            examined, vcs, node_ids)
-        examined[node_ind] = 1
-
-cdef inline void get_spos(VolumeContainer *vc, int i, int j, int k,
-                          int axis, np.float64_t *spos):
-    spos[0] = vc.left_edge[0] + i * vc.dds[0]
-    spos[1] = vc.left_edge[1] + j * vc.dds[1]
-    spos[2] = vc.left_edge[2] + k * vc.dds[2]
-    spos[axis] += 0.5 * vc.dds[axis]
-
-cdef inline int spos_contained(VolumeContainer *vc, np.float64_t *spos):
-    cdef int i
-    for i in range(3):
-        if spos[i] <= vc.left_edge[i] or spos[i] >= vc.right_edge[i]: return 0
-    return 1
-
- at cython.cdivision(True)
- at cython.boundscheck(False)
- at cython.wraparound(False)
-cdef void construct_boundary_relationships(Node trunk, ContourTree tree,
-                np.int64_t nid, np.ndarray[np.uint8_t, ndim=1] examined,
-                VolumeContainer **vcs,
-                np.ndarray[np.int64_t, ndim=1] node_ids):
-    # We only look at the boundary and find the nodes next to it.
-    # Contours is a dict, keyed by the node.id.
-    cdef int i, j, off_i, off_j, oi, oj, level, ax, ax0, ax1, n1, n2
-    cdef np.int64_t c1, c2
-    cdef Node adj_node
-    cdef VolumeContainer *vc1
-    cdef VolumeContainer *vc0 = vcs[nid]
-    cdef int s = (vc0.dims[1]*vc0.dims[0]
-                + vc0.dims[0]*vc0.dims[2]
-                + vc0.dims[1]*vc0.dims[2]) * 18
-    # We allocate an array of fixed (maximum) size
-    cdef np.ndarray[np.int64_t, ndim=2] joins = np.zeros((s, 2), dtype="int64")
-    cdef int ti = 0, side, m1, m2, index
-    cdef int pos[3]
-    cdef int my_pos[3]
-    cdef np.float64_t spos[3]
-
-    for ax in range(3):
-        ax0 = (ax + 1) % 3
-        ax1 = (ax + 2) % 3
-        n1 = vc0.dims[ax0]
-        n2 = vc0.dims[ax1]
-        for i in range(n1):
-            for j in range(n2):
-                for off_i in range(3):
-                    oi = off_i - 1
-                    if i == 0 and oi == -1: continue
-                    if i == n1 - 1 and oi == 1: continue
-                    for off_j in range(3):
-                        oj = off_j - 1
-                        if j == 0 and oj == -1: continue
-                        if j == n2 - 1 and oj == 1: continue
-                        pos[ax0] = i + oi
-                        pos[ax1] = j + oj
-                        my_pos[ax0] = i
-                        my_pos[ax1] = j
-                        for side in range(2):
-                            # We go off each end of the block.
-                            if side == 0:
-                                pos[ax] = -1
-                                my_pos[ax] = 0
-                            else:
-                                pos[ax] = vc0.dims[ax]
-                                my_pos[ax] = vc0.dims[ax]-1
-                            get_spos(vc0, pos[0], pos[1], pos[2], ax, spos)
-                            adj_node = _find_node(trunk, spos)
-                            vc1 = vcs[adj_node.node_ind]
-                            if spos_contained(vc1, spos):
-                                index = vc_index(vc0, my_pos[0],
-                                                 my_pos[1], my_pos[2])
-                                m1 = vc0.mask[index]
-                                c1 = (<np.int64_t*>vc0.data[0])[index]
-                                index = vc_pos_index(vc1, spos)
-                                m2 = vc1.mask[index]
-                                c2 = (<np.int64_t*>vc1.data[0])[index]
-                                if m1 == 1 and m2 == 1 and c1 > -1 and c2 > -1:
-                                    if examined[adj_node.node_ind] == 0:
-                                        joins[ti,0] = i64max(c1,c2)
-                                        joins[ti,1] = i64min(c1,c2)
-                                    else:
-                                        joins[ti,0] = c1
-                                        joins[ti,1] = c2
-                                    ti += 1
-
-    if ti == 0: return
-    new_joins = tree.cull_joins(joins[:ti,:])
-    tree.add_joins(new_joins)
-
- at cython.boundscheck(False)
- at cython.wraparound(False)
-def update_joins(np.ndarray[np.int64_t, ndim=2] joins,
-                 np.ndarray[np.int64_t, ndim=3] contour_ids,
-                 np.ndarray[np.int64_t, ndim=1] final_joins):
-    cdef np.int64_t new, old
-    cdef int i, j, nj, nf
-    cdef int ci, cj, ck
-    nj = joins.shape[0]
-    nf = final_joins.shape[0]
-    for ci in range(contour_ids.shape[0]):
-        for cj in range(contour_ids.shape[1]):
-            for ck in range(contour_ids.shape[2]):
-                if contour_ids[ci,cj,ck] == -1: continue
-                for j in range(nj):
-                    if contour_ids[ci,cj,ck] == joins[j,0]:
-                        contour_ids[ci,cj,ck] = joins[j,1]
-                        break
-                for j in range(nf):
-                    if contour_ids[ci,cj,ck] == final_joins[j]:
-                        contour_ids[ci,cj,ck] = j + 1
-                        break
-
-cdef class FOFNode:
-    cdef np.int64_t tag, count
-    def __init__(self, np.int64_t tag):
-        self.tag = tag
-        self.count = 0
-
-cdef class ParticleContourTree(ContourTree):
-    cdef np.float64_t linking_length, linking_length2
-    cdef np.float64_t DW[3]
-    cdef np.float64_t DLE[3]
-    cdef np.float64_t DRE[3]
-    cdef bint periodicity[3]
-    cdef int minimum_count
-
-    def __init__(self, linking_length, periodicity = (True, True, True),
-                 int minimum_count = 8):
-        cdef int i
-        self.linking_length = linking_length
-        self.linking_length2 = linking_length * linking_length
-        self.first = self.last = NULL
-        for i in range(3):
-            self.periodicity[i] = periodicity[i]
-        self.minimum_count = minimum_count
-
-    @cython.cdivision(True)
-    @cython.boundscheck(False)
-    @cython.wraparound(False)
-    def identify_contours(self, OctreeContainer octree,
-                                np.ndarray[np.int64_t, ndim=1] dom_ind,
-                                np.ndarray[anyfloat, ndim=2] positions,
-                                np.ndarray[np.int64_t, ndim=1] particle_ids,
-                                int domain_id, int domain_offset):
-        cdef np.ndarray[np.int64_t, ndim=1] pdoms, pcount, pind, doff
-        cdef np.float64_t pos[3]
-        cdef Oct *oct = NULL
-        cdef Oct **neighbors = NULL
-        cdef OctInfo oi
-        cdef ContourID *c0
-        cdef ContourID *c1
-        cdef np.int64_t moff = octree.get_domain_offset(domain_id + domain_offset)
-        cdef np.int64_t i, j, k, n, nneighbors, pind0, offset
-        cdef int counter = 0
-        cdef int verbose = 0
-        pcount = np.zeros_like(dom_ind)
-        doff = np.zeros_like(dom_ind) - 1
-        # First, we find the oct for each particle.
-        pdoms = np.zeros(positions.shape[0], dtype="int64")
-        pdoms -= -1
-        cdef np.int64_t *pdom = <np.int64_t*> pdoms.data
-        # First we allocate our container
-        cdef ContourID **container = <ContourID**> malloc(
-            sizeof(ContourID*) * positions.shape[0])
-        for i in range(3):
-            self.DW[i] = (octree.DRE[i] - octree.DLE[i])
-            self.DLE[i] = octree.DLE[i]
-            self.DRE[i] = octree.DRE[i]
-        for i in range(positions.shape[0]):
-            counter += 1
-            container[i] = NULL
-            for j in range(3):
-                pos[j] = positions[i, j]
-            oct = octree.get(pos, NULL)
-            if oct == NULL or (domain_id > 0 and oct.domain != domain_id):
-                continue
-            offset = oct.domain_ind - moff
-            pcount[offset] += 1
-            pdoms[i] = offset
-        pind = np.argsort(pdoms)
-        cdef np.int64_t *ipind = <np.int64_t*> pind.data
-        cdef anyfloat *fpos = <anyfloat*> positions.data
-        # pind is now the pointer into the position and particle_ids array.
-        for i in range(positions.shape[0]):
-            offset = pdoms[pind[i]]
-            if doff[offset] < 0:
-                doff[offset] = i
-        del pdoms
-        cdef int nsize = 27
-        cdef np.int64_t *nind = <np.int64_t *> malloc(sizeof(np.int64_t)*nsize)
-        counter = 0
-        cdef np.int64_t frac = <np.int64_t> (doff.shape[0] / 20.0)
-        cdef int inside, skip_early
-        if verbose == 1: print >> sys.stderr, "Will be outputting every", frac
-        for i in range(doff.shape[0]):
-            if verbose == 1 and counter >= frac:
-                counter = 0
-                print >> sys.stderr, "FOF-ing % 5.1f%% done" % ((100.0 * i)/doff.size)
-            counter += 1
-            # Any particles found for this oct?
-            if doff[i] < 0: continue
-            offset = pind[doff[i]]
-            # This can probably be replaced at some point with a faster lookup.
-            for j in range(3):
-                pos[j] = positions[offset, j]
-            oct = octree.get(pos, &oi)
-            if oct == NULL or (domain_id > 0 and oct.domain != domain_id):
-                continue
-            # Now we have our primary oct, so we will get its neighbors.
-            neighbors = octree.neighbors(&oi, &nneighbors, oct,
-                                self.periodicity)
-            # Now we have all our neighbors.  And, we should be set for what
-            # else we need to do.
-            if nneighbors > nsize:
-                nind = <np.int64_t *> realloc(
-                    nind, sizeof(np.int64_t)*nneighbors)
-                nsize = nneighbors
-            for j in range(nneighbors):
-                nind[j] = neighbors[j].domain_ind - moff
-                for n in range(j):
-                    if nind[j] == nind[n]:
-                        nind[j] = -1
-                    break
-            # This is allocated by the neighbors function, so we deallocate it.
-            free(neighbors)
-            # We might know that all our internal particles are linked.
-            # Otherwise, we look at each particle.
-            for j in range(pcount[i]):
-                # Note that this offset is the particle index
-                pind0 = pind[doff[i] + j]
-                # Look at each neighboring oct
-                for k in range(nneighbors):
-                    if nind[k] == -1: continue
-                    offset = doff[nind[k]]
-                    if offset < 0: continue
-                    # NOTE: doff[i] will not monotonically increase.  So we
-                    # need a unique ID for each container that we are
-                    # accessing.
-                    self.link_particles(container,
-                                        fpos, ipind,
-                                        pcount[nind[k]],
-                                        offset, pind0,
-                                        doff[i] + j)
-        cdef np.ndarray[np.int64_t, ndim=1] contour_ids
-        contour_ids = np.ones(positions.shape[0], dtype="int64")
-        contour_ids *= -1
-        # Perform one last contour_find on each.  Note that we no longer need
-        # to look at any of the doff or internal offset stuff.
-        for i in range(positions.shape[0]):
-            if container[i] == NULL: continue
-            container[i] = contour_find(container[i])
-        for i in range(positions.shape[0]):
-            if container[i] == NULL: continue
-            c0 = container[i]
-            if c0.count < self.minimum_count: continue
-            contour_ids[i] = particle_ids[pind[c0.contour_id]]
-        free(container)
-        del pind
-        return contour_ids
-
-    @cython.cdivision(True)
-    @cython.boundscheck(False)
-    @cython.wraparound(False)
-    cdef void link_particles(self, ContourID **container,
-                                   anyfloat *positions,
-                                   np.int64_t *pind,
-                                   np.int64_t pcount,
-                                   np.int64_t noffset,
-                                   np.int64_t pind0,
-                                   np.int64_t poffset):
-        # Now we look at each particle and evaluate it
-        cdef np.float64_t pos0[3]
-        cdef np.float64_t pos1[3]
-        cdef np.float64_t edges[2][3]
-        cdef int link
-        cdef ContourID *c0
-        cdef ContourID *c1
-        cdef np.int64_t pind1
-        cdef int i, j, k
-        # We use pid here so that we strictly take new ones.
-        # Note that pind0 will not monotonically increase, but
-        c0 = container[pind0]
-        if c0 == NULL:
-            c0 = container[pind0] = contour_create(poffset, self.last)
-            self.last = c0
-            if self.first == NULL:
-                self.first = c0
-        c0 = container[pind0] = contour_find(c0)
-        for i in range(3):
-            # We make a very conservative guess here about the edges.
-            pos0[i] = positions[pind0*3 + i]
-            edges[0][i] = pos0[i] - self.linking_length*1.01
-            edges[1][i] = pos0[i] + self.linking_length*1.01
-            if edges[0][i] < self.DLE[i] or edges[0][i] > self.DRE[i]:
-                # We skip this one, since we're close to the boundary
-                edges[0][i] = -1e30
-                edges[1][i] = 1e30
-        # Lets set up some bounds for the particles.  Maybe we can get away
-        # with reducing our number of calls to r2dist_early.
-        for i in range(pcount):
-            pind1 = pind[noffset + i]
-            if pind1 == pind0: continue
-            c1 = container[pind1]
-            if c1 != NULL and c1.contour_id == c0.contour_id:
-                # Already linked.
-                continue
-            for j in range(3):
-                pos1[j] = positions[pind1*3 + j]
-            link = r2dist_early(pos0, pos1, self.DW, self.periodicity,
-                                self.linking_length2, edges)
-            if link == 0: continue
-            if c1 == NULL:
-                c0.count += 1
-                container[pind1] = c0
-            elif c0.contour_id != c1.contour_id:
-                contour_union(c0, c1)
-                c0 = container[pind1] = container[pind0] = contour_find(c0)
-
- at cython.cdivision(True)
- at cython.boundscheck(False)
- at cython.wraparound(False)
-cdef inline int r2dist_early(np.float64_t ppos[3],
-                             np.float64_t cpos[3],
-                             np.float64_t DW[3],
-                             bint periodicity[3],
-                             np.float64_t max_r2,
-                             np.float64_t edges[2][3]):
-    cdef int i
-    cdef np.float64_t r2, DR
-    r2 = 0.0
-    cdef int inside = 0
-    for i in range(3):
-        if cpos[i] < edges[0][i]:
-            return 0
-        if cpos[i] > edges[1][i]:
-            return 0
-    for i in range(3):
-        DR = (ppos[i] - cpos[i])
-        if not periodicity[i]:
-            pass
-        elif (DR > DW[i]/2.0):
-            DR -= DW[i]
-        elif (DR < -DW[i]/2.0):
-            DR += DW[i]
-        r2 += DR * DR
-        if r2 > max_r2: return 0
-    return 1

diff -r eff6841ae4004a3ecb8040858e57badbd3b00021 -r 62e350b9531193afbbb0a6d97d3b1233ef25b4d2 yt/utilities/lib/DepthFirstOctree.pyx
--- a/yt/utilities/lib/DepthFirstOctree.pyx
+++ /dev/null
@@ -1,164 +0,0 @@
-"""
-This is a recursive function to return a depth-first octree
-
-
-
-"""
-
-#-----------------------------------------------------------------------------
-# Copyright (c) 2013, yt Development Team.
-#
-# Distributed under the terms of the Modified BSD License.
-#
-# The full license is in the file COPYING.txt, distributed with this software.
-#-----------------------------------------------------------------------------
-
-import numpy as np
-cimport numpy as np
-cimport cython
-
-cdef class position:
-    cdef public int output_pos, refined_pos
-    def __cinit__(self):
-        self.output_pos = 0
-        self.refined_pos = 0
-
-cdef class OctreeGrid:
-    cdef public object child_indices, fields, left_edges, dimensions, dx
-    cdef public int level, offset
-    def __cinit__(self,
-                  np.ndarray[np.int32_t, ndim=3] child_indices,
-                  np.ndarray[np.float64_t, ndim=4] fields,
-                  np.ndarray[np.float64_t, ndim=1] left_edges,
-                  np.ndarray[np.int32_t, ndim=1] dimensions,
-                  np.ndarray[np.float64_t, ndim=1] dx,
-                  int level, int offset):
-        self.child_indices = child_indices
-        self.fields = fields
-        self.left_edges = left_edges
-        self.dimensions = dimensions
-        self.dx = dx
-        self.level = level
-        self.offset = offset
-
-cdef class OctreeGridList:
-    cdef public object grids
-    def __cinit__(self, grids):
-        self.grids = grids
-
-    def __getitem__(self, int item):
-        return self.grids[item]
-
- at cython.boundscheck(False)
-def RecurseOctreeDepthFirst(int i_i, int j_i, int k_i,
-                            int i_f, int j_f, int k_f,
-                            position curpos, int gi, 
-                            np.ndarray[np.float64_t, ndim=2] output,
-                            np.ndarray[np.int32_t, ndim=1] refined,
-                            OctreeGridList grids):
-    #cdef int s = curpos
-    cdef int i, i_off, j, j_off, k, k_off, ci, fi
-    cdef int child_i, child_j, child_k
-    cdef OctreeGrid child_grid
-    cdef OctreeGrid grid = grids[gi]
-    cdef np.ndarray[np.int32_t, ndim=3] child_indices = grid.child_indices
-    cdef np.ndarray[np.int32_t, ndim=1] dimensions = grid.dimensions
-    cdef np.ndarray[np.float64_t, ndim=4] fields = grid.fields
-    cdef np.ndarray[np.float64_t, ndim=1] leftedges = grid.left_edges
-    cdef np.float64_t dx = grid.dx[0]
-    cdef np.float64_t child_dx
-    cdef np.ndarray[np.float64_t, ndim=1] child_leftedges
-    cdef np.float64_t cx, cy, cz
-    #here we go over the 8 octants
-    #in general however, a mesh cell on this level
-    #may have more than 8 children on the next level
-    #so we find the int float center (cxyz) of each child cell
-    # and from that find the child cell indices
-    for i_off in range(i_f):
-        i = i_off + i_i #index
-        cx = (leftedges[0] + i*dx)
-        for j_off in range(j_f):
-            j = j_off + j_i
-            cy = (leftedges[1] + j*dx)
-            for k_off in range(k_f):
-                k = k_off + k_i
-                cz = (leftedges[2] + k*dx)
-                ci = grid.child_indices[i,j,k]
-                if ci == -1:
-                    for fi in range(fields.shape[0]):
-                        output[curpos.output_pos,fi] = fields[fi,i,j,k]
-                    refined[curpos.refined_pos] = 0
-                    curpos.output_pos += 1
-                    curpos.refined_pos += 1
-                else:
-                    refined[curpos.refined_pos] = 1
-                    curpos.refined_pos += 1
-                    child_grid = grids[ci-grid.offset]
-                    child_dx = child_grid.dx[0]
-                    child_leftedges = child_grid.left_edges
-                    child_i = int((cx - child_leftedges[0])/child_dx)
-                    child_j = int((cy - child_leftedges[1])/child_dx)
-                    child_k = int((cz - child_leftedges[2])/child_dx)
-                    # s = Recurs.....
-                    RecurseOctreeDepthFirst(child_i, child_j, child_k, 2, 2, 2,
-                                        curpos, ci - grid.offset, output, refined, grids)
-
- at cython.boundscheck(False)
-def RecurseOctreeByLevels(int i_i, int j_i, int k_i,
-                          int i_f, int j_f, int k_f,
-                          np.ndarray[np.int32_t, ndim=1] curpos,
-                          int gi, 
-                          np.ndarray[np.float64_t, ndim=2] output,
-                          np.ndarray[np.int32_t, ndim=2] genealogy,
-                          np.ndarray[np.float64_t, ndim=2] corners,
-                          OctreeGridList grids):
-    cdef np.int32_t i, i_off, j, j_off, k, k_off, ci, fi
-    cdef int child_i, child_j, child_k
-    cdef OctreeGrid child_grid
-    cdef OctreeGrid grid = grids[gi-1]
-    cdef int level = grid.level
-    cdef np.ndarray[np.int32_t, ndim=3] child_indices = grid.child_indices
-    cdef np.ndarray[np.int32_t, ndim=1] dimensions = grid.dimensions
-    cdef np.ndarray[np.float64_t, ndim=4] fields = grid.fields
-    cdef np.ndarray[np.float64_t, ndim=1] leftedges = grid.left_edges
-    cdef np.float64_t dx = grid.dx[0]
-    cdef np.float64_t child_dx
-    cdef np.ndarray[np.float64_t, ndim=1] child_leftedges
-    cdef np.float64_t cx, cy, cz
-    cdef int cp
-    for i_off in range(i_f):
-        i = i_off + i_i
-        cx = (leftedges[0] + i*dx)
-        if i_f > 2: print k, cz
-        for j_off in range(j_f):
-            j = j_off + j_i
-            cy = (leftedges[1] + j*dx)
-            for k_off in range(k_f):
-                k = k_off + k_i
-                cz = (leftedges[2] + k*dx)
-                cp = curpos[level]
-                corners[cp, 0] = cx 
-                corners[cp, 1] = cy 
-                corners[cp, 2] = cz
-                genealogy[curpos[level], 2] = level
-                # always output data
-                for fi in range(fields.shape[0]):
-                    output[cp,fi] = fields[fi,i,j,k]
-                ci = child_indices[i,j,k]
-                if ci > -1:
-                    child_grid = grids[ci-1]
-                    child_dx = child_grid.dx[0]
-                    child_leftedges = child_grid.left_edges
-                    child_i = int((cx-child_leftedges[0])/child_dx)
-                    child_j = int((cy-child_leftedges[1])/child_dx)
-                    child_k = int((cz-child_leftedges[2])/child_dx)
-                    # set current child id to id of next cell to examine
-                    genealogy[cp, 0] = curpos[level+1] 
-                    # set next parent id to id of current cell
-                    genealogy[curpos[level+1]:curpos[level+1]+8, 1] = cp
-                    s = RecurseOctreeByLevels(child_i, child_j, child_k, 2, 2, 2,
-                                              curpos, ci, output, genealogy,
-                                              corners, grids)
-                curpos[level] += 1
-    return s
-

diff -r eff6841ae4004a3ecb8040858e57badbd3b00021 -r 62e350b9531193afbbb0a6d97d3b1233ef25b4d2 yt/utilities/lib/FixedInterpolator.c
--- a/yt/utilities/lib/FixedInterpolator.c
+++ /dev/null
@@ -1,448 +0,0 @@
-/*******************************************************************************
-# Copyright (c) 2013, yt Development Team.
-#
-# Distributed under the terms of the Modified BSD License.
-#
-# The full license is in the file COPYING.txt, distributed with this software.
-*******************************************************************************/
-
-//
-// A small, tiny, itty bitty module for computation-intensive interpolation
-// that I can't seem to make fast in Cython
-//
-
-#include "FixedInterpolator.h"
-
-#define VINDEX(A,B,C) data[((((A)+ci[0])*(ds[1]+1)+((B)+ci[1]))*(ds[2]+1)+ci[2]+(C))]
-//  (((C*ds[1])+B)*ds[0]+A)
-#define OINDEX(A,B,C) data[(A)*(ds[1]+1)*(ds[2]+1)+(B)*ds[2]+(B)+(C)]
-
-npy_float64 fast_interpolate(int ds[3], int ci[3], npy_float64 dp[3],
-                             npy_float64 *data)
-{
-    int i;
-    npy_float64 dv, dm[3];
-    for(i=0;i<3;i++)dm[i] = (1.0 - dp[i]);
-    dv  = 0.0;
-    dv += VINDEX(0,0,0) * (dm[0]*dm[1]*dm[2]);
-    dv += VINDEX(0,0,1) * (dm[0]*dm[1]*dp[2]);
-    dv += VINDEX(0,1,0) * (dm[0]*dp[1]*dm[2]);
-    dv += VINDEX(0,1,1) * (dm[0]*dp[1]*dp[2]);
-    dv += VINDEX(1,0,0) * (dp[0]*dm[1]*dm[2]);
-    dv += VINDEX(1,0,1) * (dp[0]*dm[1]*dp[2]);
-    dv += VINDEX(1,1,0) * (dp[0]*dp[1]*dm[2]);
-    dv += VINDEX(1,1,1) * (dp[0]*dp[1]*dp[2]);
-    /*assert(dv < -20);*/
-    return dv;
-}
-
-npy_float64 offset_interpolate(int ds[3], npy_float64 dp[3], npy_float64 *data)
-{
-    int i;
-    npy_float64 dv, vz[4];
-
-    dv = 1.0 - dp[2];
-    vz[0] = dv*OINDEX(0,0,0) + dp[2]*OINDEX(0,0,1);
-    vz[1] = dv*OINDEX(0,1,0) + dp[2]*OINDEX(0,1,1);
-    vz[2] = dv*OINDEX(1,0,0) + dp[2]*OINDEX(1,0,1);
-    vz[3] = dv*OINDEX(1,1,0) + dp[2]*OINDEX(1,1,1);
-
-    dv = 1.0 - dp[1];
-    vz[0] = dv*vz[0] + dp[1]*vz[1];
-    vz[1] = dv*vz[2] + dp[1]*vz[3];
-
-    dv = 1.0 - dp[0];
-    vz[0] = dv*vz[0] + dp[0]*vz[1];
-
-    return vz[0];
-}
-
-void offset_fill(int ds[3], npy_float64 *data, npy_float64 gridval[8])
-{
-    gridval[0] = OINDEX(0,0,0);
-    gridval[1] = OINDEX(1,0,0);
-    gridval[2] = OINDEX(1,1,0);
-    gridval[3] = OINDEX(0,1,0);
-    gridval[4] = OINDEX(0,0,1);
-    gridval[5] = OINDEX(1,0,1);
-    gridval[6] = OINDEX(1,1,1);
-    gridval[7] = OINDEX(0,1,1);
-}
-
-void vertex_interp(npy_float64 v1, npy_float64 v2, npy_float64 isovalue,
-                   npy_float64 vl[3], npy_float64 dds[3],
-                   npy_float64 x, npy_float64 y, npy_float64 z,
-                   int vind1, int vind2)
-{
-    /*if (fabs(isovalue - v1) < 0.000001) return 0.0;
-    if (fabs(isovalue - v2) < 0.000001) return 1.0;
-    if (fabs(v1 - v2) < 0.000001) return 0.0;*/
-    int i;
-    static npy_float64 cverts[8][3] =
-        {{0,0,0}, {1,0,0}, {1,1,0}, {0,1,0},
-         {0,0,1}, {1,0,1}, {1,1,1}, {0,1,1}};
-
-    npy_float64 mu = ((isovalue - v1) / (v2 - v1));
-
-    if (fabs(1.0 - isovalue/v1) < 0.000001) mu = 0.0;
-    if (fabs(1.0 - isovalue/v2) < 0.000001) mu = 1.0;
-    if (fabs(v1/v2) < 0.000001) mu = 0.0;
-
-    vl[0] = x; vl[1] = y; vl[2] = z;
-    for (i=0;i<3;i++)
-        vl[i] += dds[i] * cverts[vind1][i]
-               + dds[i] * mu*(cverts[vind2][i] - cverts[vind1][i]);
-}
-
-npy_float64 trilinear_interpolate(int ds[3], int ci[3], npy_float64 dp[3],
-				  npy_float64 *data)
-{
-    /* dims is one less than the dimensions of the array */
-    int i;
-    npy_float64 dm[3], vz[4];
-  //dp is the distance to the plane.  dm is val, dp = 1-val
-    for(i=0;i<3;i++)dm[i] = (1.0 - dp[i]);
-    
-  //First interpolate in z
-    vz[0] = dm[2]*VINDEX(0,0,0) + dp[2]*VINDEX(0,0,1);
-    vz[1] = dm[2]*VINDEX(0,1,0) + dp[2]*VINDEX(0,1,1);
-    vz[2] = dm[2]*VINDEX(1,0,0) + dp[2]*VINDEX(1,0,1);
-    vz[3] = dm[2]*VINDEX(1,1,0) + dp[2]*VINDEX(1,1,1);
-
-  //Then in y
-    vz[0] = dm[1]*vz[0] + dp[1]*vz[1];
-    vz[1] = dm[1]*vz[2] + dp[1]*vz[3];
-
-  //Then in x
-    vz[0] = dm[0]*vz[0] + dp[0]*vz[1];
-    /*assert(dv < -20);*/
-    return vz[0];
-}
-
-void eval_gradient(int ds[3], npy_float64 dp[3],
-				  npy_float64 *data, npy_float64 *grad)
-{
-    // We just take some small value
-
-    int i;
-    npy_float64 denom, plus, minus, backup, normval;
-    
-    normval = 0.0;
-    for (i = 0; i < 3; i++) {
-      backup = dp[i];
-      grad[i] = 0.0;
-      if (dp[i] >= 0.95) {plus = dp[i]; minus = dp[i] - 0.05;}
-      else if (dp[i] <= 0.05) {plus = dp[i] + 0.05; minus = 0.0;}
-      else {plus = dp[i] + 0.05; minus = dp[i] - 0.05;}
-      //fprintf(stderr, "DIM: %d %0.3lf %0.3lf\n", i, plus, minus);
-      denom = plus - minus;
-      dp[i] = plus;
-      grad[i] += offset_interpolate(ds, dp, data) / denom;
-      dp[i] = minus;
-      grad[i] -= offset_interpolate(ds, dp, data) / denom;
-      dp[i] = backup;
-      normval += grad[i]*grad[i];
-    }
-    if (normval != 0.0){
-      normval = sqrt(normval);
-      for (i = 0; i < 3; i++) grad[i] /= -normval;
-      //fprintf(stderr, "Normval: %0.3lf %0.3lf %0.3lf %0.3lf\n",
-      //        normval, grad[0], grad[1], grad[2]);
-    }else{
-      grad[0]=grad[1]=grad[2]=0.0;
-    }
-}
-
-/*
-int edge_table[256]={
-0x0  , 0x109, 0x203, 0x30a, 0x406, 0x50f, 0x605, 0x70c,
-0x80c, 0x905, 0xa0f, 0xb06, 0xc0a, 0xd03, 0xe09, 0xf00,
-0x190, 0x99 , 0x393, 0x29a, 0x596, 0x49f, 0x795, 0x69c,
-0x99c, 0x895, 0xb9f, 0xa96, 0xd9a, 0xc93, 0xf99, 0xe90,
-0x230, 0x339, 0x33 , 0x13a, 0x636, 0x73f, 0x435, 0x53c,
-0xa3c, 0xb35, 0x83f, 0x936, 0xe3a, 0xf33, 0xc39, 0xd30,
-0x3a0, 0x2a9, 0x1a3, 0xaa , 0x7a6, 0x6af, 0x5a5, 0x4ac,
-0xbac, 0xaa5, 0x9af, 0x8a6, 0xfaa, 0xea3, 0xda9, 0xca0,
-0x460, 0x569, 0x663, 0x76a, 0x66 , 0x16f, 0x265, 0x36c,
-0xc6c, 0xd65, 0xe6f, 0xf66, 0x86a, 0x963, 0xa69, 0xb60,
-0x5f0, 0x4f9, 0x7f3, 0x6fa, 0x1f6, 0xff , 0x3f5, 0x2fc,
-0xdfc, 0xcf5, 0xfff, 0xef6, 0x9fa, 0x8f3, 0xbf9, 0xaf0,
-0x650, 0x759, 0x453, 0x55a, 0x256, 0x35f, 0x55 , 0x15c,
-0xe5c, 0xf55, 0xc5f, 0xd56, 0xa5a, 0xb53, 0x859, 0x950,
-0x7c0, 0x6c9, 0x5c3, 0x4ca, 0x3c6, 0x2cf, 0x1c5, 0xcc ,
-0xfcc, 0xec5, 0xdcf, 0xcc6, 0xbca, 0xac3, 0x9c9, 0x8c0,
-0x8c0, 0x9c9, 0xac3, 0xbca, 0xcc6, 0xdcf, 0xec5, 0xfcc,
-0xcc , 0x1c5, 0x2cf, 0x3c6, 0x4ca, 0x5c3, 0x6c9, 0x7c0,
-0x950, 0x859, 0xb53, 0xa5a, 0xd56, 0xc5f, 0xf55, 0xe5c,
-0x15c, 0x55 , 0x35f, 0x256, 0x55a, 0x453, 0x759, 0x650,
-0xaf0, 0xbf9, 0x8f3, 0x9fa, 0xef6, 0xfff, 0xcf5, 0xdfc,
-0x2fc, 0x3f5, 0xff , 0x1f6, 0x6fa, 0x7f3, 0x4f9, 0x5f0,
-0xb60, 0xa69, 0x963, 0x86a, 0xf66, 0xe6f, 0xd65, 0xc6c,
-0x36c, 0x265, 0x16f, 0x66 , 0x76a, 0x663, 0x569, 0x460,
-0xca0, 0xda9, 0xea3, 0xfaa, 0x8a6, 0x9af, 0xaa5, 0xbac,
-0x4ac, 0x5a5, 0x6af, 0x7a6, 0xaa , 0x1a3, 0x2a9, 0x3a0,
-0xd30, 0xc39, 0xf33, 0xe3a, 0x936, 0x83f, 0xb35, 0xa3c,
-0x53c, 0x435, 0x73f, 0x636, 0x13a, 0x33 , 0x339, 0x230,
-0xe90, 0xf99, 0xc93, 0xd9a, 0xa96, 0xb9f, 0x895, 0x99c,
-0x69c, 0x795, 0x49f, 0x596, 0x29a, 0x393, 0x99 , 0x190,
-0xf00, 0xe09, 0xd03, 0xc0a, 0xb06, 0xa0f, 0x905, 0x80c,
-0x70c, 0x605, 0x50f, 0x406, 0x30a, 0x203, 0x109, 0x0   };
-
-int tri_table[256][16] =
-{{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{0, 8, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{0, 1, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{1, 8, 3, 9, 8, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{1, 2, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{0, 8, 3, 1, 2, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{9, 2, 10, 0, 2, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{2, 8, 3, 2, 10, 8, 10, 9, 8, -1, -1, -1, -1, -1, -1, -1},
-{3, 11, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{0, 11, 2, 8, 11, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{1, 9, 0, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{1, 11, 2, 1, 9, 11, 9, 8, 11, -1, -1, -1, -1, -1, -1, -1},
-{3, 10, 1, 11, 10, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{0, 10, 1, 0, 8, 10, 8, 11, 10, -1, -1, -1, -1, -1, -1, -1},
-{3, 9, 0, 3, 11, 9, 11, 10, 9, -1, -1, -1, -1, -1, -1, -1},
-{9, 8, 10, 10, 8, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{4, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{4, 3, 0, 7, 3, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{0, 1, 9, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{4, 1, 9, 4, 7, 1, 7, 3, 1, -1, -1, -1, -1, -1, -1, -1},
-{1, 2, 10, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{3, 4, 7, 3, 0, 4, 1, 2, 10, -1, -1, -1, -1, -1, -1, -1},
-{9, 2, 10, 9, 0, 2, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1},
-{2, 10, 9, 2, 9, 7, 2, 7, 3, 7, 9, 4, -1, -1, -1, -1},
-{8, 4, 7, 3, 11, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{11, 4, 7, 11, 2, 4, 2, 0, 4, -1, -1, -1, -1, -1, -1, -1},
-{9, 0, 1, 8, 4, 7, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1},
-{4, 7, 11, 9, 4, 11, 9, 11, 2, 9, 2, 1, -1, -1, -1, -1},
-{3, 10, 1, 3, 11, 10, 7, 8, 4, -1, -1, -1, -1, -1, -1, -1},
-{1, 11, 10, 1, 4, 11, 1, 0, 4, 7, 11, 4, -1, -1, -1, -1},
-{4, 7, 8, 9, 0, 11, 9, 11, 10, 11, 0, 3, -1, -1, -1, -1},
-{4, 7, 11, 4, 11, 9, 9, 11, 10, -1, -1, -1, -1, -1, -1, -1},
-{9, 5, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{9, 5, 4, 0, 8, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{0, 5, 4, 1, 5, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{8, 5, 4, 8, 3, 5, 3, 1, 5, -1, -1, -1, -1, -1, -1, -1},
-{1, 2, 10, 9, 5, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{3, 0, 8, 1, 2, 10, 4, 9, 5, -1, -1, -1, -1, -1, -1, -1},
-{5, 2, 10, 5, 4, 2, 4, 0, 2, -1, -1, -1, -1, -1, -1, -1},
-{2, 10, 5, 3, 2, 5, 3, 5, 4, 3, 4, 8, -1, -1, -1, -1},
-{9, 5, 4, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{0, 11, 2, 0, 8, 11, 4, 9, 5, -1, -1, -1, -1, -1, -1, -1},
-{0, 5, 4, 0, 1, 5, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1},
-{2, 1, 5, 2, 5, 8, 2, 8, 11, 4, 8, 5, -1, -1, -1, -1},
-{10, 3, 11, 10, 1, 3, 9, 5, 4, -1, -1, -1, -1, -1, -1, -1},
-{4, 9, 5, 0, 8, 1, 8, 10, 1, 8, 11, 10, -1, -1, -1, -1},
-{5, 4, 0, 5, 0, 11, 5, 11, 10, 11, 0, 3, -1, -1, -1, -1},
-{5, 4, 8, 5, 8, 10, 10, 8, 11, -1, -1, -1, -1, -1, -1, -1},
-{9, 7, 8, 5, 7, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{9, 3, 0, 9, 5, 3, 5, 7, 3, -1, -1, -1, -1, -1, -1, -1},
-{0, 7, 8, 0, 1, 7, 1, 5, 7, -1, -1, -1, -1, -1, -1, -1},
-{1, 5, 3, 3, 5, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{9, 7, 8, 9, 5, 7, 10, 1, 2, -1, -1, -1, -1, -1, -1, -1},
-{10, 1, 2, 9, 5, 0, 5, 3, 0, 5, 7, 3, -1, -1, -1, -1},
-{8, 0, 2, 8, 2, 5, 8, 5, 7, 10, 5, 2, -1, -1, -1, -1},
-{2, 10, 5, 2, 5, 3, 3, 5, 7, -1, -1, -1, -1, -1, -1, -1},
-{7, 9, 5, 7, 8, 9, 3, 11, 2, -1, -1, -1, -1, -1, -1, -1},
-{9, 5, 7, 9, 7, 2, 9, 2, 0, 2, 7, 11, -1, -1, -1, -1},
-{2, 3, 11, 0, 1, 8, 1, 7, 8, 1, 5, 7, -1, -1, -1, -1},
-{11, 2, 1, 11, 1, 7, 7, 1, 5, -1, -1, -1, -1, -1, -1, -1},
-{9, 5, 8, 8, 5, 7, 10, 1, 3, 10, 3, 11, -1, -1, -1, -1},
-{5, 7, 0, 5, 0, 9, 7, 11, 0, 1, 0, 10, 11, 10, 0, -1},
-{11, 10, 0, 11, 0, 3, 10, 5, 0, 8, 0, 7, 5, 7, 0, -1},
-{11, 10, 5, 7, 11, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{10, 6, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{0, 8, 3, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{9, 0, 1, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{1, 8, 3, 1, 9, 8, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1},
-{1, 6, 5, 2, 6, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{1, 6, 5, 1, 2, 6, 3, 0, 8, -1, -1, -1, -1, -1, -1, -1},
-{9, 6, 5, 9, 0, 6, 0, 2, 6, -1, -1, -1, -1, -1, -1, -1},
-{5, 9, 8, 5, 8, 2, 5, 2, 6, 3, 2, 8, -1, -1, -1, -1},
-{2, 3, 11, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{11, 0, 8, 11, 2, 0, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1},
-{0, 1, 9, 2, 3, 11, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1},
-{5, 10, 6, 1, 9, 2, 9, 11, 2, 9, 8, 11, -1, -1, -1, -1},
-{6, 3, 11, 6, 5, 3, 5, 1, 3, -1, -1, -1, -1, -1, -1, -1},
-{0, 8, 11, 0, 11, 5, 0, 5, 1, 5, 11, 6, -1, -1, -1, -1},
-{3, 11, 6, 0, 3, 6, 0, 6, 5, 0, 5, 9, -1, -1, -1, -1},
-{6, 5, 9, 6, 9, 11, 11, 9, 8, -1, -1, -1, -1, -1, -1, -1},
-{5, 10, 6, 4, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{4, 3, 0, 4, 7, 3, 6, 5, 10, -1, -1, -1, -1, -1, -1, -1},
-{1, 9, 0, 5, 10, 6, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1},
-{10, 6, 5, 1, 9, 7, 1, 7, 3, 7, 9, 4, -1, -1, -1, -1},
-{6, 1, 2, 6, 5, 1, 4, 7, 8, -1, -1, -1, -1, -1, -1, -1},
-{1, 2, 5, 5, 2, 6, 3, 0, 4, 3, 4, 7, -1, -1, -1, -1},
-{8, 4, 7, 9, 0, 5, 0, 6, 5, 0, 2, 6, -1, -1, -1, -1},
-{7, 3, 9, 7, 9, 4, 3, 2, 9, 5, 9, 6, 2, 6, 9, -1},
-{3, 11, 2, 7, 8, 4, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1},
-{5, 10, 6, 4, 7, 2, 4, 2, 0, 2, 7, 11, -1, -1, -1, -1},
-{0, 1, 9, 4, 7, 8, 2, 3, 11, 5, 10, 6, -1, -1, -1, -1},
-{9, 2, 1, 9, 11, 2, 9, 4, 11, 7, 11, 4, 5, 10, 6, -1},
-{8, 4, 7, 3, 11, 5, 3, 5, 1, 5, 11, 6, -1, -1, -1, -1},
-{5, 1, 11, 5, 11, 6, 1, 0, 11, 7, 11, 4, 0, 4, 11, -1},
-{0, 5, 9, 0, 6, 5, 0, 3, 6, 11, 6, 3, 8, 4, 7, -1},
-{6, 5, 9, 6, 9, 11, 4, 7, 9, 7, 11, 9, -1, -1, -1, -1},
-{10, 4, 9, 6, 4, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{4, 10, 6, 4, 9, 10, 0, 8, 3, -1, -1, -1, -1, -1, -1, -1},
-{10, 0, 1, 10, 6, 0, 6, 4, 0, -1, -1, -1, -1, -1, -1, -1},
-{8, 3, 1, 8, 1, 6, 8, 6, 4, 6, 1, 10, -1, -1, -1, -1},
-{1, 4, 9, 1, 2, 4, 2, 6, 4, -1, -1, -1, -1, -1, -1, -1},
-{3, 0, 8, 1, 2, 9, 2, 4, 9, 2, 6, 4, -1, -1, -1, -1},
-{0, 2, 4, 4, 2, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{8, 3, 2, 8, 2, 4, 4, 2, 6, -1, -1, -1, -1, -1, -1, -1},
-{10, 4, 9, 10, 6, 4, 11, 2, 3, -1, -1, -1, -1, -1, -1, -1},
-{0, 8, 2, 2, 8, 11, 4, 9, 10, 4, 10, 6, -1, -1, -1, -1},
-{3, 11, 2, 0, 1, 6, 0, 6, 4, 6, 1, 10, -1, -1, -1, -1},
-{6, 4, 1, 6, 1, 10, 4, 8, 1, 2, 1, 11, 8, 11, 1, -1},
-{9, 6, 4, 9, 3, 6, 9, 1, 3, 11, 6, 3, -1, -1, -1, -1},
-{8, 11, 1, 8, 1, 0, 11, 6, 1, 9, 1, 4, 6, 4, 1, -1},
-{3, 11, 6, 3, 6, 0, 0, 6, 4, -1, -1, -1, -1, -1, -1, -1},
-{6, 4, 8, 11, 6, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{7, 10, 6, 7, 8, 10, 8, 9, 10, -1, -1, -1, -1, -1, -1, -1},
-{0, 7, 3, 0, 10, 7, 0, 9, 10, 6, 7, 10, -1, -1, -1, -1},
-{10, 6, 7, 1, 10, 7, 1, 7, 8, 1, 8, 0, -1, -1, -1, -1},
-{10, 6, 7, 10, 7, 1, 1, 7, 3, -1, -1, -1, -1, -1, -1, -1},
-{1, 2, 6, 1, 6, 8, 1, 8, 9, 8, 6, 7, -1, -1, -1, -1},
-{2, 6, 9, 2, 9, 1, 6, 7, 9, 0, 9, 3, 7, 3, 9, -1},
-{7, 8, 0, 7, 0, 6, 6, 0, 2, -1, -1, -1, -1, -1, -1, -1},
-{7, 3, 2, 6, 7, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{2, 3, 11, 10, 6, 8, 10, 8, 9, 8, 6, 7, -1, -1, -1, -1},
-{2, 0, 7, 2, 7, 11, 0, 9, 7, 6, 7, 10, 9, 10, 7, -1},
-{1, 8, 0, 1, 7, 8, 1, 10, 7, 6, 7, 10, 2, 3, 11, -1},
-{11, 2, 1, 11, 1, 7, 10, 6, 1, 6, 7, 1, -1, -1, -1, -1},
-{8, 9, 6, 8, 6, 7, 9, 1, 6, 11, 6, 3, 1, 3, 6, -1},
-{0, 9, 1, 11, 6, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{7, 8, 0, 7, 0, 6, 3, 11, 0, 11, 6, 0, -1, -1, -1, -1},
-{7, 11, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{7, 6, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{3, 0, 8, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{0, 1, 9, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{8, 1, 9, 8, 3, 1, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1},
-{10, 1, 2, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{1, 2, 10, 3, 0, 8, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1},
-{2, 9, 0, 2, 10, 9, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1},
-{6, 11, 7, 2, 10, 3, 10, 8, 3, 10, 9, 8, -1, -1, -1, -1},
-{7, 2, 3, 6, 2, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{7, 0, 8, 7, 6, 0, 6, 2, 0, -1, -1, -1, -1, -1, -1, -1},
-{2, 7, 6, 2, 3, 7, 0, 1, 9, -1, -1, -1, -1, -1, -1, -1},
-{1, 6, 2, 1, 8, 6, 1, 9, 8, 8, 7, 6, -1, -1, -1, -1},
-{10, 7, 6, 10, 1, 7, 1, 3, 7, -1, -1, -1, -1, -1, -1, -1},
-{10, 7, 6, 1, 7, 10, 1, 8, 7, 1, 0, 8, -1, -1, -1, -1},
-{0, 3, 7, 0, 7, 10, 0, 10, 9, 6, 10, 7, -1, -1, -1, -1},
-{7, 6, 10, 7, 10, 8, 8, 10, 9, -1, -1, -1, -1, -1, -1, -1},
-{6, 8, 4, 11, 8, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{3, 6, 11, 3, 0, 6, 0, 4, 6, -1, -1, -1, -1, -1, -1, -1},
-{8, 6, 11, 8, 4, 6, 9, 0, 1, -1, -1, -1, -1, -1, -1, -1},
-{9, 4, 6, 9, 6, 3, 9, 3, 1, 11, 3, 6, -1, -1, -1, -1},
-{6, 8, 4, 6, 11, 8, 2, 10, 1, -1, -1, -1, -1, -1, -1, -1},
-{1, 2, 10, 3, 0, 11, 0, 6, 11, 0, 4, 6, -1, -1, -1, -1},
-{4, 11, 8, 4, 6, 11, 0, 2, 9, 2, 10, 9, -1, -1, -1, -1},
-{10, 9, 3, 10, 3, 2, 9, 4, 3, 11, 3, 6, 4, 6, 3, -1},
-{8, 2, 3, 8, 4, 2, 4, 6, 2, -1, -1, -1, -1, -1, -1, -1},
-{0, 4, 2, 4, 6, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{1, 9, 0, 2, 3, 4, 2, 4, 6, 4, 3, 8, -1, -1, -1, -1},
-{1, 9, 4, 1, 4, 2, 2, 4, 6, -1, -1, -1, -1, -1, -1, -1},
-{8, 1, 3, 8, 6, 1, 8, 4, 6, 6, 10, 1, -1, -1, -1, -1},
-{10, 1, 0, 10, 0, 6, 6, 0, 4, -1, -1, -1, -1, -1, -1, -1},
-{4, 6, 3, 4, 3, 8, 6, 10, 3, 0, 3, 9, 10, 9, 3, -1},
-{10, 9, 4, 6, 10, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{4, 9, 5, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{0, 8, 3, 4, 9, 5, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1},
-{5, 0, 1, 5, 4, 0, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1},
-{11, 7, 6, 8, 3, 4, 3, 5, 4, 3, 1, 5, -1, -1, -1, -1},
-{9, 5, 4, 10, 1, 2, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1},
-{6, 11, 7, 1, 2, 10, 0, 8, 3, 4, 9, 5, -1, -1, -1, -1},
-{7, 6, 11, 5, 4, 10, 4, 2, 10, 4, 0, 2, -1, -1, -1, -1},
-{3, 4, 8, 3, 5, 4, 3, 2, 5, 10, 5, 2, 11, 7, 6, -1},
-{7, 2, 3, 7, 6, 2, 5, 4, 9, -1, -1, -1, -1, -1, -1, -1},
-{9, 5, 4, 0, 8, 6, 0, 6, 2, 6, 8, 7, -1, -1, -1, -1},
-{3, 6, 2, 3, 7, 6, 1, 5, 0, 5, 4, 0, -1, -1, -1, -1},
-{6, 2, 8, 6, 8, 7, 2, 1, 8, 4, 8, 5, 1, 5, 8, -1},
-{9, 5, 4, 10, 1, 6, 1, 7, 6, 1, 3, 7, -1, -1, -1, -1},
-{1, 6, 10, 1, 7, 6, 1, 0, 7, 8, 7, 0, 9, 5, 4, -1},
-{4, 0, 10, 4, 10, 5, 0, 3, 10, 6, 10, 7, 3, 7, 10, -1},
-{7, 6, 10, 7, 10, 8, 5, 4, 10, 4, 8, 10, -1, -1, -1, -1},
-{6, 9, 5, 6, 11, 9, 11, 8, 9, -1, -1, -1, -1, -1, -1, -1},
-{3, 6, 11, 0, 6, 3, 0, 5, 6, 0, 9, 5, -1, -1, -1, -1},
-{0, 11, 8, 0, 5, 11, 0, 1, 5, 5, 6, 11, -1, -1, -1, -1},
-{6, 11, 3, 6, 3, 5, 5, 3, 1, -1, -1, -1, -1, -1, -1, -1},
-{1, 2, 10, 9, 5, 11, 9, 11, 8, 11, 5, 6, -1, -1, -1, -1},
-{0, 11, 3, 0, 6, 11, 0, 9, 6, 5, 6, 9, 1, 2, 10, -1},
-{11, 8, 5, 11, 5, 6, 8, 0, 5, 10, 5, 2, 0, 2, 5, -1},
-{6, 11, 3, 6, 3, 5, 2, 10, 3, 10, 5, 3, -1, -1, -1, -1},
-{5, 8, 9, 5, 2, 8, 5, 6, 2, 3, 8, 2, -1, -1, -1, -1},
-{9, 5, 6, 9, 6, 0, 0, 6, 2, -1, -1, -1, -1, -1, -1, -1},
-{1, 5, 8, 1, 8, 0, 5, 6, 8, 3, 8, 2, 6, 2, 8, -1},
-{1, 5, 6, 2, 1, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{1, 3, 6, 1, 6, 10, 3, 8, 6, 5, 6, 9, 8, 9, 6, -1},
-{10, 1, 0, 10, 0, 6, 9, 5, 0, 5, 6, 0, -1, -1, -1, -1},
-{0, 3, 8, 5, 6, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{10, 5, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{11, 5, 10, 7, 5, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{11, 5, 10, 11, 7, 5, 8, 3, 0, -1, -1, -1, -1, -1, -1, -1},
-{5, 11, 7, 5, 10, 11, 1, 9, 0, -1, -1, -1, -1, -1, -1, -1},
-{10, 7, 5, 10, 11, 7, 9, 8, 1, 8, 3, 1, -1, -1, -1, -1},
-{11, 1, 2, 11, 7, 1, 7, 5, 1, -1, -1, -1, -1, -1, -1, -1},
-{0, 8, 3, 1, 2, 7, 1, 7, 5, 7, 2, 11, -1, -1, -1, -1},
-{9, 7, 5, 9, 2, 7, 9, 0, 2, 2, 11, 7, -1, -1, -1, -1},
-{7, 5, 2, 7, 2, 11, 5, 9, 2, 3, 2, 8, 9, 8, 2, -1},
-{2, 5, 10, 2, 3, 5, 3, 7, 5, -1, -1, -1, -1, -1, -1, -1},
-{8, 2, 0, 8, 5, 2, 8, 7, 5, 10, 2, 5, -1, -1, -1, -1},
-{9, 0, 1, 5, 10, 3, 5, 3, 7, 3, 10, 2, -1, -1, -1, -1},
-{9, 8, 2, 9, 2, 1, 8, 7, 2, 10, 2, 5, 7, 5, 2, -1},
-{1, 3, 5, 3, 7, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{0, 8, 7, 0, 7, 1, 1, 7, 5, -1, -1, -1, -1, -1, -1, -1},
-{9, 0, 3, 9, 3, 5, 5, 3, 7, -1, -1, -1, -1, -1, -1, -1},
-{9, 8, 7, 5, 9, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{5, 8, 4, 5, 10, 8, 10, 11, 8, -1, -1, -1, -1, -1, -1, -1},
-{5, 0, 4, 5, 11, 0, 5, 10, 11, 11, 3, 0, -1, -1, -1, -1},
-{0, 1, 9, 8, 4, 10, 8, 10, 11, 10, 4, 5, -1, -1, -1, -1},
-{10, 11, 4, 10, 4, 5, 11, 3, 4, 9, 4, 1, 3, 1, 4, -1},
-{2, 5, 1, 2, 8, 5, 2, 11, 8, 4, 5, 8, -1, -1, -1, -1},
-{0, 4, 11, 0, 11, 3, 4, 5, 11, 2, 11, 1, 5, 1, 11, -1},
-{0, 2, 5, 0, 5, 9, 2, 11, 5, 4, 5, 8, 11, 8, 5, -1},
-{9, 4, 5, 2, 11, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{2, 5, 10, 3, 5, 2, 3, 4, 5, 3, 8, 4, -1, -1, -1, -1},
-{5, 10, 2, 5, 2, 4, 4, 2, 0, -1, -1, -1, -1, -1, -1, -1},
-{3, 10, 2, 3, 5, 10, 3, 8, 5, 4, 5, 8, 0, 1, 9, -1},
-{5, 10, 2, 5, 2, 4, 1, 9, 2, 9, 4, 2, -1, -1, -1, -1},
-{8, 4, 5, 8, 5, 3, 3, 5, 1, -1, -1, -1, -1, -1, -1, -1},
-{0, 4, 5, 1, 0, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{8, 4, 5, 8, 5, 3, 9, 0, 5, 0, 3, 5, -1, -1, -1, -1},
-{9, 4, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{4, 11, 7, 4, 9, 11, 9, 10, 11, -1, -1, -1, -1, -1, -1, -1},
-{0, 8, 3, 4, 9, 7, 9, 11, 7, 9, 10, 11, -1, -1, -1, -1},
-{1, 10, 11, 1, 11, 4, 1, 4, 0, 7, 4, 11, -1, -1, -1, -1},
-{3, 1, 4, 3, 4, 8, 1, 10, 4, 7, 4, 11, 10, 11, 4, -1},
-{4, 11, 7, 9, 11, 4, 9, 2, 11, 9, 1, 2, -1, -1, -1, -1},
-{9, 7, 4, 9, 11, 7, 9, 1, 11, 2, 11, 1, 0, 8, 3, -1},
-{11, 7, 4, 11, 4, 2, 2, 4, 0, -1, -1, -1, -1, -1, -1, -1},
-{11, 7, 4, 11, 4, 2, 8, 3, 4, 3, 2, 4, -1, -1, -1, -1},
-{2, 9, 10, 2, 7, 9, 2, 3, 7, 7, 4, 9, -1, -1, -1, -1},
-{9, 10, 7, 9, 7, 4, 10, 2, 7, 8, 7, 0, 2, 0, 7, -1},
-{3, 7, 10, 3, 10, 2, 7, 4, 10, 1, 10, 0, 4, 0, 10, -1},
-{1, 10, 2, 8, 7, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{4, 9, 1, 4, 1, 7, 7, 1, 3, -1, -1, -1, -1, -1, -1, -1},
-{4, 9, 1, 4, 1, 7, 0, 8, 1, 8, 7, 1, -1, -1, -1, -1},
-{4, 0, 3, 7, 4, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{4, 8, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{9, 10, 8, 10, 11, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{3, 0, 9, 3, 9, 11, 11, 9, 10, -1, -1, -1, -1, -1, -1, -1},
-{0, 1, 10, 0, 10, 8, 8, 10, 11, -1, -1, -1, -1, -1, -1, -1},
-{3, 1, 10, 11, 3, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{1, 2, 11, 1, 11, 9, 9, 11, 8, -1, -1, -1, -1, -1, -1, -1},
-{3, 0, 9, 3, 9, 11, 1, 2, 9, 2, 11, 9, -1, -1, -1, -1},
-{0, 2, 11, 8, 0, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{3, 2, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{2, 3, 8, 2, 8, 10, 10, 8, 9, -1, -1, -1, -1, -1, -1, -1},
-{9, 10, 2, 0, 9, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{2, 3, 8, 2, 8, 10, 0, 1, 8, 1, 10, 8, -1, -1, -1, -1},
-{1, 10, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{1, 3, 8, 9, 1, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{0, 9, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{0, 3, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
-{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}};
-*/

This diff is so big that we needed to truncate the remainder.

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list