[yt-svn] commit/yt: 2 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Thu Mar 27 10:48:10 PDT 2014
2 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/227d9b032d07/
Changeset: 227d9b032d07
Branch: yt-3.0
User: MatthewTurk
Date: 2014-03-27 17:50:51
Summary: Adding comments and fixing nz!=8 for stream and save_octree.
Affected #: 4 files
diff -r 71e1995770948d7b5c586e37cb12ce8759fbf749 -r 227d9b032d07322ef7de6473904e959f7ff164c8 yt/frontends/stream/data_structures.py
--- a/yt/frontends/stream/data_structures.py
+++ b/yt/frontends/stream/data_structures.py
@@ -1002,7 +1002,7 @@
"""
- domain_dimensions = np.ones(3, "int32") * 2
+ domain_dimensions = np.ones(3, "int32") * (1<<over_refine_factor)
nprocs = 1
if bbox is None:
bbox = np.array([[0.0, 1.0], [0.0, 1.0], [0.0, 1.0]], 'float64')
diff -r 71e1995770948d7b5c586e37cb12ce8759fbf749 -r 227d9b032d07322ef7de6473904e959f7ff164c8 yt/geometry/oct_container.pyx
--- a/yt/geometry/oct_container.pyx
+++ b/yt/geometry/oct_container.pyx
@@ -504,9 +504,8 @@
cdef OctVisitorData data
self.setup_data(&data, -1)
data.oref = 1
- data.nz = 8
cdef np.ndarray[np.uint8_t, ndim=1] ref_mask
- ref_mask = np.zeros(self.nocts * 8, dtype="uint8") - 1
+ ref_mask = np.zeros(self.nocts * data.nz, dtype="uint8") - 1
cdef void *p[2]
cdef np.uint8_t ad = int(always_descend)
p[0] = <void *> &ad
@@ -514,8 +513,6 @@
data.array = p
# Enforce partial_coverage here
self.visit_all_octs(selector, oct_visitors.store_octree, &data, 1)
- if always_descend:
- ref_mask = ref_mask[:data.index-1]
header['octree'] = ref_mask
return header
diff -r 71e1995770948d7b5c586e37cb12ce8759fbf749 -r 227d9b032d07322ef7de6473904e959f7ff164c8 yt/geometry/oct_visitors.pyx
--- a/yt/geometry/oct_visitors.pyx
+++ b/yt/geometry/oct_visitors.pyx
@@ -185,6 +185,7 @@
return
data.last = o.domain_ind
if o.children == NULL or o.children[ii] == NULL:
+ # Not refined.
res = 0
else:
res = 1
diff -r 71e1995770948d7b5c586e37cb12ce8759fbf749 -r 227d9b032d07322ef7de6473904e959f7ff164c8 yt/geometry/selection_routines.pyx
--- a/yt/geometry/selection_routines.pyx
+++ b/yt/geometry/selection_routines.pyx
@@ -214,6 +214,12 @@
# Now we visit all our children. We subtract off sdds for the first
# pass because we center it on the first cell.
cdef int iter = 1 - visit_covered # 2 if 1, 1 if 0.
+ # So the order here goes like so. If visit_covered is 1, which usually
+ # comes from "partial_coverage", we visit the components of a zone even
+ # if it has children. But in general, the first iteration through, we
+ # visit each cell. This means that only if visit_covered is true do we
+ # visit potentially covered cells. The next time through, we visit
+ # child cells.
while iter < 2:
spos[0] = pos[0] - sdds[0]/2.0
for i in range(2):
https://bitbucket.org/yt_analysis/yt/commits/b28baf79bb7d/
Changeset: b28baf79bb7d
Branch: yt-3.0
User: MatthewTurk
Date: 2014-03-27 18:48:02
Summary: Merged in MatthewTurk/yt/yt-3.0 (pull request #775)
Adding comments and fixing nz!=8 for stream and save_octree.
Affected #: 4 files
diff -r af24bacaa028428d2726b599b0b28820d61c46e3 -r b28baf79bb7de836ed03be7c0819644549d566bc yt/frontends/stream/data_structures.py
--- a/yt/frontends/stream/data_structures.py
+++ b/yt/frontends/stream/data_structures.py
@@ -1002,7 +1002,7 @@
"""
- domain_dimensions = np.ones(3, "int32") * 2
+ domain_dimensions = np.ones(3, "int32") * (1<<over_refine_factor)
nprocs = 1
if bbox is None:
bbox = np.array([[0.0, 1.0], [0.0, 1.0], [0.0, 1.0]], 'float64')
diff -r af24bacaa028428d2726b599b0b28820d61c46e3 -r b28baf79bb7de836ed03be7c0819644549d566bc yt/geometry/oct_container.pyx
--- a/yt/geometry/oct_container.pyx
+++ b/yt/geometry/oct_container.pyx
@@ -504,9 +504,8 @@
cdef OctVisitorData data
self.setup_data(&data, -1)
data.oref = 1
- data.nz = 8
cdef np.ndarray[np.uint8_t, ndim=1] ref_mask
- ref_mask = np.zeros(self.nocts * 8, dtype="uint8") - 1
+ ref_mask = np.zeros(self.nocts * data.nz, dtype="uint8") - 1
cdef void *p[2]
cdef np.uint8_t ad = int(always_descend)
p[0] = <void *> &ad
@@ -514,8 +513,6 @@
data.array = p
# Enforce partial_coverage here
self.visit_all_octs(selector, oct_visitors.store_octree, &data, 1)
- if always_descend:
- ref_mask = ref_mask[:data.index-1]
header['octree'] = ref_mask
return header
diff -r af24bacaa028428d2726b599b0b28820d61c46e3 -r b28baf79bb7de836ed03be7c0819644549d566bc yt/geometry/oct_visitors.pyx
--- a/yt/geometry/oct_visitors.pyx
+++ b/yt/geometry/oct_visitors.pyx
@@ -185,6 +185,7 @@
return
data.last = o.domain_ind
if o.children == NULL or o.children[ii] == NULL:
+ # Not refined.
res = 0
else:
res = 1
diff -r af24bacaa028428d2726b599b0b28820d61c46e3 -r b28baf79bb7de836ed03be7c0819644549d566bc yt/geometry/selection_routines.pyx
--- a/yt/geometry/selection_routines.pyx
+++ b/yt/geometry/selection_routines.pyx
@@ -214,6 +214,12 @@
# Now we visit all our children. We subtract off sdds for the first
# pass because we center it on the first cell.
cdef int iter = 1 - visit_covered # 2 if 1, 1 if 0.
+ # So the order here goes like so. If visit_covered is 1, which usually
+ # comes from "partial_coverage", we visit the components of a zone even
+ # if it has children. But in general, the first iteration through, we
+ # visit each cell. This means that only if visit_covered is true do we
+ # visit potentially covered cells. The next time through, we visit
+ # child cells.
while iter < 2:
spos[0] = pos[0] - sdds[0]/2.0
for i in range(2):
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