[petsc-users] locate DMSwarm particles with respect to a background DMDA mesh

Matthew Knepley knepley at gmail.com
Thu Oct 27 12:50:17 CDT 2022


On Thu, Oct 27, 2022 at 11:57 AM Semplice Matteo <
matteo.semplice at 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/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20221027/16787cc6/attachment-0001.html>


More information about the petsc-users mailing list