Пример #1
0
def metadata():
    from pyne import dagmc
    dagmc.load(path)

    rets1 = [dagmc.volume_is_graveyard(x) for x in range(1, 5)]
    rets2 = [dagmc.volume_is_implicit_complement(x) for x in range(1, 5)]
    md = dagmc.volume_metadata(2)

    return [rets1, rets2, md]
Пример #2
0
    def test_metadata(self):

        rets = [dagmc.volume_is_graveyard(x) for x in range(1, 5)]
        self.assertEqual(rets, [True, False, False, False])

        rets = [dagmc.volume_is_implicit_complement(x) for x in range(1, 5)]
        self.assertEqual(rets, [False, False, False, True])

        md = dagmc.volume_metadata(2)
        self.assertEqual(md['material'], 5)
        self.assertEqual(md['rho'], 0.5)
        self.assertTrue(all(x in md for x in ['material', 'rho', 'imp']))
Пример #3
0
    def test_metadata(self):

        rets = [dagmc.volume_is_graveyard(x) for x in range(1, 5)]
        self.assertEqual(rets, [True, False, False, False])

        rets = [dagmc.volume_is_implicit_complement(x) for x in range(1, 5)]
        self.assertEqual(rets, [False, False, False, True])

        md = dagmc.volume_metadata(2)
        self.assertEqual(md['material'], 5)
        self.assertEqual(md['rho'], 0.5)
        self.assertTrue(all(x in md for x in ['material', 'rho', 'imp']))
Пример #4
0
def metadata():
    from pyne import dagmc
    dagmc.load(path)

    rets = [dagmc.volume_is_graveyard(x) for x in range(1, 5)]
    assert_equal(rets, [True, False, False, False])

    rets = [dagmc.volume_is_implicit_complement(x) for x in range(1, 5)]
    assert_equal(rets, [False, False, False, True])

    md = dagmc.volume_metadata(2)
    assert_equal(md['material'], 5)
    assert_equal(md['rho'], 0.5)
    assert_true(all(x in md for x in ['material', 'rho', 'imp']))
Пример #5
0
def metadata():
    from pyne import dagmc
    dagmc.load(path)
    
    rets = [dagmc.volume_is_graveyard(x) for x in range(1, 5)]
    assert_equal(rets, [True, False, False, False])

    rets = [dagmc.volume_is_implicit_complement(x) for x in range(1, 5)]
    assert_equal(rets, [False, False, False, True])

    md = dagmc.volume_metadata(2)
    assert_equal(md['material'], 5)
    assert_equal(md['rho'], 0.5)
    assert_true(all(x in md for x in ['material', 'rho', 'imp']))