[yt-svn] commit/yt: 2 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Thu Sep 19 00:53:00 PDT 2013
2 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/9b39727660d2/
Changeset: 9b39727660d2
Branch: yt
User: MatthewTurk
Date: 2013-09-17 23:14:58
Summary: For some pathological cases, we can hit corners.
This helps to normalize the errors that can creep in from this. Anthony and I
were seeing problems on the order of 1e-17 or so.
Affected #: 1 file
diff -r 629b16f593192d87c080f969236bca9c0881a366 -r 9b39727660d2d9f0dcbb63cfe25b3534eb03dd92 yt/utilities/lib/grid_traversal.pyx
--- a/yt/utilities/lib/grid_traversal.pyx
+++ b/yt/utilities/lib/grid_traversal.pyx
@@ -953,6 +953,14 @@
tl = (vc.right_edge[i] - v_pos[i])*iv_dir[i]
temp_x = (v_pos[x] + tl*v_dir[x])
temp_y = (v_pos[y] + tl*v_dir[y])
+ if fabs(temp_x - vc.left_edge[x]) < 1e-10*vc.dds[x]:
+ temp_x = vc.left_edge[x]
+ elif fabs(temp_x - vc.right_edge[x]) < 1e-10*vc.dds[x]:
+ temp_x = vc.right_edge[x]
+ if fabs(temp_y - vc.left_edge[y]) < 1e-10*vc.dds[y]:
+ temp_y = vc.left_edge[y]
+ elif fabs(temp_y - vc.right_edge[y]) < 1e-10*vc.dds[y]:
+ temp_y = vc.right_edge[y]
if vc.left_edge[x] <= temp_x and temp_x <= vc.right_edge[x] and \
vc.left_edge[y] <= temp_y and temp_y <= vc.right_edge[y] and \
0.0 <= tl and tl < intersect_t:
https://bitbucket.org/yt_analysis/yt/commits/21dcf6d1ff83/
Changeset: 21dcf6d1ff83
Branch: yt
User: xarthisius
Date: 2013-09-19 09:52:54
Summary: Merged in MatthewTurk/yt (pull request #599)
Fix an issue with hitting corners in the walk_volume function
Affected #: 1 file
diff -r f793b5d63cb91f99ebb7656df021da11ed474808 -r 21dcf6d1ff83ef77cd89732d49c68ff12702f09d yt/utilities/lib/grid_traversal.pyx
--- a/yt/utilities/lib/grid_traversal.pyx
+++ b/yt/utilities/lib/grid_traversal.pyx
@@ -953,6 +953,14 @@
tl = (vc.right_edge[i] - v_pos[i])*iv_dir[i]
temp_x = (v_pos[x] + tl*v_dir[x])
temp_y = (v_pos[y] + tl*v_dir[y])
+ if fabs(temp_x - vc.left_edge[x]) < 1e-10*vc.dds[x]:
+ temp_x = vc.left_edge[x]
+ elif fabs(temp_x - vc.right_edge[x]) < 1e-10*vc.dds[x]:
+ temp_x = vc.right_edge[x]
+ if fabs(temp_y - vc.left_edge[y]) < 1e-10*vc.dds[y]:
+ temp_y = vc.left_edge[y]
+ elif fabs(temp_y - vc.right_edge[y]) < 1e-10*vc.dds[y]:
+ temp_y = vc.right_edge[y]
if vc.left_edge[x] <= temp_x and temp_x <= vc.right_edge[x] and \
vc.left_edge[y] <= temp_y and temp_y <= vc.right_edge[y] and \
0.0 <= tl and tl < intersect_t:
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