On Fri, May 12, 2023 at 9:40 AM Matthew Young < myoung.space.scie...@gmail.com> wrote:
> Got it. > > I'm specifically thinking about this in terms of the gather stage of my > PIC code, where I loop over local particles to fill local density and flux > arrays by linearly interpolating particle positions to the grid. The gather > function currently assumes that the coordinates (i.e., the array > representation of DMSwarmPICField_coor) of all particles on a given rank > would correspond to only the global indices owned by that rank, via the > relationship between indices and coordinates in the associated cell DM. > Based on what you described, it sounds like I need to make sure that I > initially lay down the particles so that their rank matches their > coordinates. > Right now, yes. I will fix that before August. Thanks, Matt > --Matt > ========================== > Matthew Young, PhD (he/him) > Research Scientist II > Space Science Center > University of New Hampshire > matthew.yo...@unh.edu > ========================== > > > On Fri, May 12, 2023 at 5:15 AM Matthew Knepley <knep...@gmail.com> wrote: > >> On Thu, May 11, 2023 at 9:15 PM Matthew Young < >> myoung.space.scie...@gmail.com> wrote: >> >>> Does setting up a PIC-type DMSWARM with an associated cell DM guarantee >>> that each MPI rank will own the particles with coordinates inside the >>> bounds of the portion of the grid it owns? >>> >> >> There is a caveat that we are currently fixing. Swarm communication is >> setup to be nearest neighbor (since there is no coarse grid of >> bounding boxes). So if your particles are initially in the right place, and >> only move nearest neighbor, everything is fine. We are adding a hierarchy >> of bounding boxes so that we can communicate anywhere. >> >> Thanks, >> >> Matt >> >> >>> --Matt >>> ========================== >>> Matthew Young, PhD (he/him) >>> Research Scientist II >>> Space Science Center >>> University of New Hampshire >>> matthew.yo...@unh.edu >>> ========================== >>> >> >> >> -- >> What most experimenters take for granted before they begin their >> experiments is infinitely more interesting than any results to which their >> experiments lead. >> -- Norbert Wiener >> >> https://www.cse.buffalo.edu/~knepley/ >> <http://www.cse.buffalo.edu/~knepley/> >> > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>