[yt-svn] commit/yt: ngoldbaum: Backed out changeset 3bf3e6debda2

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Tue Jul 30 08:54:38 PDT 2013


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/9095ffb28958/
Changeset:   9095ffb28958
Branch:      yt
User:        ngoldbaum
Date:        2013-07-30 17:47:26
Summary:     Backed out changeset 3bf3e6debda2
Affected #:  1 file

diff -r 3bf3e6debda2772f6cd0026fe71b787a64f5ada9 -r 9095ffb28958788842dcbe76bcf61070dab6df8d yt/data_objects/universal_fields.py
--- a/yt/data_objects/universal_fields.py
+++ b/yt/data_objects/universal_fields.py
@@ -800,8 +800,6 @@
     if any(data.pf.periodicity):
         rdw = radius.copy()
     for i, ax in enumerate('xyz'):
-        if data.pf.dimensionality < i+1:
-            break
         np.subtract(data["%s%s" % (field_prefix, ax)], center[i], r)
         if data.pf.periodicity[i] == True:
             np.abs(r, r)
@@ -1015,8 +1013,7 @@
     units of Gauss. If you use MKS, make sure to write your own
     MagneticEnergy field to deal with non-unitary \mu_0.
     """
-    return data['CellVolume'] * \
-        (data["Bx"]**2 + data["By"]**2 + data["Bz"]**2)/(8*np.pi)
+    return (data["Bx"]**2 + data["By"]**2 + data["Bz"]**2)/(8*np.pi)
 add_field("MagneticEnergy",function=_MagneticEnergy,
           units=r"\rm{ergs}\/\rm{cm}^{-3}",
           display_name=r"\rm{Magnetic}\/\rm{Energy}")

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