[Yt-svn] yt: Not sure how this got backed out in the merge, but I am re-a...
hg at spacepope.org
hg at spacepope.org
Wed Nov 10 14:02:26 PST 2010
hg Repository: yt
details: yt/rev/8c97e0a35093
changeset: 3526:8c97e0a35093
user: Matthew Turk <matthewturk at gmail.com>
date:
Wed Nov 10 14:02:22 2010 -0800
description:
Not sure how this got backed out in the merge, but I am re-applying it.
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 6e9ce30447f6 -r 8c97e0a35093 yt/visualization/volume_rendering/camera.py
--- a/yt/visualization/volume_rendering/camera.py Wed Nov 10 13:58:26 2010 -0800
+++ b/yt/visualization/volume_rendering/camera.py Wed Nov 10 14:02:22 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 6e9ce30447f6 -r 8c97e0a35093 yt/visualization/volume_rendering/grid_partitioner.py
--- a/yt/visualization/volume_rendering/grid_partitioner.py Wed Nov 10 13:58:26 2010 -0800
+++ b/yt/visualization/volume_rendering/grid_partitioner.py Wed Nov 10 14:02:22 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