Merge pull request #1374 from pshriwise/volume_trigger

Volume Calculation Trigger
This commit is contained in:
Paul Romano 2019-10-15 15:58:20 +07:00 committed by GitHub
commit 6799da13f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 452 additions and 150 deletions

View file

@ -23,6 +23,8 @@ The current version of the volume file format is 1.0.
bounding box
- **upper_right** (*double[3]*) -- Upper-right coordinates of
bounding box
- **threshold** (*double*) -- Threshold used for volume uncertainty
- **trigger_type** (*char[]*) -- Trigger type used for volume uncertainty
**/domain_<id>/**

View file

@ -37,6 +37,16 @@ arguments are not necessary. For example,
Of course, the volumes that you *need* this capability for are often the ones
with complex definitions.
A threshold can be applied for the calculation's variance, standard deviation,
or relative error of volume estimates using :meth:`openmc.VolumeCalculation.set_trigger`::
vol_calc.set_trigger(1e-05, 'std_dev')
If a threshold is provided, calculations will be performed iteratively using the
number of samples specified on the calculation until all volume uncertainties are below
the threshold value. If no threshold is provided, the calculation will run the number of
samples specified once and return the result.
Once you have one or more :class:`openmc.VolumeCalculation` objects created, you
can then assign then to :attr:`Settings.volume_calculations`::