[yt-svn] commit/yt: 6 new changesets

Bitbucket commits-noreply at bitbucket.org
Mon Dec 17 20:21:09 PST 2012


6 new commits in yt:


https://bitbucket.org/yt_analysis/yt/changeset/efd4bafd92ab/
changeset:   efd4bafd92ab
branch:      yt
user:        MatthewTurk
date:        2012-12-13 18:48:44
summary:     Adding yt.imods for importing inside the IPython notebook.
affected #:  1 file

diff -r 7dff8c5bd37734e3b24c1c3e033b30d5cfb95f2d -r efd4bafd92ab86aea385eb1cf919f175e64e9d52 yt/imods.py
--- /dev/null
+++ b/yt/imods.py
@@ -0,0 +1,17 @@
+# This custom importer for yt will set up some IPython notebook-specific
+# helpers.  For instance, it will eventually add items to the menubar.
+
+import __builtin__
+if "__IPYTHON__" not in dir(__builtin__):
+    raise ImportError
+
+from IPython.core.interactiveshell import InteractiveShell
+from IPython.core.display import display, display_html
+inst = InteractiveShell.instance()
+ip = inst.get_ipython()
+ip.enable_pylab("inline", import_all=False)
+
+from yt.config import ytcfg
+ytcfg["yt", "ipython_notebook"] = "True"
+
+from yt.mods import *



https://bitbucket.org/yt_analysis/yt/changeset/833e6e7a457c/
changeset:   833e6e7a457c
branch:      yt
user:        MatthewTurk
date:        2012-12-15 21:23:40
summary:     Adding a 'yt notebook' command that will spawn an IPython notebook.

This does not allow you to start a notebook without a password, although that
password can be blank.  Future modifications and inclusions of convenience
functions (as well as pushing HTML/JS to the server to add helper widgets) can
be placed in yt.imods.
affected #:  2 files

diff -r efd4bafd92ab86aea385eb1cf919f175e64e9d52 -r 833e6e7a457cbc8ba249e82153b9c3c54314f5f3 yt/config.py
--- a/yt/config.py
+++ b/yt/config.py
@@ -59,6 +59,7 @@
     hub_url = 'https://hub.yt-project.org/upload',
     hub_api_key = '',
     ipython_notebook = 'False',
+    notebook_password = '',
     answer_testing_tolerance = '3',
     answer_testing_bitwise = 'False',
     gold_standard_filename = 'gold004',


diff -r efd4bafd92ab86aea385eb1cf919f175e64e9d52 -r 833e6e7a457cbc8ba249e82153b9c3c54314f5f3 yt/utilities/command_line.py
--- a/yt/utilities/command_line.py
+++ b/yt/utilities/command_line.py
@@ -30,7 +30,7 @@
 from yt.funcs import *
 from yt.utilities.minimal_representation import MinimalProjectDescription
 import argparse, os, os.path, math, sys, time, subprocess, getpass, tempfile
-import urllib, urllib2, base64
+import urllib, urllib2, base64, os
 
 def _fix_pf(arg):
     if os.path.isdir("%s" % arg) and \
@@ -1385,6 +1385,57 @@
         import rpdb
         rpdb.run_rpdb(int(args.task))
 
