Fix a bug introduced where the material iteration index,
for i, mat in enumerate(self.local_mats):
was used for the global __material__ index. The value of i
was used to extract reaction rate tallies for that material.
This causes an issue with multiple operators on MPI processes,
where an Operator`s material i does not equal the i-th burnable
material.
The function openmc.deplete.cf4 has been removed in favor
of openmc.deplete.CF4Integrator. The CF4 integration scheme
can be peformed with
>>> from openmc.deplete import CF4Integrator
>>> CF4Integrator(operator, time, power).integrate()
The depletion functions openmc.deplete.celi and
openmc.deplete.leqi hvae been removed in favor of a class-based
approach. The following syntax will replicate the behavior
of the integration schemes:
>>> from openmc.deplete import CELIIntegrator
>>> celi = CELIIntegrator(operator, time, power)
>>> celi.integrate()
The expression can be reduced to a single line:
>>> LEQIIntegrator(operator, time, power).integrate()
For the higher order methods, like LEQI, a lower order
method may be called for the first few steps. The LEQI
method, with no restart data, will call CELI for the first
iteration. To aid this, concrete Integrator classes will be
passed an integer for the current iteration.
Some methods, like the CECM and CELI, do not need this information.
To maintain a consistent API, the iteration is an optional value
to be passed to CECM.__call__, but will not be used. The default
value in the call signature is ``_i=-1``, with documentation repeating
that the value is not used nor needed.
The depletion function openmc.deplete.predictor has been removed
in favor of a class-based approach. The following syntax will
replicate the behavior of the predictor integration scheme:
>>> from openmc.deplete import PredictorIntegrator
>>> predictor = PredictorIntegrator(operator, time, power)
>>> predictor.integrate()`
The expression can be reduced to a single line:
>>> PredictorIntegrator(operator, time, power).integrate()
When adding capture branching ratios to a ``Chain``,
the sum of ratios for a given parent nuclide was allowed to be no
greater than 1.0. This limit is very tight, and does not allow
for minor floating point precision differences, like
1.0000000002.
The maximum value the sum of branching ratios from a single
parent is now 1.00001, with no equality check. This has
been added to the method docstring for transparency.
Some content was removed from the docstring that implied that
``branch_ratios`` would be modified in place. This is not the case,
and thus the content was removed.
The cecm function has been removed from the python api.
In order to use the cecm integration scheme,
the following class based approach is now expected:
>>> from openmc.deplete import CECMIntegrator
>>> cecm = CECMIntegrator(operator, timesteps, power)
>>> cecm.integrate()
if the integrator is not needed, this above expression can be
one-lined with
>>> CECMIntegrator(operator, timesteps, power).integrate()
Unit tests have been updated to no longer use the cecm function,
and cecm has been removed from documentation.
The CECMIntegrator has been added to documentation.
When possible, replaced ``x[:, :, :] = y`` with ``x.fill(y)``.
Simple performance tests showed the approaches to be identical
with respect to process time. The latter maintains more
flexibility; whatever the shape of x becomes, no changes
need to be made, so long as x has a ``fill`` method.
Replaced ``rates[i, :, :] = ...`` with ``rates[i]`` per
reviewer comments
Remove calls to print for the following cases:
1) Parent nuclides not found in chain
2) Nuclides with requested branching ratios did not have capture
reactions
3) Product nuclides not found in chain
Anything that can be filled by a cell can be passed to
openmc.model.pin, including Universes and lattices.
Checks are included for the volume division, as not
all supported items, like Lattice instances, have volume
attributes.
A test was added to check this capability, where a universe
is used as one of the interior elements for the pin.
Various cosmetic changes to address reviewer comments.