Fix integral zmin/zmax never initialized (copy-paste of ymin/ymax)#1177
Fix integral zmin/zmax never initialized (copy-paste of ymin/ymax)#1177sbryngelson wants to merge 1 commit intoMFlowCode:masterfrom
Conversation
|
CodeAnt AI is reviewing your PR. Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Nitpicks 🔍
|
|
CodeAnt AI finished reviewing your PR. |
There was a problem hiding this comment.
Pull request overview
This PR fixes a copy-paste error in the volume integral initialization code where z-axis bounds were incorrectly set to y-axis bounds, leaving zmin and zmax uninitialized.
Changes:
- Corrected initialization of
integral(i)%zminandintegral(i)%zmaxto usezmin/zmaxinstead of the duplicatedymin/ymax
The z-bounds initialization for volume integrals repeats ymin/ymax instead of zmin/zmax. 3D volume integrals use uninitialized z-bounds. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
25032f8 to
97e530d
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1177 +/- ##
=======================================
Coverage 44.05% 44.05%
=======================================
Files 70 70
Lines 20498 20499 +1
Branches 1990 1990
=======================================
+ Hits 9030 9031 +1
Misses 10329 10329
Partials 1139 1139 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
Severity: CRITICAL — 3D volume integrals use garbage z-bounds.
File:
src/simulation/m_global_parameters.fpp, lines 817-818The initialization loop for volume integral bounds repeats
ymin/ymaxon the lines that should setzmin/zmax, a copy-paste error from the y-bounds initialization just above.Before
After
Why this went undetected
Only affects 3D simulations that use volume integral diagnostics. The y-bounds are initialized twice (harmlessly), masking the fact that z-bounds are never set.
Test plan
🤖 Generated with Claude Code
Fixes #1198