Make the NEMO total-energy under-relaxation check reachable - #2884
Open
bellonarts wants to merge 2 commits into
Open
Make the NEMO total-energy under-relaxation check reachable#2884bellonarts wants to merge 2 commits into
bellonarts wants to merge 2 commits into
Conversation
In CNEMOEulerSolver::ComputeUnderRelaxationFactor the total-energy check (iVar == nVar-2) was nested inside the species block (iVar < nSpecies). Total energy sits at nSpecies+nDim, so the check could never run and the energy update was never under-relaxed. Close the species block first and evaluate the energy check on its own; no new logic is added. This changes the implicit update wherever the energy bound is active, so the affected NEMO regression vectors are rebaselined (serial: invwedge, visc_cone; parallel: invwedge_a, invwedge_msw, invwedge_roe, invwedge_lax, invwedge_ss_inlet, visc_cone, super_cat, ion_gy). The aarch64 vectors are left for a maintainer. A unit test builds a NEMO Euler solver on the unit box and checks that an over-large energy update is limited (it stays unlimited on the previous code) alongside a species control. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Update the branch-specific serial and two-rank aarch64 expectations from GitHub Actions run 33998938091 at exact pre-update head a495681. Artifact digest: sha256:4c9d814dd9a373592fce4c9f33f74e565e26016ee855b2df8660bbcc99e4d560. No x86 expectation or solver source changes.
Contributor
|
you don't have to write almost 100 lines to explain basically the movement of a closing brace :-) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The total energy check was inside the species block, so it never ran. I moved the closing brace so the check can run and limit the energy update.
I added a test that checks large energy updates are limited and smaller updates are left alone. I also updated the expected regression values.
This PR overlaps with #2883, which fixes the coarse viscous Jacobian edge length, and #2885, which fixes the viscous Jacobian blocks and assembly. All three update
visc_coneinserial_regression.pyandvisc_cone,super_cat, andion_gyinparallel_regression.py. After each merge, rebase the remaining PRs and update those expected values from their new CI runs.PR Checklist
pre-commit run --allto format old commits.