From 38fc9cb4514c219bd875376510b961165e7274cf Mon Sep 17 00:00:00 2001 From: Sabet Seraj <48863473+sseraj@users.noreply.github.com> Date: Mon, 9 May 2022 11:40:03 -0400 Subject: [PATCH] Increased ANKSwitchTol (#218) * Increased ANKSwitchTol * suppress terminal output for failed mesh test --- adflow/pyADflow.py | 2 +- doc/options.yaml | 2 +- tests/reg_tests/test_solve.py | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/adflow/pyADflow.py b/adflow/pyADflow.py index 682bbdc22..ce5311688 100644 --- a/adflow/pyADflow.py +++ b/adflow/pyADflow.py @@ -4999,7 +4999,7 @@ def _getDefaultOptions(): # Approximate Newton-Krylov Parameters "useANKSolver": [bool, True], "ANKUseTurbDADI": [bool, True], - "ANKSwitchTol": [float, 1.0], + "ANKSwitchTol": [float, 1e3], "ANKSubspaceSize": [int, -1], "ANKMaxIter": [int, 40], "ANKLinearSolveTol": [float, 0.05], diff --git a/doc/options.yaml b/doc/options.yaml index f10739b0f..3db7ea50d 100644 --- a/doc/options.yaml +++ b/doc/options.yaml @@ -773,7 +773,7 @@ ANKUseTurbDADI: ANKSwitchTol: desc: > Relative convergence in the residual norm before we switch to the ANK solver. - A value of 1.0 means that the ANK solver is used from the first iteration. + For most cases, the default value should ensure that the ANK solver is used from the first iteration, even after design changes. ANKSubspaceSize: desc: > diff --git a/tests/reg_tests/test_solve.py b/tests/reg_tests/test_solve.py index 5f0af2aff..45a361010 100644 --- a/tests/reg_tests/test_solve.py +++ b/tests/reg_tests/test_solve.py @@ -124,6 +124,9 @@ def test_solve(self): class TestFailedMesh(unittest.TestCase): + + N_PROCS = 1 + def test_failed_mesh(self): options = copy.copy(adflowDefOpts) options.update(