Repository navigation
Remove unused chemistry and capillary declarations - #2022
Draft
sbryngelson wants to merge 2 commits into
Draft
sbryngelson wants to merge 2 commits into
sbryngelson wants to merge 2 commits into
Conversation
isx/isy/isz were set but never read (and the isy guard tested m instead of n). s_reconstruct_cell_boundary_values_capillary never used norm_dir, which the caller filled from the loop index i, undefined at that point. Pure dead-code removal; surface tension tests pass unchanged. (cherry picked from commit 2943123)
The module-level offsets array (and its GPU_DECLARE) was never used: s_compute_chemistry_diffusion_flux declares its own local offsets and copies that in. The local n in the same routine was unused and shadowed the grid extent n from m_global_parameters. Dead-code removal only; chemistry tests pass unchanged. (cherry picked from commit f903177)
This was referenced Oct 10, 2026
This branch has not been deployed
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.
Summary
Chemistry and capillary routines retained unused declarations and an unused argument. This draft combines the two existing dead-code removals.
Consolidation
Each source change is retained as a separate commit, with its original author, message, and a
cherry-pick -xreference. The complete original PR descriptions are reproduced below, including their verification records and limitations. Original review discussions remain available through the source links. Those original verification claims are historical records, not fresh runs on this combined branch.Verification of this combined branch
git diff --check origin/master...HEADpasses../mfc.sh precheckpasses all seven gates: formatting, spelling, toolchain lint/tests, source lint, documentation references, parameter documentation, and example case validation.This consolidation was performed with OpenAI Codex.
Contribution Policy
We do not accept pull requests generated primarily by AI without genuine understanding or real-world usage context.
All contributions are expected to demonstrate:
If these expectations are not met, we would prefer to implement the changes ourselves rather than spend time reviewing low-effort submissions.
Acknowledgement
PR template credit: junegunn
Original PR documentation
#1997: Remove dead locals and unused argument in s_get_capillary
Source: #1997
Original head:
2943123eba93ad7596680865cea52ebf81d3125dComplete original PR description
isx/isy/isz were set but never read (and the isy guard tested m instead
of n). s_reconstruct_cell_boundary_values_capillary never used norm_dir,
which the caller filled from the loop index i, undefined at that point.
Pure dead-code removal; surface tension tests pass unchanged.
Acknowledgement
#1998: Remove dead shadowed variables in m_chemistry
Source: #1998
Original head:
f90317771f99eed236a0a17c7fad5737ac977d1cComplete original PR description
The module-level offsets array (and its GPU_DECLARE) was never used:
s_compute_chemistry_diffusion_flux declares its own local offsets and
copies that in. The local n in the same routine was unused and shadowed
the grid extent n from m_global_parameters.
Dead-code removal only; chemistry tests pass unchanged.
Acknowledgement