예제 #1
0
파일: demos.py 프로젝트: pymor/pymor
def test_parabolic_mor_results():
    from pymordemos import parabolic_mor

    args = ["pymor", "greedy", 5, 20, 3]
    results = _test_demo(lambda: parabolic_mor.main(*args))
    check_results(
        "test_parabolic_mor_results",
        args,
        results,
        (1e-13, 1e-7),
        "basis_sizes",
        "norms",
        "max_norms",
        (1e-13, 4.0),
        "errors",
        "max_errors",
        "rel_errors",
        "max_rel_errors",
        "estimates",
        "max_estimates",
        "effectivities",
        "min_effectivities",
        "max_effectivities",
        "errors",
    )
예제 #2
0
파일: demos.py 프로젝트: pymor/pymor
def test_thermalblock_results(thermalblock_args):
    from pymordemos import thermalblock

    results = _test_demo(lambda: thermalblock.main(list(map(str, thermalblock_args[1]))))
    # due to the symmetry of the problem and the random test parameters, the estimated
    # error may change a lot
    # fenics varies more than others between MPI/serial
    first_tolerance = (1e-13, 3.5e-6) if "--fenics" in thermalblock_args[1] else (1e-13, 1e-7)
    check_results(
        "test_thermalblock_results",
        thermalblock_args[1],
        results,
        first_tolerance,
        "basis_sizes",
        "norms",
        "max_norms",
        (1e-13, 4.0),
        "errors",
        "max_errors",
        "rel_errors",
        "max_rel_errors",
        "estimates",
        "max_estimates",
        "effectivities",
        "min_effectivities",
        "max_effectivities",
        "errors",
    )
예제 #3
0
파일: demos.py 프로젝트: OVGULIU/pymor
def test_burgers_ei_results():
    from pymordemos import burgers_ei
    args = list(map(str, [1, 2, 10, 100, 10, 30]))
    ei_results, greedy_results = _test_demo(lambda: burgers_ei.main(args))
    ei_results['greedy_max_errs'] = greedy_results['max_errs']
    check_results('test_burgers_ei_results', args, ei_results,
                  (1e-13, 1e-7), 'errors', 'triangularity_errors', 'greedy_max_errs')
예제 #4
0
def test_burgers_ei_results():
    from pymordemos import burgers_ei
    args = list(map(str, [1, 2, 10, 100, 10, 30]))
    ei_results, greedy_results = _test_demo(lambda: burgers_ei.main(args))
    ei_results['greedy_max_errs'] = greedy_results['max_errs']
    check_results('test_burgers_ei_results', args, ei_results,
                  (1e-13, 1e-7), 'errors', 'triangularity_errors', 'greedy_max_errs')
예제 #5
0
파일: demos.py 프로젝트: OVGULIU/pymor
def test_parabolic_mor_results():
    from pymordemos import parabolic_mor
    args = ['pymor', 'greedy', 5, 20, 3]
    results = _test_demo(lambda: parabolic_mor.main(*args))
    check_results('test_parabolic_mor_results', args, results,
                  (1e-13, 1e-7), 'basis_sizes', 'norms', 'max_norms',
                  (1e-13, 4.), 'errors', 'max_errors', 'rel_errors', 'max_rel_errors',
                  'estimates', 'max_estimates', 'effectivities', 'min_effectivities', 'max_effectivities', 'errors')
예제 #6
0
def test_parabolic_mor_results():
    from pymordemos import parabolic_mor
    args = ['pymor', 'greedy', 5, 20, 3]
    results = _test_demo(lambda: parabolic_mor.main(*args))
    check_results('test_parabolic_mor_results', args, results,
                  (1e-13, 1e-7), 'basis_sizes', 'norms', 'max_norms',
                  (1e-13, 4.), 'errors', 'max_errors', 'rel_errors', 'max_rel_errors',
                  'estimates', 'max_estimates', 'effectivities', 'min_effectivities', 'max_effectivities', 'errors')
예제 #7
0
파일: demos.py 프로젝트: pymor/pymor
def test_burgers_ei_results():
    from pymordemos import burgers_ei

    args = list(map(str, [1, 2, 10, 100, 10, 30]))
    ei_results, greedy_results = _test_demo(lambda: burgers_ei.main(args))
    ei_results["greedy_max_errs"] = greedy_results["max_errs"]
    check_results(
        "test_burgers_ei_results", args, ei_results, (1e-13, 1e-7), "errors", "triangularity_errors", "greedy_max_errs"
    )
