Skip to content

Commit 7d4e2cc

Browse files
committed
FIX: Handle missing history output in Driver interface instead of Integration core
1 parent 20be994 commit 7d4e2cc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

SU2_CFD/include/drivers/CDriverBase.hpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,13 @@ class CDriverBase {
116116
* \return Value of the output.
117117
*/
118118
inline passivedouble GetOutputValue(const std::string& output_name) const {
119-
return SU2_TYPE::GetValue(output_container[MESH_0]->GetHistoryFieldValue(output_name));
119+
const auto& list = output_container[MESH_0]->GetHistoryOutputList();
120+
for (const auto& val : list) {
121+
if (val == output_name) {
122+
return SU2_TYPE::GetValue(output_container[MESH_0]->GetHistoryFieldValue(output_name));
123+
}
124+
}
125+
return 0.0;
120126
}
121127

122128
/*!

0 commit comments

Comments
 (0)