Add versionadded directive for new arguments/functions in 0.12

This commit is contained in:
Paul Romano 2020-04-10 21:52:43 -05:00
parent 5012c6b0ce
commit 5547ecf88f
20 changed files with 107 additions and 7 deletions

View file

@ -91,6 +91,8 @@ class Cell(IDManagerMixin):
present in the cell, or in all of its instances for a 'distribmat'
fill. For example, {'U235': 1.0e22, 'U238': 5.0e22, ...}.
.. versionadded:: 0.12
"""
next_id = 1
@ -654,7 +656,7 @@ class Cell(IDManagerMixin):
Returns
-------
Cell
openmc.Cell
Cell instance
"""

View file

@ -31,8 +31,9 @@ class DataLibrary(EqualityMixin):
name : str
Name of material, e.g. 'Am241'
data_type : str
Name of data type, e.g. 'neutron', 'photon', 'wmp',
or 'thermal'
Name of data type, e.g. 'neutron', 'photon', 'wmp', or 'thermal'
.. versionadded:: 0.12
Returns
-------

View file

@ -54,6 +54,8 @@ class PredictorIntegrator(Integrator):
that the values are given in burnup (MW-d of energy deposited per
kilogram of initial heavy metal).
.. versionadded:: 0.12
Attributes
----------
operator : openmc.deplete.TransportOperator
@ -143,6 +145,8 @@ class CECMIntegrator(Integrator):
that the values are given in burnup (MW-d of energy deposited per
kilogram of initial heavy metal).
.. versionadded:: 0.12
Attributes
----------
operator : openmc.deplete.TransportOperator
@ -240,6 +244,8 @@ class CF4Integrator(Integrator):
that the values are given in burnup (MW-d of energy deposited per
kilogram of initial heavy metal).
.. versionadded:: 0.12
Attributes
----------
operator : openmc.deplete.TransportOperator
@ -354,6 +360,8 @@ class CELIIntegrator(Integrator):
that the values are given in burnup (MW-d of energy deposited per
kilogram of initial heavy metal).
.. versionadded:: 0.12
Attributes
----------
operator : openmc.deplete.TransportOperator
@ -455,6 +463,8 @@ class EPCRK4Integrator(Integrator):
that the values are given in burnup (MW-d of energy deposited per
kilogram of initial heavy metal).
.. versionadded:: 0.12
Attributes
----------
operator : openmc.deplete.TransportOperator
@ -576,6 +586,8 @@ class LEQIIntegrator(Integrator):
that the values are given in burnup (MW-d of energy deposited per
kilogram of initial heavy metal).
.. versionadded:: 0.12
Attributes
----------
operator : openmc.deplete.TransportOperator
@ -693,6 +705,8 @@ class SICELIIntegrator(SIIntegrator):
seconds, 'min' means minutes, 'h' means hours, and 'MWd/kg' indicates
that the values are given in burnup (MW-d of energy deposited per
kilogram of initial heavy metal).
.. versionadded:: 0.12
n_steps : int, optional
Number of stochastic iterations per depletion interval.
Must be greater than zero. Default : 10
@ -801,6 +815,8 @@ class SILEQIIntegrator(SIIntegrator):
seconds, 'min' means minutes, 'h' means hours, and 'MWd/kg' indicates
that the values are given in burnup (MW-d of energy deposited per
kilogram of initial heavy metal).
.. versionadded:: 0.12
n_steps : int, optional
Number of stochastic iterations per depletion interval.
Must be greater than zero. Default : 10

View file

@ -470,6 +470,8 @@ class FissionYieldDistribution(Mapping):
def restrict_products(self, possible_products):
"""Return a new distribution with select products
.. versionadded:: 0.12
Parameters
----------
possible_products : iterable of str

View file

@ -113,11 +113,15 @@ class Operator(TransportOperator):
reduce_chain : bool, optional
If True, use :meth:`openmc.deplete.Chain.reduce` to reduce the
depletion chain up to ``reduce_chain_level``. Default is False.
.. versionadded:: 0.12
reduce_chain_level : int, optional
Depth of the search when reducing the depletion chain. Only used
if ``reduce_chain`` evaluates to true. The default value of
``None`` implies no limit on the depth.
.. versionadded:: 0.12
Attributes
----------
geometry : openmc.Geometry

View file

@ -44,7 +44,6 @@ class ResultsList(list):
"""Get number of nuclides over time from a single material
.. note::
Initial values for some isotopes that do not appear in
initial concentrations may be non-zero, depending on the
value of :class:`openmc.deplete.Operator` ``dilute_initial``.
@ -59,10 +58,14 @@ class ResultsList(list):
Nuclide name to evaluate
nuc_units : {"atoms", "atom/b-cm", "atom/cm3"}, optional
Units for the returned concentration. Default is ``"atoms"``
.. versionadded:: 0.12
time_units : {"s", "min", "h", "d"}, optional
Units for the returned time array. Default is ``"s"`` to
return the value in seconds.
.. versionadded:: 0.12
Returns
-------
time : numpy.ndarray

