[yt-svn] commit/yt: ngoldbaum: Merged in langmm/yt (pull request #2281)
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Sat Jul 16 15:50:12 PDT 2016
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/commits/376a5fe19dff/
Changeset: 376a5fe19dff
Branch: yt
User: ngoldbaum
Date: 2016-07-16 22:49:43+00:00
Summary: Merged in langmm/yt (pull request #2281)
Added Exception to AMRKDTree in the case of particle of oct-based data (Closes Issue #1215)
Affected #: 1 file
diff -r be5b44a0d960e1d4c553b1df7a2390a20623fd1d -r 376a5fe19dff3c6dc729c74587d33af1e0798848 yt/utilities/amr_kdtree/amr_kdtree.py
--- a/yt/utilities/amr_kdtree/amr_kdtree.py
+++ b/yt/utilities/amr_kdtree/amr_kdtree.py
@@ -30,6 +30,7 @@
ParallelAnalysisInterface
from yt.utilities.lib.partitioned_grid import PartitionedGrid
from yt.utilities.math_utils import periodic_position
+from yt.geometry.grid_geometry_handler import GridIndex
steps = np.array([[-1, -1, -1], [-1, -1, 0], [-1, -1, 1],
[-1, 0, -1], [-1, 0, 0], [-1, 0, 1],
@@ -139,6 +140,11 @@
class AMRKDTree(ParallelAnalysisInterface):
+ r"""A KDTree for AMR data.
+
+ Not applicable to particle or octree-based datasets.
+
+ """
fields = None
log_fields = None
@@ -147,6 +153,9 @@
def __init__(self, ds, min_level=None, max_level=None,
data_source=None):
+ if not issubclass(ds.index.__class__, GridIndex):
+ raise RuntimeError("AMRKDTree does not support particle or octree-based data.")
+
ParallelAnalysisInterface.__init__(self)
self.ds = ds
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