[Yt-svn] commit/yt: jzuhone: This allows yt to grab the FLASH face-centered variables as well as the cell-centered ones. As of now, no support for handling the coordinates at the face centers... at the moment this is for allowing the creation of cell-centered derived fields from face-centered ones.

Bitbucket commits-noreply at bitbucket.org
Mon Jun 20 13:30:01 PDT 2011


1 new changeset in yt:

http://bitbucket.org/yt_analysis/yt/changeset/42a9aab01491/
changeset:   42a9aab01491
branch:      yt
user:        jzuhone
date:        2011-06-20 22:29:49
summary:     This allows yt to grab the FLASH face-centered variables as well as the cell-centered ones. As of now, no support for handling the coordinates at the face centers... at the moment this is for allowing the creation of cell-centered derived fields from face-centered ones.
affected #:  1 file (261 bytes)

--- a/yt/frontends/flash/data_structures.py	Wed Jun 15 10:55:57 2011 -0400
+++ b/yt/frontends/flash/data_structures.py	Mon Jun 20 16:29:49 2011 -0400
@@ -84,6 +84,12 @@
     def _detect_fields(self):
         ncomp = self._handle["/unknown names"].shape[0]
         self.field_list = [s for s in self._handle["/unknown names"][:].flat]
+        facevars = [s for s in self._handle
+                    if s.startswith(("fcx","fcy","fcz")) and s[-1].isdigit()]
+        nfacevars = len(facevars)
+        if (nfacevars > 0) :
+            ncomp += nfacevars
+            self.field_list.append(facevars)
         if ("/particle names" in self._handle) :
             self.field_list += ["particle_" + s[0].strip() for s
                                 in self._handle["/particle names"][:]]

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