1454-projection-optimization #1549
Conversation
Claude Code ReviewHead SHA: 4f88e03 Files changed:
Findings1. Uninitialized
|
…nolithic subroutine for grid-cell parallelism
…draft of the grid parallelism subroutine. Deprecated cylinder value to only favor length_x being used
…tion of length_y and length_z for cylinders. All tests pass on GNU compilers for full test suite.
|
All AI review comments are now irrelevant because of significant changes that have occurred between now and that review. I doubt that this will pass the test suite on the first try, but on the off chance that it does we should not yet merge it. A data product of computational optimization performance should be presented before this PR is merged. Otherwise, it is unnecessary refactoring of the code. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1549 +/- ##
==========================================
- Coverage 60.94% 60.67% -0.27%
==========================================
Files 82 83 +1
Lines 19922 19852 -70
Branches 2924 2944 +20
==========================================
- Hits 12141 12045 -96
- Misses 5805 5814 +9
- Partials 1976 1993 +17 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Resolves conflicts with the m_global_parameters_common refactor: - post_process m_global_parameters: keep master's relocation of shear/proc vars to m_global_parameters_common; keep PR's ib_airfoil/ib_airfoil_grids stubs needed by the new common m_patch_geometries module - simulation m_global_parameters: keep master's GPU_DECLARE (ib, num_ibs, ib_coefficient_of_friction now declared in m_global_parameters_common); relocate the PR's stl_models GPU_DECLARE to the TYPED_DECLS gpu flag in toolchain/mfc/params/definitions.py (auto-generated for sim)
|
I've pushed a merge of
Heads-up for future commits on this branch: Fortran parameter declarations, namelist bindings, and MPI broadcasts are now generated from Verification on my end: |
|
I am very glad you have merged this for me because I screwed up the previous one significantly, lol. |

Description
In many-particle cases, the limiting factor in the IBM compute is by far the time it takes to project the immersed boundaries onto the grid. This is fundamentally rooted in how we parallelize the work. The current code parallelizes of x, y, and z, but sequentially iterates through the IB patches. In cases where there are many IBs that are small, we are launching several (thousands) of GPU kernels each time step, but each kernel only works on hundreds of grid cells. Adding an option to parallelize over the thousands of particles should be significantly larger parallelism and thus optimize the projection.
In order to maintain the functionality of both parallelism methods, I need a separate set of geometry bounding checks. Since we perform a check in icpp patches and now 2 in IB patches, this is a significant amount of redundant code that must be maintained. To be somewhat forward-looking, I opted to merge all geometry checking into a single module that can be called from both forms of IB parallelism and the icpp pre_processing code. This should clean up the code nicely and significantly reduce code maintenance going forward. Since we can now change cylinder orientation with angles, I also deprecate the unneeded cylinder length checks.
The end result is the creation of a new module in common, the deletion of duplicate code, and a new parallelism path for IB patches when utilizing GPU compute.
Closes #1454, #1532, #1543
Type of change (delete unused ones)
Testing
All tests pass on GNU compiler
Checklist
Check these like this
[x]to indicate which of the below applies.See the developer guide for full coding standards.
GPU changes (expand if you modified
src/simulation/)AI code reviews
Reviews are not retriggered automatically. To request a review, comment on the PR:
@claude full review— Claude full review (also triggers on PR open/reopen/ready)claude-full-review— Claude full review via label