SU2
SU2 copied to clipboard
[WIP] GradVal FIX for Massflow SWP
Proposed Changes
As mentioned in the last few dev meetings, there was some error with GradVal for the streamwise solver with Massflow. This was because the tape was not cleared during SetRecoding. In the current version, the register of extra solutions is moved to Register Variables and gradients look consistent.
Related Work
SWP-Isothermal with mass flow also shows good gradient validation after implementing this fix. In theory, this should not break any other part of the code.
PR Checklist
Put an X by all that apply. You can fill this out after submitting the PR. If you have any questions, don't hesitate to ask! We want to help. These are a guide for you to know what the reviewers will be looking for in your contribution.
- [ x ] I am submitting my contribution to the develop branch.
- [ x ] My contribution generates no new compiler warnings (try with --warnlevel=3 when using meson).
- [ x ] My contribution is commented and consistent with SU2 style (https://su2code.github.io/docs_v7/Style-Guide/).
- [ ] I used the pre-commit hook to prevent dirty commits and used
pre-commit run --all
to format old commits. - [ ] I have added a test case that demonstrates my contribution, if necessary.
- [ ] I have updated appropriate documentation (Tutorials, Docs Page, config_template.cpp), if necessary.
CAD Sensitivites after making changes, gradients are symmetric for the upper and lower variables.
CAD Sensitivities before making changes, gradients are not-symmetric for the upper and lower variables.
Test Case!
FFD Sensitives also co-relate well