Example #1
0
def test_convergence_section_parser():
    test_convergence_section = {'type': 'damped',
                                'lock_t_inner_cyles': 1,
                                't_inner_update_exponent': -0.5,
                                'global_convergence_parameters' : {
                                    'damping_constant': 0.5},
                                't_rad': {'damping_constant':1.0}}

    parsed_convergence_section = config_reader.parse_convergence_section(
        test_convergence_section)

    assert_almost_equal(parsed_convergence_section['t_rad']['damping_constant'],
                        1.0)

    assert_almost_equal(parsed_convergence_section['w']['damping_constant'],
                        0.5)
Example #2
0
def test_convergence_section_parser():
    test_convergence_section = {'type': 'damped',
                                'lock_t_inner_cyles': 1,
                                't_inner_update_exponent': -0.5,
                                'damping_constant': 0.5,
                                'threshold':0.05,
                                'fraction': 0.8,
                                'hold_iterations': 3,
                                't_rad': {'damping_constant':1.0}}

    parsed_convergence_section = config_reader.parse_convergence_section(
        test_convergence_section)

    assert_almost_equal(parsed_convergence_section['t_rad']['damping_constant'],
                        1.0)

    assert_almost_equal(parsed_convergence_section['w']['damping_constant'],
                        0.5)
Example #3
0
def test_convergence_section_parser():
    test_convergence_section = {'type': 'damped',
                                'lock_t_inner_cyles': 1,
                                't_inner_update_exponent': -0.5,
                                'damping_constant': 0.5,
                                'threshold':0.05,
                                'fraction': 0.8,
                                'hold_iterations': 3,
                                't_rad': {'damping_constant':1.0}}

    parsed_convergence_section = config_reader.parse_convergence_section(
        test_convergence_section)

    assert_almost_equal(parsed_convergence_section['t_rad']['damping_constant'],
                        1.0)

    assert_almost_equal(parsed_convergence_section['w']['damping_constant'],
                        0.5)
def test_convergence_section_parser():
    test_convergence_section = {
        'type': 'damped',
        'lock_t_inner_cyles': 1,
        't_inner_update_exponent': -0.5,
        'global_convergence_parameters': {
            'damping_constant': 0.5
        },
        't_rad': {
            'damping_constant': 1.0
        }
    }

    parsed_convergence_section = config_reader.parse_convergence_section(
        test_convergence_section)

    assert_almost_equal(
        parsed_convergence_section['t_rad']['damping_constant'], 1.0)

    assert_almost_equal(parsed_convergence_section['w']['damping_constant'],
                        0.5)
Example #5
0
def test_convergence_section_parser():
    test_convergence_section = {
        "type": "damped",
        "lock_t_inner_cyles": 1,
        "t_inner_update_exponent": -0.5,
        "damping_constant": 0.5,
        "threshold": 0.05,
        "fraction": 0.8,
        "hold_iterations": 3,
        "t_rad": {
            "damping_constant": 1.0
        },
    }

    parsed_convergence_section = config_reader.parse_convergence_section(
        test_convergence_section)

    assert_almost_equal(
        parsed_convergence_section["t_rad"]["damping_constant"], 1.0)

    assert_almost_equal(parsed_convergence_section["w"]["damping_constant"],
                        0.5)