+class YTNotebookCmd(YTCommand):
+    name = ["notebook"]
+    args = (
+            dict(short="-o", long="--open-browser", action="store_true",
+                 default = False, dest='open_browser',
+                 help="Open a web browser."),
+            dict(short="-p", long="--port", action="store",
+                 default = 0, dest='port',
+                 help="Port to listen on; defaults to auto-detection."),
+            )
+    description = \
+        """
+        Run the Web GUI Reason
+        """
+    def __call__(self, args):
+        from IPython.frontend.html.notebook.notebookapp import NotebookApp
+        pw = ytcfg.get("yt", "notebook_password")
+        if len(pw) == 0:
+            import IPython.lib
+            pw = IPython.lib.passwd()
+            print "If you would like to use this password in the future,"
+            print "place a line like this inside the [yt] section in your"
+            print "yt configuration file at ~/.yt/config"
+            print
+            print "notebook_password = %s" % pw
+            print
+        kwargs = {}
+        if args.port != 0:
+            kwargs['port'] = int(args.port)
+        app = NotebookApp(password=pw, open_browser=args.open_browser,
+                          **kwargs)
+        print
+        print "***************************************************************"
+        print
+        print "Recall you can create a new SSH tunnel dynamically by pressing"
+        print "~C and then typing -LPORT:localhost:PORT where PORT is the port"
+        print "number that IPython prints out."
+        print
+        print "Additionally, while in the notebook, we recommend you start by"
+        print "replacing 'yt.mods' with 'yt.imods' like so:"
+        print
+        print "    from yt.imods import *"
+        print
+        print "This will enable some IPython-specific extensions to yt."
+        print
+        print "***************************************************************"
+        print
+        app.initialize()
+        app.start()
+
+
 class YTGUICmd(YTCommand):
     name = ["serve", "reason"]
     args = (



https://bitbucket.org/yt_analysis/yt/changeset/fcc4f8cf120a/
changeset:   fcc4f8cf120a
branch:      yt
user:        MatthewTurk
date:        2012-12-15 21:45:57
summary:     Oops, missed the description change for the notebook.
affected #:  1 file

diff -r 833e6e7a457cbc8ba249e82153b9c3c54314f5f3 -r fcc4f8cf120aa72c1500de26a7420ecbc070dfa7 yt/utilities/command_line.py
--- a/yt/utilities/command_line.py
+++ b/yt/utilities/command_line.py
@@ -1397,7 +1397,7 @@
             )
     description = \
         """
-        Run the Web GUI Reason
+        Run the IPython Notebook
         """
     def __call__(self, args):
         from IPython.frontend.html.notebook.notebookapp import NotebookApp



https://bitbucket.org/yt_analysis/yt/changeset/70616f2e3057/
changeset:   70616f2e3057
branch:      yt
user:        MatthewTurk
date:        2012-12-16 13:57:19
summary:     A few minor modifications to fit with Nathan's suggestions.
affected #:  1 file

diff -r fcc4f8cf120aa72c1500de26a7420ecbc070dfa7 -r 70616f2e3057bcd5cc339ef85ea1b11da4d1cdb7 yt/utilities/command_line.py
--- a/yt/utilities/command_line.py
+++ b/yt/utilities/command_line.py
@@ -1394,15 +1394,19 @@
             dict(short="-p", long="--port", action="store",
                  default = 0, dest='port',
                  help="Port to listen on; defaults to auto-detection."),
+            dict(short="-n", long="--no-password", action="store_true",
+                 default = False, dest='no_password',
+                 help="If set, do not prompt or use a password."),
             )
     description = \
         """
         Run the IPython Notebook
         """
     def __call__(self, args):
+        kwargs = {}
         from IPython.frontend.html.notebook.notebookapp import NotebookApp
         pw = ytcfg.get("yt", "notebook_password")
-        if len(pw) == 0:
+        if len(pw) == 0 and not args.no_password:
             import IPython.lib
             pw = IPython.lib.passwd()
             print "If you would like to use this password in the future,"
@@ -1411,17 +1415,24 @@
             print
             print "notebook_password = %s" % pw
             print
-        kwargs = {}
+        elif args.no_password:
+            pw = None
         if args.port != 0:
             kwargs['port'] = int(args.port)
