mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Merge pull request #1890 from ojschumann/rational_dist
Rational univariate distribution
This commit is contained in:
commit
c2fe6327e2
9 changed files with 234 additions and 8 deletions
|
|
@ -42,6 +42,16 @@ def test_uniform():
|
|||
assert t.p == [1/(b-a), 1/(b-a)]
|
||||
assert t.interpolation == 'histogram'
|
||||
|
||||
def test_powerlaw():
|
||||
a, b, n = 10.0, 20.0, 2.0
|
||||
d = openmc.stats.PowerLaw(a, b, n)
|
||||
elem = d.to_xml_element('distribution')
|
||||
|
||||
d = openmc.stats.PowerLaw.from_xml_element(elem)
|
||||
assert d.a == a
|
||||
assert d.b == b
|
||||
assert d.n == n
|
||||
assert len(d) == 3
|
||||
|
||||
def test_maxwell():
|
||||
theta = 1.2895e6
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue