Commits

Matthew Turk committed fa49ef6

Minor fixes for particle octrees for dx and domain size.

  • Participants
  • Parent commits 94dce22

Comments (0)

Files changed (2)

yt/frontends/sph/data_structures.py

         if domain_left_edge is None:
             domain_left_edge = np.zeros(3, "float64") - 0.5
         if domain_right_edge is None:
-            domain_right_edge = np.ones(3, "float64") + 0.5
+            domain_right_edge = np.zeros(3, "float64") + 0.5
 
         self.domain_left_edge = np.array(domain_left_edge, dtype="float64")
         self.domain_right_edge = np.array(domain_right_edge, dtype="float64")

yt/geometry/oct_container.pyx

                 #IND Corresponding integer index on the root octs
                 #CP Center  point of that oct
                 pp[i] = pos[p, i]
-                dds[i] = (self.DRE[i] + self.DLE[i])/self.nn[i]
+                dds[i] = (self.DRE[i] - self.DLE[i])/self.nn[i]
                 ind[i] = <np.int64_t> ((pp[i] - self.DLE[i])/dds[i])
                 cp[i] = (ind[i] + 0.5) * dds[i] + self.DLE[i]
             cur = self.root_mesh[ind[0]][ind[1]][ind[2]]