-        app = NotebookApp(password=pw, open_browser=args.open_browser,
+        if pw is not None:
+            kwargs['password'] = pw
+        app = NotebookApp(open_browser=args.open_browser,
                           **kwargs)
+        app.initialize(argv=[])
         print
         print "***************************************************************"
         print
+        print "The notebook is now live at:"
+        print
+        print "     http://127.0.0.1:%s/" % app.port
+        print
         print "Recall you can create a new SSH tunnel dynamically by pressing"
-        print "~C and then typing -LPORT:localhost:PORT where PORT is the port"
-        print "number that IPython prints out."
+        print "~C and then typing -L%s:localhost:%s" % (app.port, app.port)
         print
         print "Additionally, while in the notebook, we recommend you start by"
         print "replacing 'yt.mods' with 'yt.imods' like so:"
@@ -1432,7 +1443,6 @@
         print
         print "***************************************************************"
         print
-        app.initialize()
         app.start()
 
 



https://bitbucket.org/yt_analysis/yt/changeset/000c2e074104/
changeset:   000c2e074104
branch:      yt
user:        MatthewTurk
date:        2012-12-16 14:45:55
summary:     Add image deposition to QuadTree.

This allows QuadTree objects (used in projections) to fill image buffers
directly.  My initial tests show this to be faster in all cases for datasets.
However, this depends strongly on the number of data points in the dataset
versus the number of points in the image buffer.  For large, complex datasets,
this always comes ou in favor of the new object.  As an example, a dataset with
8 levels, 3700 grids and 10 million zones -- small, but not trivial -- was
improved from 19 fps to 32 fps with this new method.

This method is not integrated yet, as the pixelizer is also used in a number of
other places.  However, I hope we can dynamically swap pixelizers to use it.
affected #:  3 files

diff -r 70616f2e3057bcd5cc339ef85ea1b11da4d1cdb7 -r 000c2e0741047694b90e6d084005e812bb40751b yt/data_objects/data_containers.py
--- a/yt/data_objects/data_containers.py
+++ b/yt/data_objects/data_containers.py
@@ -1781,10 +1781,16 @@
             self._okay_to_serialize = True
 
     def _get_tree(self, nvals):
-        xd = self.pf.domain_dimensions[x_dict[self.axis]]
-        yd = self.pf.domain_dimensions[y_dict[self.axis]]
+        xax = x_dict[self.axis]
+        yax = y_dict[self.axis]
+        xd = self.pf.domain_dimensions[xax]
+        yd = self.pf.domain_dimensions[yax]
+        bounds = (self.pf.domain_left_edge[xax],
+                  self.pf.domain_right_edge[yax],
+                  self.pf.domain_left_edge[xax],
+                  self.pf.domain_right_edge[yax])
         return QuadTree(np.array([xd,yd], dtype='int64'), nvals,
-                        style = self.proj_style)
+                        bounds, style = self.proj_style)
 
     def _get_dls(self, grid, fields):
         # Place holder for a time when maybe we will not be doing just


diff -r 70616f2e3057bcd5cc339ef85ea1b11da4d1cdb7 -r 000c2e0741047694b90e6d084005e812bb40751b yt/utilities/lib/QuadTree.pyx
--- a/yt/utilities/lib/QuadTree.pyx
+++ b/yt/utilities/lib/QuadTree.pyx
@@ -115,9 +115,11 @@
     cdef int merged
     cdef int num_cells
     cdef QTN_combine *combine
+    cdef np.float64_t bounds[4]
+    cdef np.float64_t dds[2]
 
     def __cinit__(self, np.ndarray[np.int64_t, ndim=1] top_grid_dims,
-                  int nvals, style = "integrate"):
+                  int nvals, bounds, style = "integrate"):
         if style == "integrate":
             self.combine = QTN_add_value
         elif style == "mip":
@@ -133,9 +135,13 @@
         cdef np.float64_t weight_val = 0.0
         self.nvals = nvals
         for i in range(nvals): vals[i] = 0.0
+        for i in range(4):
+            self.bounds[i] = bounds[i]
 
         self.top_grid_dims[0] = top_grid_dims[0]
         self.top_grid_dims[1] = top_grid_dims[1]
+        self.dds[0] = (self.bounds[1] - self.bounds[0])/self.top_grid_dims[0]
+        self.dds[1] = (self.bounds[3] - self.bounds[2])/self.top_grid_dims[1]
 
         # This wouldn't be necessary if we did bitshifting...
         for i in range(80):
@@ -404,6 +410,58 @@
             wtoadd -= node.weight_val
         return added
 
+    @cython.boundscheck(False)
+    @cython.wraparound(False)
+    @cython.cdivision(True)
+    def fill_image(self, np.ndarray[np.float64_t, ndim=2] buffer, _bounds,
+                   int val_index = 0):
+        cdef np.float64_t dds[2], pos[2]
+        cdef int nn[2], i, j
+        cdef np.float64_t bounds[4]
+        for i in range(4):
+            bounds[i] = _bounds[i]
+        for i in range(2):
+            nn[i] = buffer.shape[i]
+            dds[i] = (bounds[i*2 + 1] - bounds[i*2])/nn[i]
+        cdef QuadTreeNode *node
+        pos[0] = bounds[0]
+        for i in range(nn[0]):
+            pos[1] = bounds[2]
+            for j in range(nn[1]):
+                # We start at level zero.  In the future we could optimize by
+                # retaining oct information from previous cells.
+                node = self.find_node_at_pos(pos)
+                buffer[i,j] = node.val[val_index]
+                pos[1] += dds[1]
+            pos[0] += dds[0]
+
+    @cython.boundscheck(False)
+    @cython.wraparound(False)
+    @cython.cdivision(True)
+    cdef QuadTreeNode *find_node_at_pos(self, np.float64_t pos[2]):
+        cdef np.int64_t ind[2]
+        cdef np.float64_t cp[2]
+        cdef np.float64_t dds[2]
+        cdef QuadTreeNode *cur
+        for i in range(2):
+            ind[i] = <np.int64_t> (pos[i]/self.dds[i])
+            cp[i] = (ind[i] + 0.5) * self.dds[i]
+            dds[i] = self.dds[i]
+        cur = self.root_nodes[ind[0]][ind[1]]
+        while cur.children[0][0] != NULL:
+            for i in range(2):
+                # Note that below offset by half a dx for center, after
+                # updating to the next level
+                dds[i] = dds[i] / 2.0
+                if cp[i] < pos[i]:
+                    ind[i] = 0
+                    cp[i] -= dds[i] / 2.0 
+                else:
+                    ind[i] = 1
+                    cp[i] += dds[i] / 2.0
+            cur = cur.children[ind[0]][ind[1]]
+        return cur
+
     def __dealloc__(self):
         cdef int i, j
         for i in range(self.top_grid_dims[0]):


