From 0aebbc13791008e418adcac5f65405cd3be70117 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Mon, 15 Jul 2019 11:13:45 -0500 Subject: [PATCH] Document nuclides attributes for Operator helpers Remove some pass statements for abstract methods as well --- openmc/deplete/abc.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/openmc/deplete/abc.py b/openmc/deplete/abc.py index 13be50812a..565a04089f 100644 --- a/openmc/deplete/abc.py +++ b/openmc/deplete/abc.py @@ -173,6 +173,12 @@ class ReactionRateHelper(ABC): Reaction rates are passed back to the operator for be used in an :class:`openmc.deplete.OperatorResult` instance + + Attributes + ---------- + nuclides : list of str + All nuclides with desired reaction rates. Ordered to be + consistent with :class:`openmc.deplete.Operator` """ def __init__(self): @@ -183,7 +189,6 @@ class ReactionRateHelper(ABC): @abstractmethod def generate_tallies(self, materials, scores): """Use the capi to build tallies needed for reaction rates""" - pass @property def nuclides(self): @@ -222,6 +227,8 @@ class ReactionRateHelper(ABC): Parameters ---------- + energy : float + Energy produced in this region [W] number : iterable of float Number density [#/b/cm] of each nuclide tracked in the calculation. Ordered identically to :attr:`nuclides` @@ -242,6 +249,12 @@ class ReactionRateHelper(ABC): class FissionEnergyHelper(ABC): """Abstract class for normalizing fission reactions to a given level + + Attributes + ---------- + nuclides : list of str + All nuclides with desired reaction rates. Ordered to be + consistent with :class:`openmc.deplete.Operator` """ def __init__(self): @@ -258,12 +271,10 @@ class FissionEnergyHelper(ABC): :meth:`get_fission_energy`. ``materials`` should be a list of all materials tracked on the operator to which this object is attached""" - pass @abstractmethod def get_fission_energy(self, fission_rates, mat_index): """Return fission energy in this material given fission rates""" - pass @property def nuclides(self):