-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use of GetNeighborBlockIndex
in downstream codes
#1013
Comments
We need to check each iterative update of the particle position to see if we have left the meshblock, otherwise the particle could move many meshblocks before it gets to I'm not very happy with the need for downstream codes to explicitly update an internal variable |
I see. Thanks for the info. In that case it might be worth to expose a task that does specifically that (so that the interface is clear) or a combined task that first updates the info and then sends (similar to the higher level tasks for the other boundary comm). Right now (from existing code) I got the impression that is has to be called at the end of certain kernels and only inferred the relevance to communication. |
For my recent PR #1026 I am moving boundary communication for swarms towards the patterns we are using for fields. It seems likely we will end up with a
I'm hesitant to remove Does that seem like a good solution to you (I think it's exactly your second suggestion but I wanted to confirm)? |
I'm happy confirm that this kind of solution is what I had in mind. |
I thought about this and convinced myself it is fine to do for particle implementations where you aren't iterating over particle pushes during a single timestep, such that particles can't possibly move further than one neighboring meshblock before the send/receive communication is applied. If particles are moving just once per timestep it's fine to call #1026 addresses this. No more required The extra kernel launch where |
When and where should I call
GetNeighborBlockIndex
in downstream codes?The function internally updates the
blockIndex_(n)
so I'm wondering if the Parthenon comm machinery assumes that this index is always correct or if it's updated automatically before doing comm.In the former case, would it be worth to hide that machinery from downstream codes?
ping @brryan @Yurlungur @AstroBarker
The text was updated successfully, but these errors were encountered: