[yt-svn] commit/yt-3.0: 2 new changesets

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Wed Aug 14 06:39:17 PDT 2013


2 new commits in yt-3.0:

https://bitbucket.org/yt_analysis/yt-3.0/commits/625f11f3fa23/
Changeset:   625f11f3fa23
Branch:      yt-3.0
User:        MatthewTurk
Date:        2013-08-13 16:14:45
Summary:     Split the filling function into C&F ordered fillers.

Closes #624.
Affected #:  4 files

diff -r c7f0b4c36217f18e0b4bb4fdd763b8bab4cade69 -r 625f11f3fa23a73a21cedb0bee5f4e7ff2639285 yt/geometry/oct_container.pxd
--- a/yt/geometry/oct_container.pxd
+++ b/yt/geometry/oct_container.pxd
@@ -53,6 +53,7 @@
     cdef OctAllocationContainer *cont
     cdef OctAllocationContainer **domains
     cdef Oct ****root_mesh
+    cdef oct_visitor_function *fill_func
     cdef int partial_coverage
     cdef int nn[3]
     cdef np.float64_t DLE[3], DRE[3]

diff -r c7f0b4c36217f18e0b4bb4fdd763b8bab4cade69 -r 625f11f3fa23a73a21cedb0bee5f4e7ff2639285 yt/geometry/oct_container.pyx
--- a/yt/geometry/oct_container.pyx
+++ b/yt/geometry/oct_container.pyx
@@ -109,6 +109,7 @@
             self.DLE[i] = domain_left_edge[i] #0
             self.DRE[i] = domain_right_edge[i] #num_grid
         self._initialize_root_mesh()
+        self.fill_func = oct_visitors.fill_file_indices_oind
 
     def _initialize_root_mesh(self):
         self.root_mesh = <Oct****> malloc(sizeof(void*) * self.nn[0])
@@ -597,7 +598,7 @@
         p[2] = cell_inds.data
         data.array = p
         data.domain = domain_id
-        self.visit_all_octs(selector, oct_visitors.fill_file_indices, &data)
+        self.visit_all_octs(selector, self.fill_func, &data)
         return levels, cell_inds, file_inds
 
     @cython.boundscheck(False)
@@ -657,6 +658,7 @@
         for i in range(3):
             self.DLE[i] = domain_left_edge[i] #0
             self.DRE[i] = domain_right_edge[i] #num_grid
+        self.fill_func = oct_visitors.fill_file_indices_rind
 
     cdef int get_root(self, int ind[3], Oct **o):
         o[0] = NULL

diff -r c7f0b4c36217f18e0b4bb4fdd763b8bab4cade69 -r 625f11f3fa23a73a21cedb0bee5f4e7ff2639285 yt/geometry/oct_visitors.pxd
--- a/yt/geometry/oct_visitors.pxd
+++ b/yt/geometry/oct_visitors.pxd
@@ -60,7 +60,8 @@
 cdef oct_visitor_function copy_array_i64
 cdef oct_visitor_function identify_octs
 cdef oct_visitor_function assign_domain_ind
-cdef oct_visitor_function fill_file_indices
+cdef oct_visitor_function fill_file_indices_oind
+cdef oct_visitor_function fill_file_indices_rind
 
 cdef inline int cind(int i, int j, int k):
     return (((i*2)+j)*2+k)

diff -r c7f0b4c36217f18e0b4bb4fdd763b8bab4cade69 -r 625f11f3fa23a73a21cedb0bee5f4e7ff2639285 yt/geometry/oct_visitors.pyx
--- a/yt/geometry/oct_visitors.pyx
+++ b/yt/geometry/oct_visitors.pyx
@@ -152,7 +152,7 @@
     o.domain_ind = data.global_index
     data.index += 1
 
-cdef void fill_file_indices(Oct *o, OctVisitorData *data, np.uint8_t selected):
+cdef void fill_file_indices_oind(Oct *o, OctVisitorData *data, np.uint8_t selected):
     # We fill these arrays, then inside the level filler we use these as
     # indices as we fill a second array from the data.
     if selected == 0: return
@@ -164,3 +164,16 @@
     find_arr[data.index] = o.file_ind
     cell_arr[data.index] = oind(data)
     data.index +=1
+
+cdef void fill_file_indices_rind(Oct *o, OctVisitorData *data, np.uint8_t selected):
+    # We fill these arrays, then inside the level filler we use these as
+    # indices as we fill a second array from the data.
+    if selected == 0: return
+    cdef void **p = <void **> data.array
+    cdef np.uint8_t *level_arr = <np.uint8_t *> p[0]
+    cdef np.int64_t *find_arr = <np.int64_t *> p[1]
+    cdef np.uint8_t *cell_arr = <np.uint8_t *> p[2]
+    level_arr[data.index] = data.level
+    find_arr[data.index] = o.file_ind
+    cell_arr[data.index] = rind(data)
+    data.index +=1


