[Yt-svn] commit/yt: samskillman: Adding domain_dimensions to FLASH data reader. Note: Currently only

Bitbucket commits-noreply at bitbucket.org
Fri Jun 3 12:50:15 PDT 2011


1 new changeset in yt:

http://bitbucket.org/yt_analysis/yt/changeset/52a205262e15/
changeset:   52a205262e15
branches:    
user:        samskillman
date:        2011-06-03 21:49:52
summary:     Adding domain_dimensions to FLASH data reader.  Note: Currently only
works with FLASH file version 7, since that is the only one I have
access to and have no idea if this is the standard across file
formats.
affected #:  1 file (401 bytes)

--- a/yt/frontends/flash/data_structures.py	Fri Jun 03 01:07:08 2011 -0400
+++ b/yt/frontends/flash/data_structures.py	Fri Jun 03 15:49:52 2011 -0400
@@ -294,6 +294,16 @@
             [self._find_parameter("real", "%smin" % ax) for ax in 'xyz'])
         self.domain_right_edge = na.array(
             [self._find_parameter("real", "%smax" % ax) for ax in 'xyz'])
+
+        # Determine domain dimensions
+        if self._flash_version == 7:
+            self.domain_dimensions = \
+                (self.domain_right_edge - self.domain_left_edge).astype('int64')
+        else:
+            raise RuntimeError("Can't determine FLASH domain_dimensions "+
+                               "for FLASH file version %i." % 
+                               self._flash_version)
+
         if self._flash_version == 7:
             self.current_time = float(
                 self._handle["simulation parameters"][:]["time"])

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