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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)