Commits

John ZuHone committed 5fb2661

Really should look at the code I'm commiting before I claim I know what it does. The previous change did not have to do with the relationship of particles to grids, but had to do with a check of whether or not the particles were inside the domain.

The right behavior should be that particles are counted as within the domain if their position is greater than or equal to the domain left edge and less than the domain right edge, which is the same behavior as for grids.

  • Participants
  • Parent commits 5289020

Comments (0)

Files changed (1)

File yt/utilities/particle_generator.py

         y = data.pop("particle_position_y")
         z = data.pop("particle_position_z")
 
-        xcond = np.logical_or(x <= pf.domain_left_edge[0],
+        xcond = np.logical_or(x < pf.domain_left_edge[0],
                               x >= pf.domain_right_edge[0])
-        ycond = np.logical_or(y <= pf.domain_left_edge[1],
+        ycond = np.logical_or(y < pf.domain_left_edge[1],
                               y >= pf.domain_right_edge[1])
-        zcond = np.logical_or(z <= pf.domain_left_edge[2],
+        zcond = np.logical_or(z < pf.domain_left_edge[2],
                               z >= pf.domain_right_edge[2])
         cond = np.logical_or(xcond, ycond)
         cond = np.logical_or(zcond, cond)
         ymax = particles_right_edge[1]
         zmax = particles_right_edge[2]
 
-        xcond = (xmin <= pf.domain_left_edge[0]) or \
+        xcond = (xmin < pf.domain_left_edge[0]) or \
                 (xmax >= pf.domain_right_edge[0])
-        ycond = (ymin <= pf.domain_left_edge[1]) or \
+        ycond = (ymin < pf.domain_left_edge[1]) or \
                 (ymax >= pf.domain_right_edge[1])
-        zcond = (zmin <= pf.domain_left_edge[2]) or \
+        zcond = (zmin < pf.domain_left_edge[2]) or \
                 (zmax >= pf.domain_right_edge[2])
         cond = xcond or ycond or zcond