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

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Mon Sep 23 06:17:08 PDT 2013


2 new commits in yt-3.0:

https://bitbucket.org/yt_analysis/yt-3.0/commits/77ee36c5d2a4/
Changeset:   77ee36c5d2a4
Branch:      yt-3.0
User:        MatthewTurk
Date:        2013-09-23 14:49:02
Summary:     Fixing ordering of NMSU-ART oct cells.
Affected #:  2 files

diff -r 041fa69088987f233490ad884f8a53307ffee8f2 -r 77ee36c5d2a4f0d477a953efb121b62083f9f5b4 yt/frontends/art/data_structures.py
--- a/yt/frontends/art/data_structures.py
+++ b/yt/frontends/art/data_structures.py
@@ -31,7 +31,7 @@
 from yt.data_objects.octree_subset import \
     OctreeSubset
 from yt.geometry.oct_container import \
-    OctreeContainer
+    ARTOctreeContainer
 from yt.data_objects.field_info_container import \
     FieldInfoContainer, NullFunc
 from .fields import \
@@ -92,7 +92,7 @@
         allocate the requisite memory in the oct tree
         """
         nv = len(self.fluid_field_list)
-        self.oct_handler = OctreeContainer(
+        self.oct_handler = ARTOctreeContainer(
             self.parameter_file.domain_dimensions/2,  # dd is # of root cells
             self.parameter_file.domain_left_edge,
             self.parameter_file.domain_right_edge,

diff -r 041fa69088987f233490ad884f8a53307ffee8f2 -r 77ee36c5d2a4f0d477a953efb121b62083f9f5b4 yt/geometry/oct_container.pyx
--- a/yt/geometry/oct_container.pyx
+++ b/yt/geometry/oct_container.pyx
@@ -754,47 +754,13 @@
     pass
 
 cdef class ARTOctreeContainer(OctreeContainer):
-
-    @cython.boundscheck(False)
-    @cython.wraparound(False)
-    @cython.cdivision(True)
-    def fill_level_from_grid(self, int domain, int level, dest_fields, 
-                             source_fields, 
-                             np.ndarray[np.uint8_t, ndim=2, cast=True] mask,
-                             int offset):
-        #Fill  level, but instead of assuming that the source
-        #order is that of the oct order, we look up the oct position
-        #and fill its children from the the source field
-        #As a result, source is 3D grid with 8 times as many
-        #elements as the number of octs on this level in this domain
-        #and with the shape of an equal-sided cube
-        cdef np.ndarray[np.float64_t, ndim=3] source
-        cdef np.ndarray[np.float64_t, ndim=1] dest
-        cdef OctAllocationContainer *dom = self.domains[domain - 1]
-        cdef Oct *o
-        cdef int n
-        cdef int i, j, k, ii
-        cdef int local_pos, local_filled
-        cdef np.float64_t val
-        cdef np.int64_t ox,oy,oz
-        for key in dest_fields:
-            local_filled = 0
-            dest = dest_fields[key]
-            source = source_fields[key]
-            for n in range(dom.n):
-                o = &dom.my_octs[n]
-                #if o.level != level: continue
-                for i in range(2):
-                    for j in range(2):
-                        for k in range(2):
-                            ii = ((k*2)+j)*2+i
-                            if mask[o.domain_ind, ii] == 0: continue
-                            #ox = (o.pos[0] << 1) + i
-                            #oy = (o.pos[1] << 1) + j
-                            #oz = (o.pos[2] << 1) + k
-                            dest[local_filled + offset] = source[ox,oy,oz]
-                            local_filled += 1
-        return local_filled
+    def __init__(self, oct_domain_dimensions, domain_left_edge,
+                 domain_right_edge, partial_coverage = 0,
+                 over_refine = 1):
+        OctreeContainer.__init__(self, oct_domain_dimensions,
+                domain_left_edge, domain_right_edge, partial_coverage,
+                 over_refine)
+        self.fill_func = oct_visitors.fill_file_indices_rind
 
 cdef OctList *OctList_append(OctList *olist, Oct *o):
     cdef OctList *this = olist


https://bitbucket.org/yt_analysis/yt-3.0/commits/97b4dd0e60c1/
Changeset:   97b4dd0e60c1
Branch:      yt-3.0
User:        MatthewTurk
Date:        2013-09-23 15:16:55
Summary:     Making Density logged
Affected #:  1 file

diff -r 77ee36c5d2a4f0d477a953efb121b62083f9f5b4 -r 97b4dd0e60c14fc770dbcf4c6bfbaff3dac3bb8e yt/frontends/art/fields.py
--- a/yt/frontends/art/fields.py
+++ b/yt/frontends/art/fields.py
@@ -46,6 +46,7 @@
 
 def _convertDensity(data):
     return data.convert("Density")
+KnownARTFields["Density"].take_log = True
 KnownARTFields["Density"]._units = r"\rm{g}/\rm{cm}^3"
 KnownARTFields["Density"]._projected_units = r"\rm{g}/\rm{cm}^2"
 KnownARTFields["Density"]._convert_function = _convertDensity

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