Пример #1
0
def test_vortexShearedDisc(run_reset_case, expected, load_errorfile):

    log = oftest.path_log()
    err = load_errorfile
    max_err_shape = abs(err.iloc[1, 1].max())
    max_err_mass = abs(err.iloc[:, 2].max())
    max_err_bound = abs(err.iloc[:, 3].max())
    scheme = run_reset_case.meta_data["reconScheme"]
    res = run_reset_case.meta_data["Res"]

    mask = (expected["reconScheme"] == scheme) & (expected["Res"] == res)

    expected_err_shape = expected[mask]["err_shape"].max()

    results["err_shape"].append(max_err_shape)
    results["err_mass"].append(max_err_mass)
    results["err_bound"].append(max_err_bound)
    results["runtime"].append(oftest.run_time(log)[0])
    results["reconScheme"].append(scheme)
    results["Res"].append(res)

    assert max_err_shape < expected_err_shape * 1.05
    assert max_err_mass <= 1e-13
    assert max_err_bound <= 5e-5
    assert oftest.case_status(log) == "completed"  # checks if run completes
Пример #2
0
def test_deformation(run_reset_case, expected, load_errorfiles):
    log = oftest.path_log()
    err = load_errorfiles
    max_err_shape = abs(err.iloc[1, 1].max())
    max_err_mass = abs(err.iloc[:, 2].max())
    max_err_bound = abs(err.iloc[:, 3].max())
    results["err_shape"].append(max_err_shape)
    results["err_mass"].append(max_err_mass)
    results["err_bound"].append(max_err_bound)
    results["runtime"].append(oftest.run_time(log)[0])
    results["reconScheme"].append(run_reset_case.meta_data["reconScheme"])
    results["Res"].append(run_reset_case.meta_data["Res"])

    assert max_err_shape < (expected * 1.05)
    assert max_err_mass <= 1e-13
    assert max_err_bound <= 5e-5
    assert oftest.case_status(log) == "completed"  # checks if run completes
Пример #3
0
def test_completed(run_reset_case):
    log = oftest.path_log()
    assert oftest.case_status(log) == 'completed'
Пример #4
0
 def test_completed(self, run_reset_case):
     log = oftest.path_log()
     assert oftest.case_status(
         log) == "completed"  # checks if run completes