[yt-svn] commit/yt: 2 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Wed Oct 16 09:52:02 PDT 2013
2 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/e501411f9b23/
Changeset: e501411f9b23
Branch: yt
User: MatthewTurk
Date: 2013-10-10 21:12:59
Summary: Adding a lock_grids_to_parents function.
Affected #: 1 file
diff -r 725c3037c6e7be96c5eff3c67103993251a36650 -r e501411f9b23296bfd1b8ec7a5b8ad1359866e42 yt/data_objects/hierarchy.py
--- a/yt/data_objects/hierarchy.py
+++ b/yt/data_objects/hierarchy.py
@@ -395,6 +395,23 @@
[self.grid_left_edge[:,0], self.grid_right_edge[:,1], self.grid_right_edge[:,2]],
], dtype='float64')
+ def lock_grids_to_parents(self):
+ r"""This function locks grid edges to their parents.
+
+ This is useful in cases where the grid structure may be somewhat
+ irregular, or where setting the left and right edges is a lossy
+ process. It is designed to correct situations where left/right edges
+ may be set slightly incorrectly, resulting in discontinuities in images
+ and the like.
+ """
+ mylog.info("Locking grids to parents.")
+ for i, g in enumerate(self.grids):
+ si = g.get_global_startindex()
+ g.LeftEdge = self.pf.domain_left_edge + g.dds * si
+ g.RightEdge = g.LeftEdge + g.ActiveDimensions * g.dds
+ self.grid_left_edge[i,:] = g.LeftEdge
+ self.grid_right_edge[i,:] = g.RightEdge
+
def print_stats(self):
"""
Prints out (stdout) relevant information about the simulation
https://bitbucket.org/yt_analysis/yt/commits/c2b8455b43a6/
Changeset: c2b8455b43a6
Branch: yt
User: samskillman
Date: 2013-10-16 18:51:57
Summary: Merged in MatthewTurk/yt (pull request #615)
Adding a lock_grids_to_parents function.
Affected #: 1 file
diff -r adc3d4a95fc3d9f47da60319d506dcac57e8a0f9 -r c2b8455b43a67b78aa01953daf000dcca10aa8cb yt/data_objects/hierarchy.py
--- a/yt/data_objects/hierarchy.py
+++ b/yt/data_objects/hierarchy.py
@@ -395,6 +395,23 @@
[self.grid_left_edge[:,0], self.grid_right_edge[:,1], self.grid_right_edge[:,2]],
], dtype='float64')
+ def lock_grids_to_parents(self):
+ r"""This function locks grid edges to their parents.
+
+ This is useful in cases where the grid structure may be somewhat
+ irregular, or where setting the left and right edges is a lossy
+ process. It is designed to correct situations where left/right edges
+ may be set slightly incorrectly, resulting in discontinuities in images
+ and the like.
+ """
+ mylog.info("Locking grids to parents.")
+ for i, g in enumerate(self.grids):
+ si = g.get_global_startindex()
+ g.LeftEdge = self.pf.domain_left_edge + g.dds * si
+ g.RightEdge = g.LeftEdge + g.ActiveDimensions * g.dds
+ self.grid_left_edge[i,:] = g.LeftEdge
+ self.grid_right_edge[i,:] = g.RightEdge
+
def print_stats(self):
"""
Prints out (stdout) relevant information about the simulation
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