[Yt-svn] yt: More compatibility fixes.
hg at spacepope.org
hg at spacepope.org
Wed Nov 10 10:18:17 PST 2010
hg Repository: yt
details: yt/rev/04eb15b562a5
changeset: 3521:04eb15b562a5
user: Matthew Turk <matthewturk at gmail.com>
date:
Wed Nov 10 10:18:14 2010 -0800
description:
More compatibility fixes.
diffstat:
yt/visualization/volume_rendering/camera.py | 2 ++
yt/visualization/volume_rendering/grid_partitioner.py | 9 +++++++--
2 files changed, 9 insertions(+), 2 deletions(-)
diffs (46 lines):
diff -r 631127648216 -r 04eb15b562a5 yt/visualization/volume_rendering/camera.py
--- a/yt/visualization/volume_rendering/camera.py Wed Nov 10 09:08:51 2010 -0800
+++ b/yt/visualization/volume_rendering/camera.py Wed Nov 10 10:18:14 2010 -0800
@@ -194,6 +194,8 @@
else:
volume = HomogenizedVolume(fields, pf = self.pf,
log_fields = log_fields)
+ else:
+ self.use_kd = isinstance(volume, AMRKDTree)
self.volume = volume
def _setup_normalized_vectors(self, normal_vector, north_vector):
diff -r 631127648216 -r 04eb15b562a5 yt/visualization/volume_rendering/grid_partitioner.py
--- a/yt/visualization/volume_rendering/grid_partitioner.py Wed Nov 10 09:08:51 2010 -0800
+++ b/yt/visualization/volume_rendering/grid_partitioner.py Wed Nov 10 10:18:14 2010 -0800
@@ -43,8 +43,9 @@
class HomogenizedVolume(ParallelAnalysisInterface):
bricks = None
def __init__(self, fields = "Density", source = None, pf = None,
- log_fields = None):
+ log_fields = None, no_ghost = False):
# Typically, initialized as hanging off a hierarchy. But, not always.
+ self.no_ghost = no_ghost
if pf is not None: self.pf = pf
if source is None: source = self.pf.h.all_data()
self.source = source
@@ -75,7 +76,8 @@
# field.
vcds = []
for field, log_field in zip(self.fields, self.log_fields):
- vcd = grid.get_vertex_centered_data(field).astype('float64')
+ vcd = grid.get_vertex_centered_data(field, no_ghost = self.no_ghost)
+ vcd = vcd.astype("float64")
if log_field: vcd = na.log10(vcd)
vcds.append(vcd)
@@ -177,6 +179,9 @@
))
self.bricks = na.array(bricks, dtype='object')
+ def reset_cast(self):
+ pass
+
class HomogenizedBrickCollection(DistributedObjectCollection):
def __init__(self, source):
# The idea here is that we have two sources -- the global_domain
More information about the yt-svn
mailing list