[Yt-svn] commit/yt: MatthewTurk: Change the way add_field is called to ensure that it works correctly for

Bitbucket commits-noreply at bitbucket.org
Mon Apr 25 08:30:28 PDT 2011


1 new changeset in yt:

http://bitbucket.org/yt_analysis/yt/changeset/f5f5d513bfbf/
changeset:   r4199:f5f5d513bfbf
branch:      stable
user:        MatthewTurk
date:        2011-04-25 17:27:48
summary:     Change the way add_field is called to ensure that it works correctly for
multi-D field info containers.
affected #:  1 file (225 bytes)

--- a/yt/frontends/enzo/data_structures.py	Fri Apr 22 06:50:30 2011 -0400
+++ b/yt/frontends/enzo/data_structures.py	Mon Apr 25 11:27:48 2011 -0400
@@ -415,8 +415,13 @@
                         return data.convert(f)
                     return _convert_function
                 cf = external_wrapper(field)
-            add_enzo_field(field, lambda a, b: None,
-                           convert_function=cf, take_log=False)
+            # Note that we call add_field on the field_info directly.  This
+            # will allow the same field detection mechanism to work for 1D, 2D
+            # and 3D fields.
+            self.pf.field_info.add_field(
+                    field, lambda a, b: None,
+                    convert_function=cf, take_log=False)
+            
 
     def _setup_derived_fields(self):
         self.derived_field_list = []

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