def test_log_status():
    dir_name = path.dirname(path.abspath(__file__))
    f_completed = path.join(dir_name, "log.completed")
    f_fe = path.join(dir_name, "log.fatalError")
    f_fpe = path.join(dir_name, "log.floatPointExp")
    f_running = path.join(dir_name, "log.running")

    assert oftest.case_status(f_completed) == "completed"
    assert oftest.case_status(f_fe) == "error"
    assert oftest.case_status(f_fpe) == "error"
    assert oftest.case_status(f_running) == "running"
Beispiel #2
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
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
def test_completed(run_reset_case):
    log = oftest.path_log()
    assert oftest.case_status(log) == 'completed'
Beispiel #5
0
 def test_completed(self, run_reset_case):
     log = oftest.path_log()
     assert oftest.case_status(
         log) == "completed"  # checks if run completes