예제 #8
0
def test_thermalblock_results(thermalblock_args):
    from pymordemos import thermalblock
    results = _test_demo(lambda: thermalblock.main(list(map(str, thermalblock_args[1]))))
    # due to the symmetry of the problem and the random test parameters, the estimated
    # error may change a lot
    check_results('test_thermalblock_results', thermalblock_args[1], results,
                  (1e-13, 1e-7), 'basis_sizes', 'norms', 'max_norms',
                  (1e-13, 4.), 'errors', 'max_errors', 'rel_errors', 'max_rel_errors',
                  'estimates', 'max_estimates', 'effectivities', 'min_effectivities', 'max_effectivities', 'errors')
예제 #9
0
파일: demos.py 프로젝트: meretp/pymor
def test_burgers_ei_results():
    from pymordemos import burgers_ei
    app = Typer()
    app.command()(burgers_ei.main)
    args = list(map(str, [1, 2, 10, 100, 10, 30]))
    _test_demo(lambda: runner.invoke(app, args, catch_exceptions=False))
    ei_results, greedy_results = burgers_ei.test_results
    ei_results['greedy_max_errs'] = greedy_results['max_errs']
    check_results('test_burgers_ei_results', args, ei_results, (1e-13, 1e-7),
                  'errors', 'triangularity_errors', 'greedy_max_errs')
예제 #10
0
파일: demos.py 프로젝트: OVGULIU/pymor
def test_thermalblock_results(thermalblock_args):
    from pymordemos import thermalblock
    results = _test_demo(lambda: thermalblock.main(list(map(str, thermalblock_args[1]))))
    # due to the symmetry of the problem and the random test parameters, the estimated
    # error may change a lot
    # fenics varies more than others between MPI/serial
    first_tolerance = (1e-13, 3.5e-6) if '--fenics' in thermalblock_args[1] else (1e-13, 1e-7)
    check_results('test_thermalblock_results', thermalblock_args[1], results,
                  first_tolerance, 'basis_sizes', 'norms', 'max_norms',
                  (1e-13, 4.), 'errors', 'max_errors', 'rel_errors', 'max_rel_errors',
                  'estimates', 'max_estimates', 'effectivities', 'min_effectivities', 'max_effectivities', 'errors')
예제 #11
0
파일: demos.py 프로젝트: simon-ca/pymor
def test_thermalblock_results(thermalblock_args):
    from pymordemos import thermalblock
    results = _test_demo(
        lambda: thermalblock.main(list(map(str, thermalblock_args[1]))))
    # due to the symmetry of the problem and the random test parameters, the estimated
    # error may change a lot
    check_results('test_thermalblock_results', thermalblock_args[1], results,
                  (1e-13, 1e-7), 'basis_sizes', 'norms', 'max_norms',
                  (1e-13, 4.), 'errors', 'max_errors', 'rel_errors',
                  'max_rel_errors', 'estimates', 'max_estimates',
                  'effectivities', 'min_effectivities', 'max_effectivities',
                  'errors')
예제 #12
0
파일: demos.py 프로젝트: meretp/pymor
def test_thermalblock_results(thermalblock_args):
    from pymordemos import thermalblock
    app = Typer()
    app.command()(thermalblock.main)
    args = [str(arg) for arg in thermalblock_args[1]]
    _test_demo(lambda: runner.invoke(app, args, catch_exceptions=False))
    results = thermalblock.test_results
    # due to the symmetry of the problem and the random test parameters, the estimated
    # error may change a lot
    # fenics varies more than others between MPI/serial
    first_tolerance = (
        1e-13, 3.5e-6) if '--fenics' in thermalblock_args[1] else (1e-13, 1e-7)
    check_results('test_thermalblock_results', thermalblock_args[1], results,
                  first_tolerance, 'basis_sizes', 'norms', 'max_norms',
                  (1e-13, 4.), 'errors', 'max_errors', 'rel_errors',
                  'max_rel_errors', 'error_estimates', 'max_error_estimates',
                  'effectivities', 'min_effectivities', 'max_effectivities',
                  'errors')