Fix periodic ib issues#1618
Draft
danieljvickers wants to merge 5 commits into
Draft
Conversation
…ty when computing the radial vector
…umber of IB force communications. This limits the number of transmits and prevents double-counting in periodic cases.
|
Claude Code Review Head SHA: 347d6c6 Files changed:
Findings: Wrong array indices in The new radial-vector calculation for force/torque integration uses the wrong loop index for the y and z components: radial_vector(2) = y_cc(i) - (patch_ib(ib_idx)%y_centroid + real(yp, wp)*(y_domain%end - y_domain%beg))
...
if (num_dims == 3) radial_vector(3) = z_cc(i) - (patch_ib(ib_idx)%z_centroid + real(zp, wp)*(z_domain%end - z_domain%beg))Both use index
Using |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
I was made aware of several bugs in the IB MPI communication in periodic cases. This branch resolves all of the issues that I have been made aware of. They include
The good news is that the fix for number 2 is also a computational optimization in small cases by limiting the total number of communications to the minimum required to successfully sum. So we have a slight upside.
A new example will be added that should check for this behavior and ensure that it does not break again.
Type of change (delete unused ones)