[Yt-svn] commit/yt: 2 new changesets
Bitbucket
commits-noreply at bitbucket.org
Wed Jul 13 08:35:17 PDT 2011
2 new changesets in yt:
http://bitbucket.org/yt_analysis/yt/changeset/1df9764fde44/
changeset: 1df9764fde44
branch: yt
user: samskillman
date: 2011-07-11 22:37:49
summary: For now, reduce used processors to next lowest power of 2 in kd-tree rendering. Working on a generalization...
affected #: 1 file (64 bytes)
--- a/yt/utilities/amr_kdtree/amr_kdtree.py Thu Jun 30 18:44:11 2011 -0700
+++ b/yt/utilities/amr_kdtree/amr_kdtree.py Mon Jul 11 14:37:49 2011 -0600
@@ -813,8 +813,8 @@
current_node.r_corner = r_corner
# current_node.owner = my_rank
current_node.id = 0
- par_tree_depth = long(na.log2(nprocs))
-
+ par_tree_depth = int(na.log2(nprocs))
+ anprocs = 2**par_tree_depth
while current_node is not None:
# If we don't have any grids, that means we are revisiting
# a dividing node, and there is nothing to be done.
@@ -825,8 +825,8 @@
# This is where all the domain decomposition occurs.
if ((current_node.id + 1)>>par_tree_depth) == 1:
- # There are nprocs nodes that meet this criteria
- if (current_node.id+1-nprocs) is my_rank:
+ # There are anprocs nodes that meet this criteria
+ if (current_node.id+1-anprocs) is my_rank:
# I own this shared node
self.my_l_corner = current_node.l_corner
self.my_r_corner = current_node.r_corner
@@ -973,11 +973,11 @@
if image is not None:
self.image = image
rounds = int(na.log2(nprocs))
-
+ anprocs = 2**rounds
my_node = tree
my_node_id = 0
my_node.owner = 0
- path = na.binary_repr(nprocs+my_rank)
+ path = na.binary_repr(anprocs+my_rank)
for i in range(rounds):
my_node.left_child.owner = my_node.owner
my_node.right_child.owner = my_node.owner + 2**(rounds-(i+1))
http://bitbucket.org/yt_analysis/yt/changeset/b01d5a18102a/
changeset: b01d5a18102a
branch: yt
user: samskillman
date: 2011-07-13 17:33:56
summary: Use pf.dimensionality in DivV calculation.
affected #: 1 file (94 bytes)
--- a/yt/data_objects/universal_fields.py Mon Jul 11 14:37:49 2011 -0600
+++ b/yt/data_objects/universal_fields.py Wed Jul 13 09:33:56 2011 -0600
@@ -525,12 +525,14 @@
ds = div_fac * data['dx'].flat[0]
f = data["x-velocity"][sl_right,1:-1,1:-1]/ds
f -= data["x-velocity"][sl_left ,1:-1,1:-1]/ds
- ds = div_fac * data['dy'].flat[0]
- f += data["y-velocity"][1:-1,sl_right,1:-1]/ds
- f -= data["y-velocity"][1:-1,sl_left ,1:-1]/ds
- ds = div_fac * data['dz'].flat[0]
- f += data["z-velocity"][1:-1,1:-1,sl_right]/ds
- f -= data["z-velocity"][1:-1,1:-1,sl_left ]/ds
+ if data.pf.dimensionality > 1:
+ ds = div_fac * data['dy'].flat[0]
+ f += data["y-velocity"][1:-1,sl_right,1:-1]/ds
+ f -= data["y-velocity"][1:-1,sl_left ,1:-1]/ds
+ if data.pf.dimensionality > 2:
+ ds = div_fac * data['dz'].flat[0]
+ f += data["z-velocity"][1:-1,1:-1,sl_right]/ds
+ f -= data["z-velocity"][1:-1,1:-1,sl_left ]/ds
new_field = na.zeros(data["x-velocity"].shape, dtype='float64')
new_field[1:-1,1:-1,1:-1] = f
return new_field
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