From b16afb3833bcbf0b4665d495ad30105e4b4e3816 Mon Sep 17 00:00:00 2001 From: Thomas Fischer <thomas.fischer@ufz.de> Date: Thu, 29 Nov 2018 12:37:29 +0100 Subject: [PATCH] [PL/Out] Iterate over secondary variables. --- ProcessLib/Output/ProcessOutput.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/ProcessLib/Output/ProcessOutput.cpp b/ProcessLib/Output/ProcessOutput.cpp index 95267db18e4..571885d282b 100644 --- a/ProcessLib/Output/ProcessOutput.cpp +++ b/ProcessLib/Output/ProcessOutput.cpp @@ -211,23 +211,22 @@ void processOutputData( } // Secondary variables output - for (auto const& external_variable_name : output_variables) + for (auto const& external_variable_name : secondary_variables) { - if (!already_output.insert(external_variable_name).second) + auto const& name = external_variable_name.first; + if (!already_output.insert(name).second) { // no insertion took place, output already done continue; } - addSecondaryVariableNodes( - t, x, dof_table, secondary_variables.get(external_variable_name), - external_variable_name, mesh); + addSecondaryVariableNodes(t, x, dof_table, + secondary_variables.get(name), name, mesh); + if (process_output.output_residuals) { addSecondaryVariableResiduals( - t, x, dof_table, - secondary_variables.get(external_variable_name), - external_variable_name, mesh); + t, x, dof_table, secondary_variables.get(name), name, mesh); } } -- GitLab