diff -r 70616f2e3057bcd5cc339ef85ea1b11da4d1cdb7 -r 000c2e0741047694b90e6d084005e812bb40751b yt/utilities/parallel_tools/parallel_analysis_interface.py
--- a/yt/utilities/parallel_tools/parallel_analysis_interface.py
+++ b/yt/utilities/parallel_tools/parallel_analysis_interface.py
@@ -799,7 +799,7 @@
                 if target < size:
                     #print "RECEIVING FROM %02i on %02i" % (target, rank)
                     buf = self.recv_quadtree(target, tgd, args)
-                    qto = QuadTree(tgd, args[2])
+                    qto = QuadTree(tgd, args[2], qt.bounds)
                     qto.frombuffer(buf[0], buf[1], buf[2], merge_style)
                     merge_quadtrees(qt, qto, style = merge_style)
                     del qto
@@ -819,7 +819,7 @@
         self.comm.Bcast([buf[2], MPI.DOUBLE], root=0)
         self.refined = buf[0]
         if rank != 0:
-            qt = QuadTree(tgd, args[2])
+            qt = QuadTree(tgd, args[2], qt.bounds)
             qt.frombuffer(buf[0], buf[1], buf[2], merge_style)
         return qt
 



https://bitbucket.org/yt_analysis/yt/changeset/4174ccdee99d/
changeset:   4174ccdee99d
branch:      yt
user:        ngoldbaum
date:        2012-12-18 05:21:08
summary:     Merged in MatthewTurk/yt (pull request #375: Adding some helpers for the IPython notebook)
affected #:  6 files

diff -r 8078b096279969875b4e4fd2fc0e263dbc9bdf77 -r 4174ccdee99da445bf1a92919a3ae41abab53b2f yt/config.py
--- a/yt/config.py
+++ b/yt/config.py
@@ -59,6 +59,7 @@
     hub_url = 'https://hub.yt-project.org/upload',
     hub_api_key = '',
     ipython_notebook = 'False',
+    notebook_password = '',
     answer_testing_tolerance = '3',
     answer_testing_bitwise = 'False',
     gold_standard_filename = 'gold004',


diff -r 8078b096279969875b4e4fd2fc0e263dbc9bdf77 -r 4174ccdee99da445bf1a92919a3ae41abab53b2f yt/data_objects/data_containers.py
--- a/yt/data_objects/data_containers.py
+++ b/yt/data_objects/data_containers.py
@@ -1781,10 +1781,16 @@
             self._okay_to_serialize = True
 
     def _get_tree(self, nvals):
-        xd = self.pf.domain_dimensions[x_dict[self.axis]]
-        yd = self.pf.domain_dimensions[y_dict[self.axis]]
+        xax = x_dict[self.axis]
+        yax = y_dict[self.axis]
+        xd = self.pf.domain_dimensions[xax]
+        yd = self.pf.domain_dimensions[yax]
+        bounds = (self.pf.domain_left_edge[xax],
+                  self.pf.domain_right_edge[yax],
+                  self.pf.domain_left_edge[xax],
+                  self.pf.domain_right_edge[yax])
         return QuadTree(np.array([xd,yd], dtype='int64'), nvals,
-                        style = self.proj_style)
+                        bounds, style = self.proj_style)
 
     def _get_dls(self, grid, fields):
         # Place holder for a time when maybe we will not be doing just


