示例#1
0
def test_partial_group_collapse4():
    xs.xs_cache.clear()

    E_g = np.array([0.0, 4.0, 8.0])
    E_n = np.array([0.0, 2.5, 5.0, 7.5, 10.0])

    phi_n = np.array([2.0, 1.0, 1.0, 1.0])
    sigma_n = np.array([2.0, 1.0, 1.0, 1.0])    

    sigma_g = xs.partial_group_collapse(sigma_n, E_g, E_n, phi_n)

    expected = np.array([4.6/2.6, 1.0])

    assert_array_equal(sigma_g, expected)
示例#2
0
def test_partial_group_collapse2():
    xs.xs_cache.clear()

    E_g = np.array([0.0, 5.0, 10.0])
    E_n = np.array([0.0, 5.0, 10.0])

    phi_n = np.array([2.0, 1.0])
    sigma_n = np.ones(2)    

    sigma_g = xs.partial_group_collapse(sigma_n, E_g, E_n, phi_n)

    expected = np.array([1.0, 1.0])

    assert_array_equal(sigma_g, expected)