Skip to content

Fix bounds assertion in GetBoxIndex; refactor SolveDirectionThomas; fix license header#19

Merged
salva24 merged 8 commits intocompiler-research:masterfrom
aminatpwk:bug-fixes/aminatpwk
Mar 26, 2026
Merged

Fix bounds assertion in GetBoxIndex; refactor SolveDirectionThomas; fix license header#19
salva24 merged 8 commits intocompiler-research:masterfrom
aminatpwk:bug-fixes/aminatpwk

Conversation

@aminatpwk
Copy link
Copy Markdown
Contributor

This PR addresses three issues identified during a code review of the diffusion solver and utility files.

Commit 1: Added bounds assertion to GetBoxIndex (diffusion_thomas_algorithm.cc/h);
Commit 2: Refactor- Replaced lambda dispatch with std::array lookup in SolveDirectionThomas (diffusion_thomas_algorithm.cc);
.at() throws std::out_of_range on an invalid direction value instead of silently falling through to the z-direction branch
Commit 3: Fixed license header in utils_aux.cc;

Added test file test/test-diffusion.cc to cover changes made for GetBoxIndex;

…thm header file for test validation execution purposes
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

@aminatpwk aminatpwk requested a review from salva24 March 23, 2026 20:25
@github-actions
Copy link
Copy Markdown

clang-tidy review says "All clean, LGTM! 👍"

@github-actions
Copy link
Copy Markdown

clang-tidy review says "All clean, LGTM! 👍"

@salva24 salva24 merged commit 6145491 into compiler-research:master Mar 26, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants