[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 Aug 7 14:41:32 PDT 2012
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/changeset/a0d43ccae65d/
changeset: a0d43ccae65d
branch: yt
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 1bb45063e8a2fb18c18b095f37fd96aae422e7b3 -r a0d43ccae65d9bfe84532a9fb563ae0ab341c8c8 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