mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Update mixture distribution
update storeage of c++ class update sampling -> uses std::lower_bound for O(log(N)) sampling of the distribution implemented from_xml_element updated settings.rst include a mixture in the regression tests
This commit is contained in:
parent
1c219600a1
commit
e7fa663b3d
7 changed files with 98 additions and 30 deletions
|
|
@ -619,16 +619,17 @@ variable and whose sub-elements/attributes are as follows:
|
|||
|
||||
:type:
|
||||
The type of the distribution. Valid options are "uniform", "discrete",
|
||||
"tabular", "maxwell", and "watt". The "uniform" option produces variates
|
||||
sampled from a uniform distribution over a finite interval. The "discrete"
|
||||
option produces random variates that can assume a finite number of values
|
||||
(i.e., a distribution characterized by a probability mass function). The
|
||||
"tabular" option produces random variates sampled from a tabulated
|
||||
"tabular", "maxwell", "watt", and "mixture". The "uniform" option producess
|
||||
variates sampled from a uniform distribution over a finite interval. The
|
||||
"discrete" option produces random variates that can assume a finite number
|
||||
of values (i.e., a distribution characterized by a probability mass function).
|
||||
The "tabular" option produces random variates sampled from a tabulated
|
||||
distribution where the density function is either a histogram or
|
||||
linearly-interpolated between tabulated points. The "watt" option produces
|
||||
random variates is sampled from a Watt fission spectrum (only used for
|
||||
energies). The "maxwell" option produce variates sampled from a Maxwell
|
||||
fission spectrum (only used for energies).
|
||||
fission spectrum (only used for energies). The "mixture" option produces samples
|
||||
from univariate sub-distributions with given probabilities.
|
||||
|
||||
*Default*: None
|
||||
|
||||
|
|
@ -649,6 +650,11 @@ variable and whose sub-elements/attributes are as follows:
|
|||
number :math:`a` that parameterizes the distribution :math:`p(x) dx = c x
|
||||
e^{-x/a} dx`.
|
||||
|
||||
For a "mixture" distribution, ``parameters`` provide the :math:'(p,d)' pairs
|
||||
connecting the probabilites :math:'p' with the different sub-distributions
|
||||
:math:'d'. All probabilities :math:'p' are given first followed by the corresponding
|
||||
distributions :math:'d'.
|
||||
|
||||
.. note:: The above format should be used even when using the multi-group
|
||||
:ref:`energy_mode`.
|
||||
:interpolation:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue