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

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Thu Nov 6 07:33:56 PST 2014


2 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/e71a8ba04ba2/
Changeset:   e71a8ba04ba2
Branch:      yt
User:        jzuhone
Date:        2014-11-05 22:09:26+00:00
Summary:     Check for particle fields in chunks.
Affected #:  1 file

diff -r 072728c9e45816127efc793be46ff045fafe96cd -r e71a8ba04ba2617938cb9c5c07b70ceca0eaa74d yt/frontends/flash/io.py
--- a/yt/frontends/flash/io.py
+++ b/yt/frontends/flash/io.py
@@ -21,6 +21,7 @@
 from yt.utilities.io_handler import \
     BaseIOHandler
 from yt.utilities.logger import ytLogger as mylog
+from yt.geometry.selection_routines import AlwaysSelector
 
 # http://stackoverflow.com/questions/2361945/detecting-consecutive-integers-in-a-list
 def particle_sequences(grids):
@@ -132,7 +133,19 @@
         rv = {}
         for g in chunk.objs:
             rv[g.id] = {}
-        for field in fields:
+        # Split into particles and non-particles
+        fluid_fields, particle_fields = [], []
+        for ftype, fname in fields:
+            if ftype in self.ds.particle_types:
+                particle_fields.append((ftype, fname))
+            else:
+                fluid_fields.append((ftype, fname))
+        if len(particle_fields) > 0:
+            selector = AlwaysSelector(self.ds)
+            rv.update(self._read_particle_selection(
+                [chunk], selector, particle_fields))
+        if len(fluid_fields) == 0: return rv
+        for field in fluid_fields:
             ftype, fname = field
             ds = f["/%s" % fname]
             ind = 0


https://bitbucket.org/yt_analysis/yt/commits/e10d3ebcfdd9/
Changeset:   e10d3ebcfdd9
Branch:      yt
User:        MatthewTurk
Date:        2014-11-06 15:33:47+00:00
Summary:     Merged in jzuhone/yt (pull request #1294)

[BUGFIX] Check for particle fields in chunks for FLASH data
Affected #:  1 file

diff -r e433a9791f5dadcd5de80c5d9f801526335455de -r e10d3ebcfdd9e72a8d3d9873c832321351e3b08c yt/frontends/flash/io.py
--- a/yt/frontends/flash/io.py
+++ b/yt/frontends/flash/io.py
@@ -21,6 +21,7 @@
 from yt.utilities.io_handler import \
     BaseIOHandler
 from yt.utilities.logger import ytLogger as mylog
+from yt.geometry.selection_routines import AlwaysSelector
 
 # http://stackoverflow.com/questions/2361945/detecting-consecutive-integers-in-a-list
 def particle_sequences(grids):
@@ -132,7 +133,19 @@
         rv = {}
         for g in chunk.objs:
             rv[g.id] = {}
-        for field in fields:
+        # Split into particles and non-particles
+        fluid_fields, particle_fields = [], []
+        for ftype, fname in fields:
+            if ftype in self.ds.particle_types:
+                particle_fields.append((ftype, fname))
+            else:
+                fluid_fields.append((ftype, fname))
+        if len(particle_fields) > 0:
+            selector = AlwaysSelector(self.ds)
+            rv.update(self._read_particle_selection(
+                [chunk], selector, particle_fields))
+        if len(fluid_fields) == 0: return rv
+        for field in fluid_fields:
             ftype, fname = field
             ds = f["/%s" % fname]
             ind = 0

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