From 885f4c6acbd3a2c6a59d54a5d7d8aa0fb458a91c Mon Sep 17 00:00:00 2001 From: rockfool Date: Mon, 18 Nov 2019 00:21:19 -0500 Subject: [PATCH 1/2] fix variable bug in deplete.abc.py --- openmc/deplete/abc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openmc/deplete/abc.py b/openmc/deplete/abc.py index 462d0f3460..10976dd0ed 100644 --- a/openmc/deplete/abc.py +++ b/openmc/deplete/abc.py @@ -815,11 +815,11 @@ class SIIntegrator(Integrator): reset_particles = False if step_index == 0 and hasattr(self.operator, "settings"): reset_particles = True - self.operator.settings.particles *= self.n_stages + self.operator.settings.particles *= self.n_steps inherited = super()._get_bos_data_from_operator( step_index, step_power, bos_conc) if reset_particles: - self.operator.settings.particles //= self.n_stages + self.operator.settings.particles //= self.n_steps return inherited def integrate(self): From 78a3e7b937e958360062d3cffdac292e2e507850 Mon Sep 17 00:00:00 2001 From: rockfool Date: Tue, 19 Nov 2019 14:37:47 -0500 Subject: [PATCH 2/2] add explicit settings in dummy_operator for unit_tests --- tests/dummy_operator.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/dummy_operator.py b/tests/dummy_operator.py index 35a526c30d..13e8b7d417 100644 --- a/tests/dummy_operator.py +++ b/tests/dummy_operator.py @@ -1,4 +1,5 @@ from collections import namedtuple +from unittest.mock import Mock import numpy as np import scipy.sparse as sp @@ -133,6 +134,8 @@ class DummyOperator(TransportOperator): self.prev_res = previous_results self.chain = TestChain() self.output_dir = "." + self.settings = Mock() + self.settings.particles = 10 def __call__(self, vec, power, print_out=False): """Evaluates F(y)