View file

@ -59,9 +59,13 @@ class Element(str):
enriched U. Default is None (natural composition).
enrichment_target: str, optional
Single nuclide name to enrich from a natural composition (e.g., 'O16')
.. versionadded:: 0.12
enrichment_type: {'ao', 'wo'}, optional
'ao' for enrichment as atom percent and 'wo' for weight percent.
Default is: 'ao' for two-isotope enrichment; 'wo' for U enrichment
.. versionadded:: 0.12
cross_sections : str, optional
Location of cross_sections.xml file. Default is None.

View file

@ -184,6 +184,8 @@ def run(particles=None, threads=None, geometry_debug=False,
event_based : bool, optional
Turns on event-based parallelism, instead of default history-based
.. versionadded:: 0.12
Raises
------
subprocess.CalledProcessError

View file

@ -530,6 +530,8 @@ class CellInstanceFilter(Filter):
instances by default) and allows instances from different cells to be
specified in a single filter.
.. versionadded:: 0.12
Parameters
----------
bins : iterable of 2-tuples or numpy.ndarray

View file

@ -86,6 +86,8 @@ class Geometry:
Whether or not to remove redundant surfaces from the geometry when
exporting
.. versionadded:: 0.12
"""
# Find and remove redundant surfaces from the geometry
if remove_surfs:
@ -389,7 +391,9 @@ class Geometry:
return surfaces
def get_redundant_surfaces(self):
"""Return all of the topologically redundant surface ids
"""Return all of the topologically redundant surface IDs
.. versionadded:: 0.12
Returns
-------

View file

@ -489,10 +489,14 @@ class Material(IDManagerMixin):
Default is None (natural composition).
enrichment_target: str, optional
Single nuclide name to enrich from a natural composition (e.g., 'O16')
.. versionadded:: 0.12
enrichment_type: {'ao', 'wo'}, optional
'ao' for enrichment as atom percent and 'wo' for weight percent.
Default is: 'ao' for two-isotope enrichment; 'wo' for U enrichment
.. versionadded:: 0.12
Notes
-----
General enrichment procedure is allowed only for elements composed of
@ -561,6 +565,8 @@ class Material(IDManagerMixin):
enrichment_target=None, enrichment_type=None):
"""Add a elements from a chemical formula to the material.
.. versionadded:: 0.12
Parameters
----------
formula : str
@ -694,6 +700,8 @@ class Material(IDManagerMixin):
def get_elements(self):
"""Returns all elements in the material
.. versionadded:: 0.12
Returns
-------
elements : list of str
@ -981,6 +989,8 @@ class Material(IDManagerMixin):
def mix_materials(cls, materials, fracs, percent_type='ao', name=None):
"""Mix materials together based on atom, weight, or volume fractions
.. versionadded:: 0.12
Parameters
----------
materials : Iterable of openmc.Material

View file

@ -595,6 +595,8 @@ class RectilinearMesh(MeshBase):
class UnstructuredMesh(MeshBase):
"""A 3D unstructured mesh
.. versionadded:: 0.12
Parameters
----------
filename : str

View file

@ -201,6 +201,10 @@ class Model:
"""Creates the XML files, runs OpenMC, and returns the path to the last
statepoint file generated.
.. versionchanged:: 0.12
Instead of returning the final k-effective value, this function now
returns the path to the final statepoint written.
Parameters
----------
**kwargs

View file

@ -42,6 +42,8 @@ class ZernikeRadial(Polynomial):
The radial only Zernike polynomials are defined as in
:class:`ZernikeRadialFilter`.
.. versionadded:: 0.12
Parameters
----------
coef : Iterable of float
@ -85,6 +87,8 @@ class Zernike(Polynomial):
The azimuthal Zernike polynomials are defined as in :class:`ZernikeFilter`.
.. versionadded:: 0.12
Parameters
----------
coef : Iterable of float

View file

