From 01b4c833abcd0450e1fe4618fb03e51b1a27380c Mon Sep 17 00:00:00 2001 From: Chris Zhang Date: Wed, 2 Oct 2024 22:06:59 -0700 Subject: [PATCH] fix tests --- toolchain/mfc/test/case.py | 3 --- toolchain/mfc/test/cases.py | 8 ++++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/toolchain/mfc/test/case.py b/toolchain/mfc/test/case.py index 9e05ebfcd..1201daf48 100644 --- a/toolchain/mfc/test/case.py +++ b/toolchain/mfc/test/case.py @@ -230,9 +230,6 @@ def compute_tolerance(self) -> float: tolerance = 1e-5 tolerance = 3e-12 - if self.params["weno_order"] == 7: - tolerance = 1e-11 - return tolerance @dataclasses.dataclass diff --git a/toolchain/mfc/test/cases.py b/toolchain/mfc/test/cases.py index 8f2c51269..b786c3efa 100644 --- a/toolchain/mfc/test/cases.py +++ b/toolchain/mfc/test/cases.py @@ -79,7 +79,7 @@ def alter_capillary(): cases.append(define_case_d(stack, [f"capillary=T","model_eqns=3"],{})) stack.pop() - def alter_weno(): + def alter_weno(dimInfo): for weno_order in [3, 5, 7]: stack.push(f"weno_order={weno_order}", {'weno_order': weno_order}) for mapped_weno, wenoz, teno, mp_weno in itertools.product('FT', repeat=4): @@ -99,12 +99,12 @@ def alter_weno(): if "wenoz" in data and weno_order == 7: data["wenoz_q"] = 3.0 - if weno_order == 7: + if weno_order == 7 and "z" in dimInfo[0]: stack.push("", {'m': 35, 'n': 35, 'p': 35}) cases.append(define_case_d(stack, trace, data)) - if weno_order == 7: + if weno_order == 7 and "z" in dimInfo[0]: stack.pop() stack.pop() @@ -699,7 +699,7 @@ def foreach_dimension(): for dimInfo, dimParams in get_dimensions(): stack.push(f"{len(dimInfo[0])}D", dimParams) alter_bcs(dimInfo) - alter_weno() + alter_weno(dimInfo) alter_num_fluids(dimInfo) if len(dimInfo[0]) == 2: alter_2d()