-
Notifications
You must be signed in to change notification settings - Fork 106
Non-Uniform WENO7 #743
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
Non-Uniform WENO7 #743
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #743 +/- ##
==========================================
- Coverage 42.98% 42.97% -0.01%
==========================================
Files 61 61
Lines 16384 16492 +108
Branches 1889 1890 +1
==========================================
+ Hits 7042 7087 +45
- Misses 8293 8356 +63
Partials 1049 1049 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
This is well done, I can already tell. I will do code review soon. |
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.
Are stretched grids included in the test suite? It seems perhaps not. Would be good to have. Codecov also seems to thing many lines of code are not tested. [update: mind you, codecov could be wrong. it isn't a perfect tool and I'm still learning its limits]
I think all added lines are covered; removing any line will cause the test suites to fail. My guess is that Codecov has trouble correctly identifying lines in m_weno.fpp. In the past, Codecov has misidentified many covered lines as uncovered. You can see it here. There is only one set of equations for both non-uniform and uniform grids (same as WENO3/5). The non-uniform coefficients simplify to the uniform grid coefficients when the grids are uniform. Therefore, the existing test suites cover all the new equations. |
🫡 you are correct on all counts. Thanks for your continued high-quality PRs! |
Description
#665 MFC now supports stretched grids for 7th order WENO (-JS, -M, -Z).
(Stretched grids for TENO7 are not ready yet)
Closes #665
Implementation Details
The WENO7 golden files were regenerated, which was necessary due to machine errors introduced by the large number of operations. The consistency of the new non-uniform formulas with the uniform formulas in uniform grid cases is demonstrated in the 1D Shu-Osher Uniform Grid plot. The old test suites also passed with increased tolerance.
The code contains ridiculously long equations, which have already reached their simplest form. I made a controversial decision to keep the lines long, as it improves code aesthetics (avoiding having pages of equations displayed while scrolling through) and because the equations are not human-readable anyway. Please let me know if alternative methods are preferred.
Equation Derivation
None of the equations from published papers are applicable. They are either approximations, don't solve the problems we need, or lack explicit forms. MFC also uses a very specific form that requires the coefficients to be for cell value differences rather than for the cell values themselves (this reduces computational costs). I had to derive the equations myself.
Non-uniform TENO7 requires different ideal weight formulas, which I need to derive. They aren't too complex, but I will complete them in another PR in the coming days.
Type of change
Scope
How Has This Been Tested?
Old Test Suites (with increased tolerance)
1D Shu-Osher Uniform Grid

1D Shu-Osher Non-Uniform Grid

2D_hardcodied_ic
in examples (has grid stretching)** WENO5 is the default case (same result on documentation)
Checklist
docs/
)examples/
that demonstrate my new feature performing as expected.They run to completion and demonstrate "interesting physics"
./mfc.sh format
before committing my codeIf your code changes any code source files (anything in
src/simulation
)To make sure the code is performing as expected on GPU devices, I have:
nvtx
ranges so that they can be identified in profiles./mfc.sh run XXXX --gpu -t simulation --nsys
, and have attached the output file (.nsys-rep
) and plain text results to this PR nsys.txt./mfc.sh run XXXX --gpu -t simulation --omniperf
, and have attached the output file and plain text results to this PR.