[yt-svn] commit/yt: 4 new changesets

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Mon Jul 14 10:45:51 PDT 2014


4 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/c9eefd46fc5c/
Changeset:   c9eefd46fc5c
Branch:      yt-3.0
User:        MatthewTurk
Date:        2014-06-24 04:06:36
Summary:     Fixing right edge for spherical.
Affected #:  1 file

diff -r 90a72476866588cb0f92183e4f63daaef4f729ea -r c9eefd46fc5cfaecf7068acb63b7a0ede6004d22 yt/frontends/flash/data_structures.py
--- a/yt/frontends/flash/data_structures.py
+++ b/yt/frontends/flash/data_structures.py
@@ -145,7 +145,7 @@
             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)
         
@@ -356,6 +356,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 PI/2.0 + left edge.")
+            self.domain_right_edge[2] = self.domain_left_edge[2] + np.pi/2.0
         self.domain_dimensions = \
             np.array([nblockx*nxb,nblocky*nyb,nblockz*nzb])
 


https://bitbucket.org/yt_analysis/yt/commits/297fd638609f/
Changeset:   297fd638609f
Branch:      yt-3.0
User:        MatthewTurk
Date:        2014-06-24 15:20:35
Summary:     Fixing bounding box for non-Cartesian.
Affected #:  1 file

diff -r c9eefd46fc5cfaecf7068acb63b7a0ede6004d22 -r 297fd638609f3b3e032b34c6709b8348bf4ece16 yt/frontends/flash/data_structures.py
--- a/yt/frontends/flash/data_structures.py
+++ b/yt/frontends/flash/data_structures.py
@@ -141,6 +141,18 @@
         # 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()
+        if self.parameter_file.geometry != 'cartesian' and ND < 3:
+            # We have a special fix for these files.
+            # The bounding box for grids is off by a factor of block[xyz] * 180
+            # for all the non-suppressed dimensions if dimensionality < 3.
+            # So, we correct that here.  We don't do anything with the r block.
+            for i, ax in zip(range(1,ND), 'yz'):
+                fac = 180 * self.parameter_file.parameters['nblock%s' % ax]
+                gle[:,i] *= fac
+                gre[:,i] *= fac
+            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]
@@ -357,8 +369,8 @@
             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 PI/2.0 + left edge.")
-            self.domain_right_edge[2] = self.domain_left_edge[2] + np.pi/2.0
+            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])
 


https://bitbucket.org/yt_analysis/yt/commits/cf23aa10d5cf/
Changeset:   cf23aa10d5cf
Branch:      yt-3.0
User:        MatthewTurk
Date:        2014-07-14 19:36:38
Summary:     Make this clearer for suppressed dimensions.
Affected #:  1 file

diff -r 297fd638609f3b3e032b34c6709b8348bf4ece16 -r cf23aa10d5cf8f4023f74a9969778f2c820511b3 yt/frontends/flash/data_structures.py
--- a/yt/frontends/flash/data_structures.py
+++ b/yt/frontends/flash/data_structures.py
@@ -141,15 +141,13 @@
         # 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()
-        if self.parameter_file.geometry != 'cartesian' and ND < 3:
-            # We have a special fix for these files.
-            # The bounding box for grids is off by a factor of block[xyz] * 180
-            # for all the non-suppressed dimensions if dimensionality < 3.
-            # So, we correct that here.  We don't do anything with the r block.
-            for i, ax in zip(range(1,ND), 'yz'):
-                fac = 180 * self.parameter_file.parameters['nblock%s' % ax]
-                gle[:,i] *= fac
-                gre[:,i] *= fac
+        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.


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