On Thu, Oct 27, 2022 at 11:57 AM Semplice Matteo < matteo.sempl...@uninsubria.it> wrote:
> Dear Petsc developers, > I am trying to use a DMSwarm to locate a cloud of points with respect > to a background mesh. In the real application the points will be loaded > from disk, but I have created a small demo in which > > - each processor creates Npart particles, all within the domain > covered by the mesh, but not all in the local portion of the mesh > - migrate the particles > > After migration most particles are not any more in the DMSwarm (how many > and which ones seems to depend on the number of cpus, but it never happens > that all particle survive the migration process). > > I am clearly missing some step, since I'd expect that a DMDA would be able > to locate particles without the need to go through a DMShell as it is done > in src/dm/tutorials/swarm_ex3.c.html > <https://petsc.org/main/src/dm/tutorials/swarm_ex3.c.html> > > I attach my demo code. > > Could someone give me a hint? > I will look at the demo. It should work. There are some tests of this, like SNES ex63, but they use Plex instead of DMDA. Thanks, Matt > Best > Matteo > > -- 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/>