Add missing adjoint suffixes to get_adjointSuffix - #2909
Merged
pcarruscag merged 1 commit intoSep 17, 2026
Merged
Conversation
Eleven objectives that CConfig::GetObjFunc_Extension gives an adjoint file suffix (for example SURFACE_STATIC_TEMPERATURE, AVG_TEMPERATURE, SURFACE_SPECIES_0 and INVERSE_DESIGN_HEATFLUX) were missing from the Python name map, so the Python scripts stopped with "Unrecognized adjoint function name" for them. INVERSE_DESIGN_HEATFLUX was listed as INVERSE_DESIGN_HEAT, which is not an objective name in SU2.
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved review issues were identified.
Pull request overview
Updates Python adjoint suffix lookup to match the C++ objective definitions.
Changes:
- Corrects the inverse-design heat objective name.
- Adds suffix mappings for eleven objectives.
- Aligns Python output naming with
GetObjFunc_Extension.
File summaries
| File | Summary |
|---|---|
SU2_PY/SU2/io/tools.py |
Updates and expands adjoint objective suffix mappings. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Proposed Changes
Eleven objectives that
CConfig::GetObjFunc_Extensiongives an adjoint file suffix were missing fromget_adjointSuffixinSU2_PY/SU2/io/tools.py, so the Python scripts stop withUnrecognized adjoint function namewhen one of them is used:INVERSE_DESIGN_HEATFLUX,AVG_TEMPERATURE,SURFACE_STATIC_TEMPERATURE,SURFACE_SPECIES_0,SURFACE_SPECIES_VARIANCE,REFERENCE_GEOMETRY,REFERENCE_NODE,VOLUME_FRACTION,TOPOL_DISCRETENESS,TOPOL_COMPLIANCE,STRESS_PENALTYINVERSE_DESIGN_HEATFLUXwas listed asINVERSE_DESIGN_HEAT, which is not an objective name in SU2, so that entry is renamed. The suffixes are the ones fromGetObjFunc_Extension. After this change every objective with a suffix in CConfig is found byget_adjointSuffix.Related Work
Complements #2907, which corrects the suffixes of
TOTAL_PRESSURE_LOSSandKINETIC_ENERGY_LOSS. The two PRs do not conflict.PR Checklist
pre-commit run --allto format old commits.