[yt-svn] commit/yt: jzuhone: Merged in MatthewTurk/yt/yt-3.0 (pull request #974)
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Mon Jul 14 10:45:54 PDT 2014
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/commits/09146962c600/
Changeset: 09146962c600
Branch: yt-3.0
User: jzuhone
Date: 2014-07-14 19:45:42
Summary: Merged in MatthewTurk/yt/yt-3.0 (pull request #974)
Fixing non-Cartesian flash bounding box
Affected #: 1 file
diff -r d091dd64ed463b8feae5398375e8ab327baeb47a -r 09146962c600a00acc3200043f73f44bd0221f3b yt/frontends/flash/data_structures.py
--- a/yt/frontends/flash/data_structures.py
+++ b/yt/frontends/flash/data_structures.py
@@ -141,11 +141,21 @@
# Because we don't care about units, we're going to operate on views.
gle = self.grid_left_edge.ndarray_view()
gre = self.grid_right_edge.ndarray_view()
+ geom = self.parameter_file.geometry
+ if geom != 'cartesian' and ND < 3:
+ if geom == 'spherical' and ND < 2:
+ gle[:,1] = 0.0
+ gre[:,1] = np.pi
+ gle[:,2] = 0.0
+ gre[:,2] = 2.0 * np.pi
+ return
+
+ # Now, for cartesian data.
for i in xrange(self.num_grids):
dx = dxs[self.grid_levels[i],:]
gle[i][:ND] = np.rint(gle[i][:ND]/dx[0][:ND])*dx[0][:ND]
gre[i][:ND] = np.rint(gre[i][:ND]/dx[0][:ND])*dx[0][:ND]
-
+
def _populate_grid_objects(self):
# We only handle 3D data, so offset is 7 (nfaces+1)
@@ -363,6 +373,9 @@
elif self.dimensionality < 3 and self.geometry == "polar":
mylog.warning("Extending theta dimension to 2PI + left edge.")
self.domain_right_edge[1] = self.domain_left_edge[1] + 2*np.pi
+ elif self.dimensionality < 3 and self.geometry == "spherical":
+ mylog.warning("Extending phi dimension to 2PI + left edge.")
+ self.domain_right_edge[2] = self.domain_left_edge[2] + 2*np.pi
self.domain_dimensions = \
np.array([nblockx*nxb,nblocky*nyb,nblockz*nzb])
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