[Yt-svn] commit/yt: MatthewTurk: Fixing Octree and including it in the compilation. Usage example:

Bitbucket commits-noreply at bitbucket.org
Fri Mar 11 11:05:04 PST 2011


1 new changeset in yt:

http://bitbucket.org/yt_analysis/yt/changeset/783f7bb33939/
changeset:   r3813:783f7bb33939
branch:      yt
user:        MatthewTurk
date:        2011-03-11 20:04:32
summary:     Fixing Octree and including it in the compilation.  Usage example:

http://paste.enzotools.org/show/1530sage example:

http://paste.enzotools.org/show/1530/
affected #:  2 files (35 bytes)

--- a/yt/utilities/_amr_utils/Octree.pyx	Thu Mar 10 15:40:21 2011 -0800
+++ b/yt/utilities/_amr_utils/Octree.pyx	Fri Mar 11 11:04:32 2011 -0800
@@ -214,7 +214,7 @@
         cdef np.ndarray[np.int64_t, ndim=2] npos
         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')
+        npos = np.zeros( (total, 3), dtype='int64')
         nvals = np.zeros( (total, self.nvals), dtype='float64')
         nwvals = np.zeros( total, dtype='float64')
         cdef np.int64_t curpos = 0
@@ -259,7 +259,7 @@
             pdata[curpos * 3 + 1] = node.pos[1]
             pdata[curpos * 3 + 2] = node.pos[2]
             return 1
-        if node.children[0][0] == NULL: return 0
+        if node.children[0][0][0] == NULL: return 0
         cdef np.int64_t added = 0
         for i in range(2):
             for j in range(2):


--- a/yt/utilities/amr_utils.pyx	Thu Mar 10 15:40:21 2011 -0800
+++ b/yt/utilities/amr_utils.pyx	Fri Mar 11 11:04:32 2011 -0800
@@ -45,4 +45,5 @@
 include "_amr_utils/png_writer.pyx"
 include "_amr_utils/fortran_reader.pyx"
 include "_amr_utils/QuadTree.pyx"
+include "_amr_utils/Octree.pyx"
 include "_amr_utils/freetype_writer.pyx"

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