コード例 #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
ファイル: test_dagmc.py プロジェクト: NukespudWork/pyne
    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
ファイル: test_dagmc.py プロジェクト: zxkjack123/pyne
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
ファイル: test_dagmc.py プロジェクト: FlanFlanagan/pyne
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']))