https://bitbucket.org/yt_analysis/yt-3.0/commits/dddd65254a02/
Changeset:   dddd65254a02
Branch:      yt-3.0
User:        MatthewTurk
Date:        2013-08-14 15:39:13
Summary:     Merged in MatthewTurk/yt-3.0 (pull request #78)

Split the filling function into C&F ordered fillers.
Affected #:  4 files

diff -r ba1e3aff8f58a620904c3fae89358470e2e04b26 -r dddd65254a02e9fde765ac4e9cc91311ccb56b1d yt/geometry/oct_container.pxd
--- a/yt/geometry/oct_container.pxd
+++ b/yt/geometry/oct_container.pxd
@@ -53,6 +53,7 @@
     cdef OctAllocationContainer *cont
     cdef OctAllocationContainer **domains
     cdef Oct ****root_mesh
+    cdef oct_visitor_function *fill_func
     cdef int partial_coverage
     cdef int nn[3]
     cdef np.float64_t DLE[3], DRE[3]

diff -r ba1e3aff8f58a620904c3fae89358470e2e04b26 -r dddd65254a02e9fde765ac4e9cc91311ccb56b1d yt/geometry/oct_container.pyx
--- a/yt/geometry/oct_container.pyx
+++ b/yt/geometry/oct_container.pyx
@@ -109,6 +109,7 @@
             self.DLE[i] = domain_left_edge[i] #0
             self.DRE[i] = domain_right_edge[i] #num_grid
         self._initialize_root_mesh()
+        self.fill_func = oct_visitors.fill_file_indices_oind
 
     def _initialize_root_mesh(self):
         self.root_mesh = <Oct****> malloc(sizeof(void*) * self.nn[0])
@@ -597,7 +598,7 @@
         p[2] = cell_inds.data
         data.array = p
         data.domain = domain_id
-        self.visit_all_octs(selector, oct_visitors.fill_file_indices, &data)
+        self.visit_all_octs(selector, self.fill_func, &data)
         return levels, cell_inds, file_inds
 
     @cython.boundscheck(False)
@@ -657,6 +658,7 @@
         for i in range(3):
             self.DLE[i] = domain_left_edge[i] #0
             self.DRE[i] = domain_right_edge[i] #num_grid
+        self.fill_func = oct_visitors.fill_file_indices_rind
 
     cdef int get_root(self, int ind[3], Oct **o):
         o[0] = NULL

diff -r ba1e3aff8f58a620904c3fae89358470e2e04b26 -r dddd65254a02e9fde765ac4e9cc91311ccb56b1d yt/geometry/oct_visitors.pxd
--- a/yt/geometry/oct_visitors.pxd
+++ b/yt/geometry/oct_visitors.pxd
@@ -60,7 +60,8 @@
 cdef oct_visitor_function copy_array_i64
 cdef oct_visitor_function identify_octs
 cdef oct_visitor_function assign_domain_ind
-cdef oct_visitor_function fill_file_indices
+cdef oct_visitor_function fill_file_indices_oind
+cdef oct_visitor_function fill_file_indices_rind
 
 cdef inline int cind(int i, int j, int k):
     return (((i*2)+j)*2+k)

diff -r ba1e3aff8f58a620904c3fae89358470e2e04b26 -r dddd65254a02e9fde765ac4e9cc91311ccb56b1d yt/geometry/oct_visitors.pyx
--- a/yt/geometry/oct_visitors.pyx
+++ b/yt/geometry/oct_visitors.pyx
@@ -152,7 +152,7 @@
     o.domain_ind = data.global_index
     data.index += 1
 
-cdef void fill_file_indices(Oct *o, OctVisitorData *data, np.uint8_t selected):
+cdef void fill_file_indices_oind(Oct *o, OctVisitorData *data, np.uint8_t selected):
     # We fill these arrays, then inside the level filler we use these as
     # indices as we fill a second array from the data.
     if selected == 0: return
@@ -164,3 +164,16 @@
     find_arr[data.index] = o.file_ind
     cell_arr[data.index] = oind(data)
     data.index +=1
+
+cdef void fill_file_indices_rind(Oct *o, OctVisitorData *data, np.uint8_t selected):
+    # We fill these arrays, then inside the level filler we use these as
+    # indices as we fill a second array from the data.
+    if selected == 0: return
+    cdef void **p = <void **> data.array
+    cdef np.uint8_t *level_arr = <np.uint8_t *> p[0]
+    cdef np.int64_t *find_arr = <np.int64_t *> p[1]
+    cdef np.uint8_t *cell_arr = <np.uint8_t *> p[2]
+    level_arr[data.index] = data.level
+    find_arr[data.index] = o.file_ind
+    cell_arr[data.index] = rind(data)
+    data.index +=1

Repository URL: https://bitbucket.org/yt_analysis/yt-3.0/

--

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