[petsc-users] Ghost points in DMSwarm
Matthew Knepley
knepley at gmail.com
Sat Feb 24 09:24:15 CST 2024
On Fri, Feb 23, 2024 at 5:14 PM MIGUEL MOLINOS PEREZ <mmolinos at us.es> wrote:
> Dear all, I am struggling on how to include ghost points in DMSwarm local
> vectors. According to PETSc documentation it seems “straightforward” for a
> DMDA mesh. However, I am not so sure on how to do it for a DMSwarm. In
> fact, if I add the result
> ZjQcmQRYFpfptBannerStart
> This Message Is From an External Sender
> This message came from outside your organization.
>
> ZjQcmQRYFpfptBannerEnd
> Dear all,
>
> I am struggling on how to include ghost points in DMSwarm local vectors.
> According to PETSc documentation it seems “straightforward” for a DMDA
> mesh. However, I am not so sure on how to do it for a DMSwarm. In fact,
> if I add the result of DMSwarmGetLocalSize for each rank, the result is
> the exact number of particles in the system. Which means that the halo is
> zero.
>
> Since there is a function called DMSwarmCreateLocalVectorFromField,I was
> wandering if there is a function already implemented in petsc (and I’m
> missing it) to include ghost points in DMSwarm and therefore don’t have
> to reinvent the wheel. If so, is there any example out there I can follow?
>
DMSwarm is currently different from the other DMs. There is no idea of
identity for particles, so there is no idea of a shared particle. You can
create this by adding an ID to your particle fields, but it would be a
manual process. DMSwarmMigrate() can duplicate particles if you have an
overlapping mesh, which would mimic shared particles.
THanks,
Matt
> Thanks in advance.
>
> Regards,
> Miguel
>
> petsc.org
> <https://urldefense.us/v3/__https://petsc.org/release/manual/vec/__;!!G_uCfscf7eWS!f6U_z6q8Rk6XrOxvbmE8KyNErlmqYwpGzkxCQ56xX0agWaCG0tLVLh1Cml6fTtqvve0aL3HGiAhZn-hDgIoH5w$>
>
> <https://urldefense.us/v3/__https://petsc.org/release/manual/vec/__;!!G_uCfscf7eWS!f6U_z6q8Rk6XrOxvbmE8KyNErlmqYwpGzkxCQ56xX0agWaCG0tLVLh1Cml6fTtqvve0aL3HGiAhZn-hDgIoH5w$>
> <https://urldefense.us/v3/__https://petsc.org/release/manual/vec/__;!!G_uCfscf7eWS!f6U_z6q8Rk6XrOxvbmE8KyNErlmqYwpGzkxCQ56xX0agWaCG0tLVLh1Cml6fTtqvve0aL3HGiAhZn-hDgIoH5w$>
>
>
>
--
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://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!aLpar0ltcRArMpZIgCFcyKDnezb9G3tPzvVdBNtiSHZD2-37Vdmfl-Kp4YrSLNP7wO3gZjhPcXCq2BitoRRm$ <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!aLpar0ltcRArMpZIgCFcyKDnezb9G3tPzvVdBNtiSHZD2-37Vdmfl-Kp4YrSLNP7wO3gZjhPcXCq2A0-7EQT$ >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20240224/62f5f49c/attachment.html>
More information about the petsc-users
mailing list