diff -r 8078b096279969875b4e4fd2fc0e263dbc9bdf77 -r 4174ccdee99da445bf1a92919a3ae41abab53b2f yt/imods.py
--- /dev/null
+++ b/yt/imods.py
@@ -0,0 +1,17 @@
+# This custom importer for yt will set up some IPython notebook-specific
+# helpers.  For instance, it will eventually add items to the menubar.
+
+import __builtin__
+if "__IPYTHON__" not in dir(__builtin__):
+    raise ImportError
+
+from IPython.core.interactiveshell import InteractiveShell
+from IPython.core.display import display, display_html
+inst = InteractiveShell.instance()
+ip = inst.get_ipython()
+ip.enable_pylab("inline", import_all=False)
+
+from yt.config import ytcfg
+ytcfg["yt", "ipython_notebook"] = "True"
+
+from yt.mods import *


diff -r 8078b096279969875b4e4fd2fc0e263dbc9bdf77 -r 4174ccdee99da445bf1a92919a3ae41abab53b2f yt/utilities/command_line.py
--- a/yt/utilities/command_line.py
+++ b/yt/utilities/command_line.py
@@ -30,7 +30,7 @@
 from yt.funcs import *
 from yt.utilities.minimal_representation import MinimalProjectDescription
 import argparse, os, os.path, math, sys, time, subprocess, getpass, tempfile
-import urllib, urllib2, base64
+import urllib, urllib2, base64, os
 
 def _fix_pf(arg):
     if os.path.isdir("%s" % arg) and \
@@ -1385,6 +1385,67 @@
         import rpdb
         rpdb.run_rpdb(int(args.task))
 
+class YTNotebookCmd(YTCommand):
+    name = ["notebook"]
+    args = (
+            dict(short="-o", long="--open-browser", action="store_true",
+                 default = False, dest='open_browser',
+                 help="Open a web browser."),
+            dict(short="-p", long="--port", action="store",
+                 default = 0, dest='port',
+                 help="Port to listen on; defaults to auto-detection."),
+            dict(short="-n", long="--no-password", action="store_true",
+                 default = False, dest='no_password',
+                 help="If set, do not prompt or use a password."),
+            )
+    description = \
+        """
+        Run the IPython Notebook
+        """
+    def __call__(self, args):
+        kwargs = {}
+        from IPython.frontend.html.notebook.notebookapp import NotebookApp
+        pw = ytcfg.get("yt", "notebook_password")
+        if len(pw) == 0 and not args.no_password:
+            import IPython.lib
+            pw = IPython.lib.passwd()
+            print "If you would like to use this password in the future,"
+            print "place a line like this inside the [yt] section in your"
+            print "yt configuration file at ~/.yt/config"
+            print
+            print "notebook_password = %s" % pw
+            print
+        elif args.no_password:
+            pw = None
+        if args.port != 0:
+            kwargs['port'] = int(args.port)
+        if pw is not None:
+            kwargs['password'] = pw
+        app = NotebookApp(open_browser=args.open_browser,
+                          **kwargs)
+        app.initialize(argv=[])
+        print
+        print "***************************************************************"
+        print
+        print "The notebook is now live at:"
+        print
+        print "     http://127.0.0.1:%s/" % app.port
+        print
+        print "Recall you can create a new SSH tunnel dynamically by pressing"
+        print "~C and then typing -L%s:localhost:%s" % (app.port, app.port)
+        print
+        print "Additionally, while in the notebook, we recommend you start by"
+        print "replacing 'yt.mods' with 'yt.imods' like so:"
+        print
+        print "    from yt.imods import *"
+        print
+        print "This will enable some IPython-specific extensions to yt."
+        print
+        print "***************************************************************"
+        print
+        app.start()
+
+
 class YTGUICmd(YTCommand):
     name = ["serve", "reason"]
     args = (


diff -r 8078b096279969875b4e4fd2fc0e263dbc9bdf77 -r 4174ccdee99da445bf1a92919a3ae41abab53b2f yt/utilities/lib/QuadTree.pyx
--- a/yt/utilities/lib/QuadTree.pyx
+++ b/yt/utilities/lib/QuadTree.pyx
@@ -115,9 +115,11 @@
     cdef int merged
     cdef int num_cells
     cdef QTN_combine *combine
+    cdef np.float64_t bounds[4]
+    cdef np.float64_t dds[2]
 
     def __cinit__(self, np.ndarray[np.int64_t, ndim=1] top_grid_dims,
-                  int nvals, style = "integrate"):
+                  int nvals, bounds, style = "integrate"):
         if style == "integrate":
             self.combine = QTN_add_value
         elif style == "mip":
