From 791f7c78b783ecd3ed94b74c8ba58ef3ac488ecc Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Mon, 29 Jul 2019 08:36:09 -0500 Subject: [PATCH] Return BOS concentration as list of vectors from restarts Operator.initial_condition return list of vectors representing the initial composition for a burnable material as an element in the list. This format is expected from depletion solvers as well. Previously, when pulling from the previous results on an operator, the initial concentration was returned simply as a 2D array of compositions. This commit converts the 2D array to a list of vectors to be consistent across the integration schemes. --- openmc/deplete/integrator/abc.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openmc/deplete/integrator/abc.py b/openmc/deplete/integrator/abc.py index 422311964..24bd06395 100644 --- a/openmc/deplete/integrator/abc.py +++ b/openmc/deplete/integrator/abc.py @@ -97,7 +97,9 @@ class Integrator(ABC): def _get_bos_data_from_restart(self, step_index, step_power, bos_conc): res = self.operator.prev_res[-1] - bos_conc = res.data[0] + # Depletion methods expect list of arrays + # See Operator.__call__, Operator.initial_condition + bos_conc = list(res.data[0]) rates = res.rates[0] k = ufloat(res.k[0,0], res.k[0, 1])