-
Notifications
You must be signed in to change notification settings - Fork 107
Refac helpers #901
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Refac helpers #901
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to b007e50
Previous suggestions✅ Suggestions up to commit 47fa3d7
|
/improve |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #901 +/- ##
==========================================
+ Coverage 45.77% 45.82% +0.05%
==========================================
Files 68 68
Lines 18664 18656 -8
Branches 2251 2247 -4
==========================================
+ Hits 8543 8550 +7
+ Misses 8763 8753 -10
+ Partials 1358 1353 -5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors helper routines for stability, dt, and CFL calculations to reduce code duplication and improve maintainability. Key changes include the extraction of common CFL logic into the new function f_compute_multidim_cfl_terms, the introduction of f_compute_filtered_dtheta for Fourier filtering adjustments, and updates to inline expressions in viscous CFL calculations.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
src/simulation/m_sim_helpers.f90 | Refactors CFL calculation code by introducing helper functions and consolidating repeated logic in stability and dt routines. |
.github/workflows/bench.yml | Updates the conditional for running benchmarks to include additional criteria for pull request events. |
Comments suppressed due to low confidence (1)
src/simulation/m_sim_helpers.f90:170
- [nitpick] The check 'if (p > 0 .or. n > 0)' differentiates the 2D/3D and 1D cases but may be unclear to the reader. Consider adding a comment to explain the meaning and origin of the variables 'p' and 'n' in this context.
if (p > 0 .or. n > 0) then
User description
Refactors some helper functions.
PR Type
Enhancement
Description
Extract common CFL calculation logic into reusable function
Consolidate repeated code patterns in stability and dt calculations
Simplify viscous CFL calculations with inline expressions
Improve code maintainability and reduce duplication
Changes walkthrough 📝
m_sim_helpers.f90
Refactor CFL calculations with helper function
src/simulation/m_sim_helpers.f90
f_compute_cfl_terms
function to consolidate CFL calculationss_compute_stability_from_dt
to use new helper functions_compute_dt_from_cfl
to use new helper function