Conversation
Review Summary by QodoAdd IGR User Guide test cases with Double Mach Reflection support
WalkthroughsDescription• Add Double Mach Reflection test case with shock boundary conditions • Implement three new 2D IGR test cases (isentropic vortex, Riemann test, double mach) • Add helper subroutines for 2D blending and entropy wave fluctuations • Fix acoustic source GPU copy edge case when count is zero • Update Taylor Green Vortex case parameters and enable FFT output Diagramflowchart LR
A["Global Parameters"] -->|"double_mach flag"| B["Boundary Conditions"]
A -->|"shock parameters"| C["Initial Conditions"]
B -->|"reflective BC"| D["Double Mach Setup"]
C -->|"cases 283-285"| D
E["Blending Subroutines"] -->|"symm_2d_blending"| C
F["Acoustic Source"] -->|"fix zero-size copy"| G["GPU Update"]
D -->|"test cases"| H["Example Cases"]
File Changes1. src/common/m_boundary_common.fpp
|
|
Claude Code Review Head SHA: 19bd979 Files changed:
Findings:
|
📝 WalkthroughWalkthroughThis pull request introduces support for a Double Mach reflection test case across the codebase. It adds three new numerical example configurations (2D Isentropic Vortex, 2D Riemann test, and 2D/3D Double Mach) with corresponding documentation, case files, and README entries. The implementation spans multiple modules: hardcoded initial-condition cases for the three test setups, a new boundary-condition path with shock position tracking and smoothed transitions, global parameter declarations for Double Mach settings, MPI broadcast extensions, and toolchain parameter registration. Supporting changes include helper subroutines for symmetric 2D blending, GPU-guarded acoustic source updates, and test golden output files. The Taylor Green Vortex example was also updated with modified resolution, Reynolds number, and output configuration. 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
There was a problem hiding this comment.
Actionable comments posted: 9
🧹 Nitpick comments (4)
examples/3D_IGR_33jet/README.md (1)
1-1: Consider expanding the README with usage and setup information.While the header provides helpful context about the case's origin and references, users would benefit from additional sections typical of example READMEs:
- Brief description of the physical setup (geometry, flow conditions, physics)
- Key parameters and their significance
- Instructions to run the case
- Expected outputs or results
- Links to papers or detailed documentation (e.g., the ACM Gordon Bell submission, IGR User Guide)
This would improve the onboarding experience for users trying to understand and reproduce this test case.
examples/2D_IGR_isentropicvortex/case.py (2)
5-7: Unused parameters defined.The variables
epsilon,alpha, andgammaare defined but never referenced in the configuration dictionary. Consider removing them to avoid confusion, or if they're intended for the hardcoded IC (hcid=283), add a comment clarifying their purpose.🧹 Suggested cleanup
-# Parameters -epsilon = "5d0" -alpha = "1d0" -gamma = "1.4" - - # Numerical setup
17-17: Clarify time-step calculation intent.The expression
int(20 / (0.1 * mydt))is equivalent toint(200 / mydt). If the intent is a simulation time of 200 units, consider writing it more explicitly for clarity.📝 Suggested clarification
-Nt = int(20 / (0.1 * mydt)) +# Total simulation time: 200 time units +Nt = int(200 / mydt)tests/F532C641/golden-metadata.txt (1)
5-7: Consider regenerating this golden from a clean tree.Line 7 records the baseline as
dirty, which makes this metadata harder to tie back to a single source snapshot. Re-running./mfc.sh test -o F532C641 --generateafter the code is committed would make future golden diffs easier to audit.Based on learnings, golden files are generated with
./mfc.sh test --generateand stored as binary snapshots intests/<hash>/; do not manually edit golden files.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 910509f2-eea3-4092-868b-614243610edf
📒 Files selected for processing (33)
docs/documentation/case.mdexamples/2D_IGR_double_mach/README.mdexamples/2D_IGR_double_mach/case.pyexamples/2D_IGR_isentropicvortex/README.mdexamples/2D_IGR_isentropicvortex/case.pyexamples/2D_IGR_riemann_test/README.mdexamples/2D_IGR_riemann_test/case.pyexamples/3D_IGR_33jet/README.mdexamples/3D_IGR_TaylorGreenVortex/README.mdexamples/3D_IGR_TaylorGreenVortex/case.pysrc/common/include/2dHardcodedIC.fppsrc/common/m_boundary_common.fppsrc/post_process/m_global_parameters.fppsrc/post_process/m_mpi_proxy.fppsrc/post_process/m_start_up.fppsrc/pre_process/m_global_parameters.fppsrc/pre_process/m_icpp_patches.fppsrc/pre_process/m_mpi_proxy.fppsrc/pre_process/m_start_up.fppsrc/simulation/m_acoustic_src.fppsrc/simulation/m_global_parameters.fppsrc/simulation/m_mpi_proxy.fppsrc/simulation/m_start_up.fpptests/43126861/golden-metadata.txttests/43126861/golden.txttests/E49EF7B6/golden-metadata.txttests/E49EF7B6/golden.txttests/F532C641/golden-metadata.txttests/F532C641/golden.txttoolchain/mfc/params/definitions.pytoolchain/mfc/params/descriptions.pytoolchain/mfc/params/namelist_parser.pytoolchain/mfc/test/cases.py
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1346 +/- ##
==========================================
+ Coverage 64.67% 65.50% +0.82%
==========================================
Files 70 70
Lines 18249 18349 +100
Branches 1504 1508 +4
==========================================
+ Hits 11803 12019 +216
+ Misses 5491 5363 -128
- Partials 955 967 +12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Add double_mach parameter with shock variables (xshock, cf, Mach, pshock, rhoshock, velshock, rho0_dm, p0_dm, u0_dm, v0_dm, xr_dm, theta_dm, gam_dm) across all 3 targets - Add 3 new hardcoded IC cases in 2dHardcodedIC.fpp: 283 (IGR isentropic vortex), 284 (2D IGR Riemann test), 285 (2D IGR double Mach reflection) - Add symm_2d_blending/blend subroutines in m_icpp_patches.fpp - Add double_mach boundary conditions in m_boundary_common.fpp (shock tracking, ghost cell overrides, reflective wall) - Add 3 new example cases: 2D_IGR_double_mach, 2D_IGR_isentropicvortex, 2D_IGR_riemann_test - Update 3D_IGR_TaylorGreenVortex example (N=127, Re=10000, V0=1.25*C0) - All 8 existing tests pass

Description
Case files and documentation for all 5 example cases used in the IGR User Guide paper.
3 new cases (2D_IGR_double_mach, 2D_IGR_isentropic_vortex and 2D_IGR_riemann_test)
3D_IGR_TaylorGreenVortex modified to include energy cascade in post_process
3D_IGR_33jet left as is with README.md
Description for all 5 cases included with a README.md in the case directory
Also included a 1-line fix for an acoustic source edge case that results in a 0-size copy from CPU to GPU (fails on amd compilers)
Fixes #(issue)
Type of change
Testing
How did you test your changes?
Checklist
See the developer guide for full coding standards.
GPU changes (expand if you modified
src/simulation/)AI code reviews
Reviews are not triggered automatically. To request a review, comment on the PR:
@coderabbitai review— incremental review (new changes only)@coderabbitai full review— full review from scratch/review— Qodo review/improve— Qodo code suggestions@claude full review— Claude full review (also triggers on PR open/reopen/ready)claude-full-review— Claude full review via label