@@ -133,9 +135,13 @@
         cdef np.float64_t weight_val = 0.0
         self.nvals = nvals
         for i in range(nvals): vals[i] = 0.0
+        for i in range(4):
+            self.bounds[i] = bounds[i]
 
         self.top_grid_dims[0] = top_grid_dims[0]
         self.top_grid_dims[1] = top_grid_dims[1]
+        self.dds[0] = (self.bounds[1] - self.bounds[0])/self.top_grid_dims[0]
+        self.dds[1] = (self.bounds[3] - self.bounds[2])/self.top_grid_dims[1]
 
         # This wouldn't be necessary if we did bitshifting...
         for i in range(80):
@@ -404,6 +410,58 @@
             wtoadd -= node.weight_val
         return added
 
+    @cython.boundscheck(False)
+    @cython.wraparound(False)
+    @cython.cdivision(True)
+    def fill_image(self, np.ndarray[np.float64_t, ndim=2] buffer, _bounds,
+                   int val_index = 0):
+        cdef np.float64_t dds[2], pos[2]
+        cdef int nn[2], i, j
+        cdef np.float64_t bounds[4]
+        for i in range(4):
+            bounds[i] = _bounds[i]
+        for i in range(2):
+            nn[i] = buffer.shape[i]
+            dds[i] = (bounds[i*2 + 1] - bounds[i*2])/nn[i]
+        cdef QuadTreeNode *node
+        pos[0] = bounds[0]
+        for i in range(nn[0]):
+            pos[1] = bounds[2]
+            for j in range(nn[1]):
+                # We start at level zero.  In the future we could optimize by
+                # retaining oct information from previous cells.
+                node = self.find_node_at_pos(pos)
+                buffer[i,j] = node.val[val_index]
+                pos[1] += dds[1]
+            pos[0] += dds[0]
+
+    @cython.boundscheck(False)
+    @cython.wraparound(False)
+    @cython.cdivision(True)
+    cdef QuadTreeNode *find_node_at_pos(self, np.float64_t pos[2]):
+        cdef np.int64_t ind[2]
+        cdef np.float64_t cp[2]
+        cdef np.float64_t dds[2]
+        cdef QuadTreeNode *cur
+        for i in range(2):
+            ind[i] = <np.int64_t> (pos[i]/self.dds[i])
+            cp[i] = (ind[i] + 0.5) * self.dds[i]
+            dds[i] = self.dds[i]
+        cur = self.root_nodes[ind[0]][ind[1]]
+        while cur.children[0][0] != NULL:
+            for i in range(2):
+                # Note that below offset by half a dx for center, after
+                # updating to the next level
+                dds[i] = dds[i] / 2.0
+                if cp[i] < pos[i]:
+                    ind[i] = 0
+                    cp[i] -= dds[i] / 2.0 
+                else:
+                    ind[i] = 1
+                    cp[i] += dds[i] / 2.0
+            cur = cur.children[ind[0]][ind[1]]
+        return cur
+
     def __dealloc__(self):
         cdef int i, j
         for i in range(self.top_grid_dims[0]):


diff -r 8078b096279969875b4e4fd2fc0e263dbc9bdf77 -r 4174ccdee99da445bf1a92919a3ae41abab53b2f yt/utilities/parallel_tools/parallel_analysis_interface.py
--- a/yt/utilities/parallel_tools/parallel_analysis_interface.py
+++ b/yt/utilities/parallel_tools/parallel_analysis_interface.py
@@ -799,7 +799,7 @@
                 if target < size:
                     #print "RECEIVING FROM %02i on %02i" % (target, rank)
                     buf = self.recv_quadtree(target, tgd, args)
-                    qto = QuadTree(tgd, args[2])
+                    qto = QuadTree(tgd, args[2], qt.bounds)
                     qto.frombuffer(buf[0], buf[1], buf[2], merge_style)
                     merge_quadtrees(qt, qto, style = merge_style)
                     del qto
@@ -819,7 +819,7 @@
         self.comm.Bcast([buf[2], MPI.DOUBLE], root=0)
         self.refined = buf[0]
         if rank != 0:
-            qt = QuadTree(tgd, args[2])
+            qt = QuadTree(tgd, args[2], qt.bounds)
             qt.frombuffer(buf[0], buf[1], buf[2], merge_style)
         return qt

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