[yt-svn] commit/yt-3.0: 2 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Wed Sep 25 14:45:17 PDT 2013
2 new commits in yt-3.0:
https://bitbucket.org/yt_analysis/yt-3.0/commits/94a0f84b9d56/
Changeset: 94a0f84b9d56
Branch: yt-3.0
User: MatthewTurk
Date: 2013-09-25 23:22:39
Summary: This adds an "ires_factor". This may only be necessary for QuadTrees on non
refine_by==2 simulations.
Affected #: 2 files
diff -r 2176d83193f2471755399d84ad03894f3ac2da1c -r 94a0f84b9d56035c3d51d840f0b1054969bc136b yt/data_objects/construction_data_containers.py
--- a/yt/data_objects/construction_data_containers.py
+++ b/yt/data_objects/construction_data_containers.py
@@ -327,7 +327,7 @@
icoords = chunk.icoords
i1 = icoords[:,x_dict[self.axis]]
i2 = icoords[:,y_dict[self.axis]]
- ilevel = chunk.ires
+ ilevel = chunk.ires * self.pf.ires_factor
tree.initialize_chunk(i1, i2, ilevel)
def _handle_chunk(self, chunk, fields, tree):
@@ -347,7 +347,7 @@
icoords = chunk.icoords
i1 = icoords[:,x_dict[self.axis]]
i2 = icoords[:,y_dict[self.axis]]
- ilevel = chunk.ires
+ ilevel = chunk.ires * self.pf.ires_factor
tree.add_chunk_to_tree(i1, i2, ilevel, v, w)
def to_pw(self, fields=None, center='c', width=None, axes_unit=None,
diff -r 2176d83193f2471755399d84ad03894f3ac2da1c -r 94a0f84b9d56035c3d51d840f0b1054969bc136b yt/data_objects/static_output.py
--- a/yt/data_objects/static_output.py
+++ b/yt/data_objects/static_output.py
@@ -314,6 +314,13 @@
return self._last_finfo
raise YTFieldNotFound((ftype, fname), self)
+ @property
+ def ires_factor(self):
+ o2 = np.log2(self.refine_by)
+ if o2 != int(o2):
+ raise RuntimeError
+ return int(o2)
+
def _reconstruct_pf(*args, **kwargs):
pfs = ParameterFileStore()
pf = pfs.get_pf_hash(*args)
https://bitbucket.org/yt_analysis/yt-3.0/commits/ffe02b75db66/
Changeset: ffe02b75db66
Branch: yt-3.0
User: samskillman
Date: 2013-09-25 23:45:14
Summary: Merged in MatthewTurk/yt-3.0 (pull request #103)
Adding an ires_factor
Affected #: 2 files
diff -r 3c52df9a894a07495e562c37e9becf280fe6225e -r ffe02b75db66bc53abbc73f933a7f7c223bc63b3 yt/data_objects/construction_data_containers.py
--- a/yt/data_objects/construction_data_containers.py
+++ b/yt/data_objects/construction_data_containers.py
@@ -327,7 +327,7 @@
icoords = chunk.icoords
i1 = icoords[:,x_dict[self.axis]]
i2 = icoords[:,y_dict[self.axis]]
- ilevel = chunk.ires
+ ilevel = chunk.ires * self.pf.ires_factor
tree.initialize_chunk(i1, i2, ilevel)
def _handle_chunk(self, chunk, fields, tree):
@@ -347,7 +347,7 @@
icoords = chunk.icoords
i1 = icoords[:,x_dict[self.axis]]
i2 = icoords[:,y_dict[self.axis]]
- ilevel = chunk.ires
+ ilevel = chunk.ires * self.pf.ires_factor
tree.add_chunk_to_tree(i1, i2, ilevel, v, w)
def to_pw(self, fields=None, center='c', width=None, axes_unit=None,
diff -r 3c52df9a894a07495e562c37e9becf280fe6225e -r ffe02b75db66bc53abbc73f933a7f7c223bc63b3 yt/data_objects/static_output.py
--- a/yt/data_objects/static_output.py
+++ b/yt/data_objects/static_output.py
@@ -314,6 +314,13 @@
return self._last_finfo
raise YTFieldNotFound((ftype, fname), self)
+ @property
+ def ires_factor(self):
+ o2 = np.log2(self.refine_by)
+ if o2 != int(o2):
+ raise RuntimeError
+ return int(o2)
+
def _reconstruct_pf(*args, **kwargs):
pfs = ParameterFileStore()
pf = pfs.get_pf_hash(*args)
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