コード例 #1
0
ファイル: test_tally.py プロジェクト: FlanFlanagan/pyne
def test_tally36():
    clean(["test_tally.h5"])
    write_arb_n("test_tally.h5","bob_geldof")
    tally = Tally("Current","Neutron",14,"Surface","Surface 14","Neutron Current Across surface 14",100.0)
    
    new_tally = Tally()
    new_tally.from_hdf5("test_tally.h5","bob_geldof",0)
    assert_equal(tally.tally_type,new_tally.tally_type)
コード例 #2
0
ファイル: test_tally.py プロジェクト: FlanFlanagan/pyne
def test_tally20():
    clean(["test_tally.h5"])
    tally = Tally("Flux","Photon",12,"Volume","Volume 12","Photon Flux in Cell 12",35.0,123.0)
    write_photon("test_tally.h5")

    new_tally = Tally()
    new_tally.from_hdf5("test_tally.h5","tally",0)
    assert_equal(tally.tally_name,new_tally.tally_name)
コード例 #3
0
def test_tally36():
    clean(["test_tally.h5"])
    write_arb_n("test_tally.h5", "bob_geldof")
    tally = Tally("Current", "Neutron", 14, "Surface", "Surface 14",
                  "Neutron Current Across surface 14", 100.0)

    new_tally = Tally()
    new_tally.from_hdf5("test_tally.h5", "bob_geldof", 0)
    assert_equal(tally.tally_type, new_tally.tally_type)
コード例 #4
0
def test_tally20():
    clean(["test_tally.h5"])
    tally = Tally("Flux", "Photon", 12, "Volume", "Volume 12",
                  "Photon Flux in Cell 12", 35.0, 123.0)
    write_photon("test_tally.h5")

    new_tally = Tally()
    new_tally.from_hdf5("test_tally.h5", "tally", 0)
    assert_equal(tally.tally_name, new_tally.tally_name)
コード例 #5
0
ファイル: test_tally.py プロジェクト: FlanFlanagan/pyne
def test_tally21a():
    clean(["test_tally_21.h5"])
    tally = Tally("Flux","Photon",12,"Volume","Volume 12","Photon Flux in Cell 12",35.0,123.0)
    write_photon("test_tally_21.h5")

    new_tally = Tally()
    new_tally.from_hdf5("test_tally_21.h5","/tally",0)

    assert_equal(tally.normalization,new_tally.normalization)
コード例 #6
0
def test_tally21a():
    clean(["test_tally_21.h5"])
    tally = Tally("Flux", "Photon", 12, "Volume", "Volume 12",
                  "Photon Flux in Cell 12", 35.0, 123.0)
    write_photon("test_tally_21.h5")

    new_tally = Tally()
    new_tally.from_hdf5("test_tally_21.h5", "/tally", 0)

    assert_equal(tally.normalization, new_tally.normalization)
コード例 #7
0
ファイル: test_tally.py プロジェクト: FlanFlanagan/pyne
def test_tally37():
    clean(["test_tally.h5"])
    write_arb_n("test_tally.h5","bob_geldof")
    write_arb_p("test_tally.h5","bob_geldof")

    tally = Tally("Flux","Photon",12,"Volume","Volume 12","Photon Flux in Cell 12",35.0)
    
    new_tally = Tally()
    new_tally.from_hdf5("test_tally.h5","bob_geldof",1)
    assert_equal(tally.tally_type,new_tally.tally_type)
コード例 #8
0
ファイル: test_tally.py プロジェクト: FlanFlanagan/pyne
def test_tally35():
    clean(["test_tally.h5"])
    write_photon("test_tally.h5")
    write_neutron("test_tally.h5")

    tally = Tally("Current","Neutron",14,"Surface","Surface 14","Neutron Current Across surface 14",100.0)
    new_tally = Tally()
    new_tally.from_hdf5("test_tally.h5","tally",0)

    assert_not_equal(tally.entity_size,new_tally.entity_size)
コード例 #9
0
ファイル: test_tally.py プロジェクト: FlanFlanagan/pyne
def test_tally22():
    clean(["test_tally.h5"])
    write_photon("test_tally.h5")
    write_neutron("test_tally.h5")

    # there are now two tallies in the h5 file
    tally = Tally("Current","Neutron",14,"Surface","Surface 14","Neutron Current Across surface 14",100.0) 
    new_tally = Tally()
    new_tally.from_hdf5("test_tally.h5","tally",1)
    assert_equal(tally.tally_type,new_tally.tally_type)
コード例 #10
0
def test_tally37():
    clean(["test_tally.h5"])
    write_arb_n("test_tally.h5", "bob_geldof")
    write_arb_p("test_tally.h5", "bob_geldof")

    tally = Tally("Flux", "Photon", 12, "Volume", "Volume 12",
                  "Photon Flux in Cell 12", 35.0)

    new_tally = Tally()
    new_tally.from_hdf5("test_tally.h5", "bob_geldof", 1)
    assert_equal(tally.tally_type, new_tally.tally_type)
コード例 #11
0
def test_tally35():
    clean(["test_tally.h5"])
    write_photon("test_tally.h5")
    write_neutron("test_tally.h5")

    tally = Tally("Current", "Neutron", 14, "Surface", "Surface 14",
                  "Neutron Current Across surface 14", 100.0)
    new_tally = Tally()
    new_tally.from_hdf5("test_tally.h5", "tally", 0)

    assert_not_equal(tally.entity_size, new_tally.entity_size)
コード例 #12
0
def test_tally22():
    clean(["test_tally.h5"])
    write_photon("test_tally.h5")
    write_neutron("test_tally.h5")

    # there are now two tallies in the h5 file
    tally = Tally("Current", "Neutron", 14, "Surface", "Surface 14",
                  "Neutron Current Across surface 14", 100.0)
    new_tally = Tally()
    new_tally.from_hdf5("test_tally.h5", "tally", 1)
    assert_equal(tally.tally_type, new_tally.tally_type)
コード例 #13
0
ファイル: test_tally.py プロジェクト: WireROP/pyne-omg
def test_tally38():
    clean(["test_tally.h5"])

    tally = Tally("Current", ["Neutron", "Proton"], 14, "Surface",
                  "Surface 14", "Neutron Current Across surface 14", 100.0)
    tally.write_hdf5("test_tally.h5", "tally")

    new_tally = Tally()
    new_tally.from_hdf5("test_tally.h5", "tally")

    assert_not_equal(tally.particle_names, new_tally.particle_names)
コード例 #14
0
ファイル: test_tally.py プロジェクト: pyne/pyne
def test_tally30():
    clean(["test_tally.h5"])
    write_photon("test_tally.h5")
    write_neutron("test_tally.h5")

    tally = Tally(
        "Current",
        "Neutron",
        14,
        "Surface",
        "Surface 14",
        "Neutron Current Across surface 14",
        100.0,
    )
    new_tally = Tally()
    new_tally.from_hdf5("test_tally.h5", "tally", 0)

    assert_not_equal(tally.particle_names, new_tally.particle_names)