[yt-svn] commit/yt: jzuhone: Fix for FLASH 1-2D datasets. The shape of the bounding box is the same regardless of the code version, at least from 2.x to 4.x. This ensures that the grid bondaries for the non-represented dimensions will be set to the domain boundaries.
Bitbucket
commits-noreply at bitbucket.org
Tue Sep 4 23:34:55 PDT 2012
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/changeset/f39201e9e4c0/
changeset: f39201e9e4c0
branch: stable
user: jzuhone
date: 2012-08-07 23:32:33
summary: Fix for FLASH 1-2D datasets. The shape of the bounding box is the same regardless of the code version, at least from 2.x to 4.x. This ensures that the grid bondaries for the non-represented dimensions will be set to the domain boundaries.
affected #: 1 file
diff -r 2160220a810d53ef32dcbd2b695fdbe626db9e98 -r f39201e9e4c0f668e9afa82e8e9e86c1ab22edfd yt/frontends/flash/data_structures.py
--- a/yt/frontends/flash/data_structures.py
+++ b/yt/frontends/flash/data_structures.py
@@ -107,15 +107,9 @@
self.grid_left_edge[:,i] = DLE[i]
self.grid_right_edge[:,i] = DRE[i]
# We only go up to ND for 2D datasets
- if (f["/bounding box"][:,:,0].shape[1] == ND) :
- #FLASH 2/3 2D data
- self.grid_left_edge[:,:ND] = f["/bounding box"][:,:,0]
- self.grid_right_edge[:,:ND] = f["/bounding box"][:,:,1]
- else:
- self.grid_left_edge[:,:] = f["/bounding box"][:,:,0]
- self.grid_right_edge[:,:] = f["/bounding box"][:,:,1]
-
-
+ self.grid_left_edge[:,:ND] = f["/bounding box"][:,:ND,0]
+ self.grid_right_edge[:,:ND] = f["/bounding box"][:,:ND,1]
+
# Move this to the parameter file
try:
nxb = pf.parameters['nxb']
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