From 2514918591fc54077173b2c8230245eea4c58df8 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Wed, 7 Aug 2019 11:08:28 -0500 Subject: [PATCH] Consistently document unused depletion index The LEQI-type integrators are the only ones that need the current depletion index. All other integrators now display the same _i=None for this index in the call signature, and denote the variable as optional and unused in the docstring --- openmc/deplete/integrators.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/openmc/deplete/integrators.py b/openmc/deplete/integrators.py index 7637f4fe1..67106aa3e 100644 --- a/openmc/deplete/integrators.py +++ b/openmc/deplete/integrators.py @@ -142,7 +142,7 @@ class CECMIntegrator(Integrator): """ _num_stages = 2 - def __call__(self, conc, rates, dt, power, _i=-1): + def __call__(self, conc, rates, dt, power, _i=None): """Integrate using CE/CM Parameters @@ -232,7 +232,7 @@ class CF4Integrator(Integrator): """ _num_stages = 4 - def __call__(self, bos_conc, bos_rates, dt, power, i): + def __call__(self, bos_conc, bos_rates, dt, power, _i=None): """Perform the integration across one time step Parameters @@ -245,8 +245,8 @@ class CF4Integrator(Integrator): Time in [s] for the entire depletion interval power : float Power of the system in [W] - i : int - Current depletion step index + _i : int, optional + Current depletion step index. Not used Returns ------- @@ -339,7 +339,7 @@ class CELIIntegrator(Integrator): """ _num_stages = 2 - def __call__(self, bos_conc, rates, dt, power, _i=-1): + def __call__(self, bos_conc, rates, dt, power, _i=None): """Perform the integration across one time step Parameters @@ -352,7 +352,7 @@ class CELIIntegrator(Integrator): Time in [s] for the entire depletion interval power : float Power of the system in [W] - _i : int + _i : int, optional Current iteration count. Not used Returns @@ -433,7 +433,7 @@ class EPCRK4Integrator(Integrator): """ _num_stages = 4 - def __call__(self, conc, rates, dt, power, _i): + def __call__(self, conc, rates, dt, power, _i=None): """Perform the integration across one time step Parameters @@ -446,7 +446,7 @@ class EPCRK4Integrator(Integrator): Time in [s] for the entire depletion interval power : float Power of the system in [W] - i : int + _i : int, optional Current depletion step index, unused. Returns @@ -663,7 +663,7 @@ class SICELIIntegrator(SIIntegrator): """ _num_stages = 2 - def __call__(self, bos_conc, bos_rates, dt, power, _i): + def __call__(self, bos_conc, bos_rates, dt, power, _i=None): """Perform the integration across one time step Parameters @@ -676,8 +676,8 @@ class SICELIIntegrator(SIIntegrator): Time in [s] for the entire depletion interval power : float Power of the system in [W] - _i : int - Current depletion step index. Unused + _i : int, optional + Current depletion step index. Not used Returns -------