<div dir="ltr"><div dir="ltr">On Thu, Oct 27, 2022 at 11:57 AM Semplice Matteo <<a href="mailto:matteo.semplice@uninsubria.it">matteo.semplice@uninsubria.it</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg-5547704406491279179">
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Dear Petsc developers,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
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</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<ul>
<li><span>each processor creates Npart particles, all within the domain covered by the mesh, but not all in the local portion of the mesh</span></li><li><span>migrate the particles</span></li></ul>
<div>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).</div>
<div><br>
</div>
<div>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
<a href="https://petsc.org/main/src/dm/tutorials/swarm_ex3.c.html" target="_blank">
src/dm/tutorials/swarm_ex3.c.html</a><br>
</div>
<div><br>
</div>
<div>I attach my demo code.</div>
<div><br>
</div>
<div>Could someone give me a hint?</div></div></div></div></blockquote><div><br></div><div>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.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg-5547704406491279179"><div dir="ltr"><div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<div>Best <br>
</div>
<div> Matteo<br>
</div>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
</div>
</div></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>