From fdcf06f6b21f94a375632e97aad55c5543f40b9e Mon Sep 17 00:00:00 2001 From: Johannes Pfeifer <jpfeifer@gmx.de> Date: Wed, 14 May 2025 12:51:14 +0200 Subject: [PATCH] Enable output option when no computing command is requested Cherry-pick of 6f4ba00f, related to #121 --- src/ModFile.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ModFile.cc b/src/ModFile.cc index a72c1d82..1081b762 100644 --- a/src/ModFile.cc +++ b/src/ModFile.cc @@ -802,8 +802,12 @@ ModFile::computingPass(bool no_tmp_terms, OutputType output, int params_derivs_o no_tmp_terms, block, use_dll); } } - else // No computing task requested, compute derivatives up to 2nd order by default - dynamic_model.computingPass(2, 0, global_eval_context, no_tmp_terms, block, use_dll); + else // No computing task requested, compute derivatives up to 2nd order by default unless + // output=third was requested + if (output == OutputType::third) + dynamic_model.computingPass(3, 0, global_eval_context, no_tmp_terms, block, use_dll); + else + dynamic_model.computingPass(2, 0, global_eval_context, no_tmp_terms, block, use_dll); if (linear) { -- GitLab