From 861342106561f4a16f57058e2be30a4d20737aae Mon Sep 17 00:00:00 2001 From: Timothy Nunn Date: Wed, 14 Feb 2024 13:36:35 +0000 Subject: [PATCH 1/2] Correct nviter and convergence_parameter reporting in output --- process/solver.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/process/solver.py b/process/solver.py index 31551f53..046d03c9 100644 --- a/process/solver.py +++ b/process/solver.py @@ -169,7 +169,9 @@ def solve(self) -> int: if self.b is not None: B = np.identity(numerics.nvar) * self.b - def _solver_callback(i: int, _x, _result, convergence_param: float): + def _solver_callback(i: int, _result, _x, convergence_param: float): + numerics.nviter = i + 1 + global_variables.convergence_parameter = convergence_param print( f"{i+1} | Convergence Parameter: {convergence_param:.3E}", end="\r", From 3a7dacb5cea664f923dc716acfdd71f2488a830f Mon Sep 17 00:00:00 2001 From: Timothy Nunn Date: Wed, 14 Feb 2024 13:56:36 +0000 Subject: [PATCH 2/2] Exclude nviter from regression test comparison --- tests/regression/scenario.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/regression/scenario.py b/tests/regression/scenario.py index 63023106..9c4971f7 100644 --- a/tests/regression/scenario.py +++ b/tests/regression/scenario.py @@ -1,4 +1,5 @@ """Scenario class for an individual regression test case.""" + import logging import sys import os @@ -31,6 +32,7 @@ "sig_tf_r_max(1)", "sqsumsq", "ric(nohc)", + "nviter", } EXCLUSION_PATTERNS = [ r"normres\d{3}", # normres and 3 digits