[yt-svn] commit/yt: ngoldbaum: Fixing dz for 2D AMR data, the dz of the child should be the same as the parent in 2D.
Bitbucket
commits-noreply at bitbucket.org
Fri Sep 21 12:09:44 PDT 2012
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/changeset/ae3f6a9e07a1/
changeset: ae3f6a9e07a1
branch: yt
user: ngoldbaum
date: 2012-09-21 21:04:07
summary: Fixing dz for 2D AMR data, the dz of the child should be the same as the parent in 2D.
affected #: 1 file
diff -r 664d83ff5ace2571cd77516ec3c0cf5fb35da771 -r ae3f6a9e07a18644470391eaa684434ffc14bb8a yt/data_objects/grid_patch.py
--- a/yt/data_objects/grid_patch.py
+++ b/yt/data_objects/grid_patch.py
@@ -210,6 +210,8 @@
LE, RE = self.hierarchy.grid_left_edge[id,:], \
self.hierarchy.grid_right_edge[id,:]
self.dds = np.array((RE - LE) / self.ActiveDimensions)
+ if self.pf.dimensionality < 2: self.dds[1] = self.pf.domain_right_edge[1] - self.pf.domain_left_edge[1]
+ if self.pf.dimensionality < 3: self.dds[2] = self.pf.domain_right_edge[2] - self.pf.domain_left_edge[2]
self.field_data['dx'], self.field_data['dy'], self.field_data['dz'] = self.dds
@property
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