[Yt-svn] yt: License stuff and a typo fix
hg at spacepope.org
hg at spacepope.org
Wed May 5 12:10:01 PDT 2010
hg Repository: yt
details: yt/rev/f85b507582b6
changeset: 1642:f85b507582b6
user: Sam Skillman <samuel.skillman at colorado.edu>
date:
Wed May 05 13:09:11 2010 -0600
description:
License stuff and a typo fix
diffstat:
yt/extensions/amr_kdtree/amr_kdtree.py | 35 +++++++++++++++--
yt/extensions/volume_rendering/software_sampler.py | 2 +-
2 files changed, 32 insertions(+), 5 deletions(-)
diffs (72 lines):
diff -r 857c1f4280f5 -r f85b507582b6 yt/extensions/amr_kdtree/amr_kdtree.py
--- a/yt/extensions/amr_kdtree/amr_kdtree.py Wed May 05 08:57:31 2010 -0600
+++ b/yt/extensions/amr_kdtree/amr_kdtree.py Wed May 05 13:09:11 2010 -0600
@@ -1,3 +1,29 @@
+"""
+AMR kD-Tree Framework
+
+Authors: Samuel Skillman <samskillman at gmail.com>
+ Wil St. Charles <fallen751 at gmail.com>
+Affiliation: University of Colorado at Boulder
+Homepage: http://yt.enzotools.org/
+License:
+ Copyright (C) 2009 Samuel Skillman. All Rights Reserved.
+
+ This file is part of yt.
+
+ yt is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+"""
+
import numpy as np
from copy import *
from yt.mods import *
@@ -19,7 +45,6 @@
print 'Making kd tree from le ', self.domain_left_edge, 'to ', self.domain_right_edge
self.root_grids = pf.hierarchy.get_levels().next()
-
self.leaf_count = 0
self.current_parent = -1
self.dim = 0
@@ -55,13 +80,15 @@
self.split_pos = split_pos
self.left_children = left_children
self.right_children = right_children
-
+ self.cost = 0.0
+
def count_cost(self,node):
if isinstance(node,AMRKDTree.leafnode):
return node.cost
else:
- return self.count_cost(node.left_children) + self.count_cost(node.right_children)
-
+ node.cost = self.count_cost(node.left_children) + self.count_cost(node.right_children)
+ return node.cost
+
def __build(self, grids, parent, l_corner, r_corner):
if len(grids) == 0:
self.leaf_count += 1
diff -r 857c1f4280f5 -r f85b507582b6 yt/extensions/volume_rendering/software_sampler.py
--- a/yt/extensions/volume_rendering/software_sampler.py Wed May 05 08:57:31 2010 -0600
+++ b/yt/extensions/volume_rendering/software_sampler.py Wed May 05 13:09:11 2010 -0600
@@ -156,7 +156,7 @@
while( self.my_storage*len(self.fields)*8 >= self.memory_per_process*self.memory_factor ):
self.my_storage -= len(self.fields)*8*na.prod(self.current_saved_grids[0].ActiveDimensions)
del self.current_saved_grids[0]
- del self.curren_vcds[0]
+ del self.current_vcds[0]
data = [d[node.li[0]:node.ri[0]+1,
node.li[1]:node.ri[1]+1,
More information about the yt-svn
mailing list