fix: extend patch validation loops to num_patches_max#1599
Draft
SVS87 wants to merge 1 commit into
Draft
Conversation
The alteration rights, smoothing, and primitive variable validation loops were bounded by num_patches, making the inactive-patch else branches unreachable. Changed all three loop bounds to num_patches_max to match the geometry loop, so inactive patch slots are validated across all four passes. Fixes MFlowCode#1482
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
The alteration rights, smoothing, and primitive variable validation loops were bounded by num_patches, making the inactive-patch else branches unreachable. Changed all three loop bounds to num_patches_max to match the geometry loop, so inactive patch slots are validated across all four passes.
Closes #1482
Type of change (delete unused ones)
Testing
Ran ./mfc.sh test -j 4 locally on Ubuntu/WSL with GNU compiler and MPI. 578 tests passed, 0 failed. The fix is output-neutral for valid cases — the newly-reached inactive-patch checks only abort on misconfigured inputs that no passing test exercises.
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