[SPH] give the option to print CFL calculation detail (e.g. per CFL prints)#1888
Conversation
|
Thanks @tdavidcl for opening this PR! You can do multiple things directly here: Once the workflow completes a message will appear displaying informations related to the run. Also the PR gets automatically reviewed by gemini, you can: |
There was a problem hiding this comment.
Code Review
This pull request refactors the CFL timestep calculation in the SPH solver into separate modular nodes (ComputeCFL_Courant, ComputeCFL_Force, and ComputeCFL_DivB_Cleaning) and introduces a configuration option show_cfl_detail to log a detailed breakdown of the different CFL contributions. However, a critical bug was identified: when show_cfl_detail is disabled, the dt_part field is never updated with the calculated SPH timesteps, leaving it filled with infinity. A suggestion is provided to ensure save_dt_min_to_dt_part() is called even when detailed logging is disabled.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Workflow reportworkflow report corresponding to commit 15d9239 Pre-commit check reportPre-commit check: ✅ Test pipeline can run. Clang-tidy diff reportDoxygen diff with
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a show_cfl_detail configuration option to output detailed CFL timestep information, refactoring the CFL calculations in Solver.cpp into dedicated solver graph nodes (ComputeCFL_Courant, ComputeCFL_Force, and ComputeCFL_DivB_Cleaning). The review feedback highlights critical division-by-zero risks in these new nodes when vsig_a, abs_a_a, or vclean_a are zero, and suggests adding guards to prevent NaNs or infinities from crashing the simulation.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
No description provided.