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

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Fri Jun 17 05:54:18 PDT 2016


4 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/490800d3090b/
Changeset:   490800d3090b
Branch:      yt
User:        MatthewTurk
Date:        2016-06-16 20:34:57+00:00
Summary:     Only supply a child to octree cell visiting if going to next_level
Affected #:  2 files

diff -r 88532ec0be1dac57a7c5bc2a7e6f4f22e39162a1 -r 490800d3090b41e851b497fe75ec9efedba16afb yt/frontends/ramses/tests/test_outputs.py
--- a/yt/frontends/ramses/tests/test_outputs.py
+++ b/yt/frontends/ramses/tests/test_outputs.py
@@ -48,6 +48,9 @@
         s2 = sum(mask.sum() for block, mask in dobj.blocks)
         yield assert_equal, s1, s2
     assert_equal(ds.particle_type_counts, {'io': 1090895})
+    cgrid = ds.covering_grid(0, left_edge=ds.domain_left_edge, dims=ds.domain_dimensions)
+    density_field = cgrid["density"]
+    assert_equal((density_field == 0.0).sum(), 0)
 
 @requires_file(output_00080)
 def test_RAMSESDataset():

diff -r 88532ec0be1dac57a7c5bc2a7e6f4f22e39162a1 -r 490800d3090b41e851b497fe75ec9efedba16afb yt/geometry/selection_routines.pyx
--- a/yt/geometry/selection_routines.pyx
+++ b/yt/geometry/selection_routines.pyx
@@ -239,7 +239,9 @@
                     spos[2] = pos[2] - sdds[2]/2.0
                     for k in range(2):
                         ch = NULL
-                        if root.children != NULL:
+                        # We only supply a child if we are actually going to
+                        # look at the next level.
+                        if root.children != NULL and next_level == 1:
                             ch = root.children[cind(i, j, k)]
                         if iter == 1 and next_level == 1 and ch != NULL:
                             # Note that visitor.pos is always going to be the


https://bitbucket.org/yt_analysis/yt/commits/8fabcd2a1e7d/
Changeset:   8fabcd2a1e7d
Branch:      yt
User:        MatthewTurk
Date:        2016-06-16 20:43:11+00:00
Summary:     Moving covering grid test from RAMSES to general
Affected #:  2 files

diff -r 490800d3090b41e851b497fe75ec9efedba16afb -r 8fabcd2a1e7d943d0758550b6820e881f8330b70 yt/data_objects/tests/test_covering_grid.py
--- a/yt/data_objects/tests/test_covering_grid.py
+++ b/yt/data_objects/tests/test_covering_grid.py
@@ -2,6 +2,7 @@
 
 from yt.frontends.stream.data_structures import load_particles
 from yt.testing import \
+    requires_file, \
     fake_random_ds, \
     assert_equal, \
     assert_almost_equal
@@ -120,3 +121,11 @@
             ag = ds.arbitrary_grid([0.0, 0.0, 0.0], [1.0, 1.0, 1.0],
                     2**ref_level * ds.domain_dimensions)
             yield assert_almost_equal, cg["density"], ag["density"]
+
+output_00080 = "output_00080/info_00080.txt"
+ at requires_ds(output_00080)
+def test_octree_cg():
+    ds = data_dir_load(output_00080)
+    cgrid = ds.covering_grid(0, left_edge=ds.domain_left_edge, dims=ds.domain_dimensions)
+    density_field = cgrid["density"]
+    assert_equal((density_field == 0.0).sum(), 0)

diff -r 490800d3090b41e851b497fe75ec9efedba16afb -r 8fabcd2a1e7d943d0758550b6820e881f8330b70 yt/frontends/ramses/tests/test_outputs.py
--- a/yt/frontends/ramses/tests/test_outputs.py
+++ b/yt/frontends/ramses/tests/test_outputs.py
@@ -48,9 +48,6 @@
         s2 = sum(mask.sum() for block, mask in dobj.blocks)
         yield assert_equal, s1, s2
     assert_equal(ds.particle_type_counts, {'io': 1090895})
-    cgrid = ds.covering_grid(0, left_edge=ds.domain_left_edge, dims=ds.domain_dimensions)
-    density_field = cgrid["density"]
-    assert_equal((density_field == 0.0).sum(), 0)
 
 @requires_file(output_00080)
 def test_RAMSESDataset():


https://bitbucket.org/yt_analysis/yt/commits/43490e822d15/
Changeset:   43490e822d15
Branch:      yt
User:        MatthewTurk
Date:        2016-06-16 22:19:53+00:00
Summary:     Adding missing import
Affected #:  1 file

diff -r 8fabcd2a1e7d943d0758550b6820e881f8330b70 -r 43490e822d1526c32faba099dad6bf9af6c6922e yt/data_objects/tests/test_covering_grid.py
--- a/yt/data_objects/tests/test_covering_grid.py
+++ b/yt/data_objects/tests/test_covering_grid.py
@@ -6,6 +6,8 @@
     fake_random_ds, \
     assert_equal, \
     assert_almost_equal
+from yt.utilities.answer_testing.framework import \
+    data_dir_load
 
 def setup():
     from yt.config import ytcfg


https://bitbucket.org/yt_analysis/yt/commits/98fd1790d1e0/
Changeset:   98fd1790d1e0
Branch:      yt
User:        MatthewTurk
Date:        2016-06-17 00:54:46+00:00
Summary:     Fixing usage of answer test stuff.
Affected #:  1 file

diff -r 43490e822d1526c32faba099dad6bf9af6c6922e -r 98fd1790d1e0ebdc3b262a8c150b0974d74d1fd6 yt/data_objects/tests/test_covering_grid.py
--- a/yt/data_objects/tests/test_covering_grid.py
+++ b/yt/data_objects/tests/test_covering_grid.py
@@ -1,13 +1,13 @@
 import numpy as np
 
+from yt import \
+    load
 from yt.frontends.stream.data_structures import load_particles
 from yt.testing import \
     requires_file, \
     fake_random_ds, \
     assert_equal, \
     assert_almost_equal
-from yt.utilities.answer_testing.framework import \
-    data_dir_load
 
 def setup():
     from yt.config import ytcfg
@@ -125,9 +125,9 @@
             yield assert_almost_equal, cg["density"], ag["density"]
 
 output_00080 = "output_00080/info_00080.txt"
- at requires_ds(output_00080)
+ at requires_file(output_00080)
 def test_octree_cg():
-    ds = data_dir_load(output_00080)
+    ds = load(output_00080)
     cgrid = ds.covering_grid(0, left_edge=ds.domain_left_edge, dims=ds.domain_dimensions)
     density_field = cgrid["density"]
     assert_equal((density_field == 0.0).sum(), 0)

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