Co-authored-by: GuySten <guyste@post.bgu.ac.il>
Co-authored-by: GuySten <62616591+GuySten@users.noreply.github.com>
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
Removed unit test files for test_deplete_*py that pertained to a
single integrator type only. Similarly removed tests where the
integrators are used to perform simple restart analysis.
These tests are still present, but done with two parametrized tests.
Each of the integrators has the exact same solution in the unit tests
with and without restarting,by nature of their design.
This and the near-fixture like way the tests
are structured allowed these tests to be easily parametrized provided
1) integrator, 2) reference solutions for atoms 1 and 2.
Exact results for each integrator in the unit test are contained
inside a collections.namedtuple, along with the Integrator class.
These named tuples are placed in a dictionary in
tests/dummy_operator.py that can be easily iterated over to provide
access to a name of the scheme, e.g. "predictor", and the tuple of
integrator, results for atom 1, and results for atom 2.
Exact results for atoms 1 and 2 should be provided using the depletion
matrix produced by the tests.dummy_operator.DummyOperator for two
time steps of 0.75 seconds.
This object is used in unit testing the depletion schemes, where
the depletion matrix is pre-defined and there is no
need for fission yields. However, the depletion interface
expects the chain to have a fission_yields attribute.
Takes a single set of fission yields and passes them as
an additional argument to matrix_func:
>>> A = matrix_func(chain, rates, fission_yields)
Applied to cf4, epc_rk4, celi, and leqi functions.
Assumes that fission yields will not change during a
depletion event. This change is probably overshadowed
by how much the reaction rates may change, but still worth
pointing out.
Called with a single integer corresponding to the current
depletion step. This method is intended to document the current
beginning-of-step calculations prior to any depletion at each step
and at the final simulation.
The Operator uses this method to write a statepoint using the
C API.
Also rename the Integrator _get_bos_data_from_openmc to
_get_bos_data_from_operator for generality. It is here that the
write_bos_data method is called.
This allows the propagation of the uncertainty through
the SIE iterations, and alows the expressions for updating
k to be preserved. The OperatorResult.k was previous stored
as a tuple of two floats. The interface into the depletion_results
file is not changed, as the Results.save method, which writes the
OperatorResult data, breaks the ufloat into k and uncertainties.
Documentation has been updated on the OperatorResult.