Skip to content

Commit a282e22

Browse files
committed
fix: add CUSTOM_OBJFUNC to historyMap.py and CFlowOutput.cpp
- Add if (false) AddHistoryOutput for CUSTOM_OBJFUNC in CFlowOutput.cpp so the generator can pick it up in future - Manually add CUSTOM_OBJFUNC entry to historyMap.py Fixes #2586
1 parent 4ed9f11 commit a282e22

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

SU2_CFD/src/output/CFlowOutput.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1789,6 +1789,9 @@ void CFlowOutput::AddAerodynamicCoefficients(const CConfig* config) {
17891789
AddHistoryOutput("AOA", "AoA", ScreenOutputFormat::FIXED, "AOA", "Angle of attack");
17901790

17911791
AddHistoryOutput("COMBO", "ComboObj", ScreenOutputFormat::SCIENTIFIC, "COMBO", "Combined obj. function value.", HistoryFieldType::COEFFICIENT);
1792+
// CUSTOM_OBJFUNC is added here so historyMap.py knows how to get its
1793+
// value, the actual output is COMBO.
1794+
if (false) AddHistoryOutput("CUSTOM_OBJFUNC", "ComboObj", ScreenOutputFormat::SCIENTIFIC, "COMBO", "Custom obj. function value.", HistoryFieldType::COEFFICIENT);
17921795
}
17931796

17941797
void CFlowOutput::SetAerodynamicCoefficients(const CConfig* config, const CSolver* flow_solver){

SU2_PY/SU2/io/historyMap.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,12 @@
310310
"HEADER": "ComboObj",
311311
"TYPE": "COEFFICIENT",
312312
},
313+
"CUSTOM_OBJFUNC": {
314+
"DESCRIPTION": "Custom obj. function value.",
315+
"GROUP": "COMBO",
316+
"HEADER": "ComboObj",
317+
"TYPE": "COEFFICIENT",
318+
},
313319
"DEFORM_ITER": {
314320
"DESCRIPTION": "Linear solver iterations for the mesh " "deformation",
315321
"GROUP": "DEFORM",

0 commit comments

Comments
 (0)