[yt-svn] commit/yt-3.0: MatthewTurk: The IO handler needs to exist for the SPH data before the Octree can be
Bitbucket
commits-noreply at bitbucket.org
Thu Jan 10 07:41:07 PST 2013
1 new commit in yt-3.0:
https://bitbucket.org/yt_analysis/yt-3.0/commits/24cd112f134b/
changeset: 24cd112f134b
branch: yt-3.0
user: MatthewTurk
date: 2013-01-10 16:36:32
summary: The IO handler needs to exist for the SPH data before the Octree can be
generated, but it needs to be created after creating the geometry for other
data files. This is something that can and should be simplified in the future.
affected #: 2 files
diff -r 789bd796e365b1d277569ac4b0c3c5e0630f4504 -r 24cd112f134bde038875e3bdd2fb9c270b8f126c yt/frontends/sph/data_structures.py
--- a/yt/frontends/sph/data_structures.py
+++ b/yt/frontends/sph/data_structures.py
@@ -105,6 +105,7 @@
super(ParticleGeometryHandler, self).__init__(pf, data_style)
def _initialize_oct_handler(self):
+ self._setup_data_io()
template = self.parameter_file.domain_template
ndoms = self.parameter_file.domain_count
self.domains = [ParticleDomainFile(self.parameter_file, self.io, template % i, i)
diff -r 789bd796e365b1d277569ac4b0c3c5e0630f4504 -r 24cd112f134bde038875e3bdd2fb9c270b8f126c yt/geometry/geometry_handler.py
--- a/yt/geometry/geometry_handler.py
+++ b/yt/geometry/geometry_handler.py
@@ -59,12 +59,12 @@
mylog.debug("Setting up classes.")
self._setup_classes()
+ mylog.debug("Setting up domain geometry.")
+ self._setup_geometry()
+
mylog.debug("Initializing data grid data IO")
self._setup_data_io()
- mylog.debug("Setting up domain geometry.")
- self._setup_geometry()
-
mylog.debug("Detecting fields.")
self._detect_fields()
@@ -200,6 +200,7 @@
f.close()
def _setup_data_io(self):
+ if getattr(self, "io", None) is not None: return
self.io = io_registry[self.data_style]()
def _save_data(self, array, node, name, set_attr=None, force=False, passthrough = False):
Repository URL: https://bitbucket.org/yt_analysis/yt-3.0/
--
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