[petsc-users] DMSwarm losing particles with a non-uniform mesh
Joauma Marichal
joauma.marichal at uclouvain.be
Mon Apr 4 05:06:47 CDT 2022
Hello,
I have written before as I am trying use the DMSwarm library to track particles over a collocated non-uniform mesh with ghost cells.
I have been able to deal with the collocated and ghost cell issues by creating an intermediate DMDA.
However, I lose particles when my mesh is non-uniform. I have re-written a function similar to DMDASetUniformCoordinates but I still have issues when my cells have varying sizes.
I attach a small code to this e-mail that reads particles coordinates from a file and stores them in a DMSwarm structure. My code works well when I use uniform coordinates but whenever I change this, I lose several particles after calling the migration function.
Can it be due to how I define my coordinates? If yes, why? Or is it due to how the migrate function is implmented?
Best regards,
Joauma
PS. the code is run with: mpirun -np 3 ./cobpor.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220404/1def1b81/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Particle_test2.zip
Type: application/zip
Size: 24929 bytes
Desc: Particle_test2.zip
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220404/1def1b81/attachment-0001.zip>
More information about the petsc-users
mailing list