@ -64,6 +64,8 @@ class Region(ABC):
def remove_redundant_surfaces(self, redundant_surfaces):
"""Recursively remove all redundant surfaces referenced by this region
.. versionadded:: 0.12
Parameters
----------
redundant_surfaces : dict
@ -272,6 +274,8 @@ class Region(ABC):
memo=None):
r"""Rotate surface by angles provided or by applying matrix directly.
.. versionadded:: 0.12
Parameters
----------
rotation : 3-tuple of float, or 3x3 iterable
@ -587,6 +591,8 @@ class Complement(Region):
def remove_redundant_surfaces(self, redundant_surfaces):
"""Recursively remove all redundant surfaces referenced by this region
.. versionadded:: 0.12
Parameters
----------
redundant_surfaces : dict

View file

@ -49,6 +49,8 @@ class Settings:
Indicate whether to scale the fission photon yield by (EGP + EGD)/EGP
where EGP is the energy release of prompt photons and EGD is the energy
release of delayed photons.
.. versionadded:: 0.12
electron_treatment : {'led', 'ttb'}
Whether to deposit all energy from electrons locally ('led') or create
secondary bremsstrahlung photons ('ttb').
@ -61,12 +63,18 @@ class Settings:
event_based : bool
Indicate whether to use event-based parallelism instead of the default
history-based parallelism.
.. versionadded:: 0.12
generations_per_batch : int
Number of generations per batch
max_lost_particles : int
Maximum number of lost particles
.. versionadded:: 0.12
rel_max_lost_particles : int
Maximum number of lost particles, relative to the total number of particles
.. versionadded:: 0.12
inactive : int
Number of inactive batches
keff_trigger : dict
@ -80,9 +88,13 @@ class Settings:
material_cell_offsets : bool
Generate an "offset table" for material cells by default. These tables
are necessary when a particular instance of a cell needs to be tallied.
.. versionadded:: 0.12
max_particles_in_flight : int
Number of neutrons to run concurrently when using event-based
parallelism.
.. versionadded:: 0.12
max_order : None or int
Maximum scattering order to apply globally when in multi-group mode.
no_reduce : bool

View file

@ -22,6 +22,8 @@ class Source:
Source file from which sites should be sampled
library : str
Path to a custom source library
.. versionadded:: 0.12
strength : float
Strength of the source
particle : {'neutron', 'photon'}

View file

@ -378,6 +378,8 @@ class SphericalIndependent(Spatial):
:math:`\theta`, and :math:`\phi` components are sampled independently from
one another and centered on the coordinates (x0, y0, z0).
.. versionadded: 0.12
Parameters
----------
r : openmc.stats.Univariate
@ -498,6 +500,8 @@ class CylindricalIndependent(Spatial):
one another and in a reference frame whose origin is specified by the
coordinates (x0, y0, z0).
.. versionadded:: 0.12
Parameters
----------
r : openmc.stats.Univariate

View file

@ -68,6 +68,8 @@ def _future_kwargs_warning_helper(cls, *args, **kwargs):
def get_rotation_matrix(rotation, order='xyz'):
r"""Generate a 3x3 rotation matrix from input angles
.. versionadded:: 0.12
Parameters
----------
rotation : 3-tuple of float
@ -266,6 +268,8 @@ class Surface(IDManagerMixin, ABC):
def normalize(self, coeffs=None):
"""Normalize coefficients by first nonzero value
.. versionadded:: 0.12
Parameters
----------
coeffs : tuple, optional
@ -347,6 +351,8 @@ class Surface(IDManagerMixin, ABC):
def rotate(self, rotation, pivot=(0., 0., 0.), order='xyz', inplace=False):
r"""Rotate surface by angles provided or by applying matrix directly.
.. versionadded:: 0.12
Parameters
----------
rotation : 3-tuple of float, or 3x3 iterable
@ -1223,6 +1229,8 @@ class Cylinder(QuadricMixin, Surface):
def from_points(cls, p1, p2, r=1., **kwargs):
"""Return a cylinder given points that define the axis and a radius.
.. versionadded:: 0.12
Parameters
----------
p1, p2 : 3-tuples
@ -2294,6 +2302,8 @@ class Halfspace(Region):
memo=None):
r"""Rotate surface by angles provided or by applying matrix directly.
.. versionadded:: 0.12
Parameters
----------
rotation : 3-tuple of float, or 3x3 iterable

View file

@ -45,8 +45,6 @@ class VolumeCalculation:
Lower-left coordinates of bounding box used to sample points
upper_right : Iterable of float
Upper-right coordinates of bounding box used to sample points
threshold : float
Threshold for the maximum standard deviation of volume in the calculation
atoms : dict
Dictionary mapping unique IDs of domains to a mapping of nuclides to
total number of atoms for each nuclide present in the domain. For
@ -58,11 +56,17 @@ class VolumeCalculation:
Dictionary mapping unique IDs of domains to estimated volumes in cm^3.
threshold : float
Threshold for the maxmimum standard deviation of volumes.
.. versionadded:: 0.12
trigger_type : {'variance', 'std_dev', 'rel_err'}
Value type used to halt volume calculation
.. versionadded:: 0.12
iterations : int
Number of iterations over samples (for calculations with a trigger).
.. versionadded:: 0.12
"""
def __init__(self, domains, samples, lower_left=None, upper_right=None):
self._atoms = {}
@ -225,6 +229,8 @@ class VolumeCalculation:
def set_trigger(self, threshold, trigger_type):
"""Set a trigger on the voulme calculation
.. versionadded:: 0.12
Parameters
----------
threshold : float