From f75db76c709f8598bfd395712002f8aabf746573 Mon Sep 17 00:00:00 2001 From: rockfool Date: Thu, 7 Nov 2019 10:31:57 -0500 Subject: [PATCH] address reviewers' comment on deepcopy and tests input --- openmc/model/triso.py | 12 +- tests/regression_tests/triso/inputs_true.dat | 776 +++++++++---------- 2 files changed, 394 insertions(+), 394 deletions(-) diff --git a/openmc/model/triso.py b/openmc/model/triso.py index bc34eed93..1e27e126a 100644 --- a/openmc/model/triso.py +++ b/openmc/model/triso.py @@ -54,10 +54,6 @@ class TRISO(openmc.Cell): self._surface = openmc.Sphere(r=outer_radius) super().__init__(fill=fill, region=-self._surface) self.center = np.asarray(center) - self._outer_radius = outer_radius - - def deepcopy(self): - return TRISO(outer_radius=self._outer_radius, fill=self.fill, center=self.center) @property def center(self): @@ -836,10 +832,14 @@ def create_triso_lattice(trisos, lower_left, pitch, shape, background): if idx in triso_locations: # Create copy of TRISO particle with materials preserved and # different cell/surface IDs - t_copy = t.deepcopy() + t_copy = copy.copy(t) t_copy.id = None t_copy.fill = t.fill - t_copy._surface.id = None + t_copy._surface = openmc.Sphere(r=t._surface.r, + x0=t._surface.x0, + y0=t._surface.y0, + z0=t._surface.z0) + t_copy.region = -t_copy._surface triso_locations[idx].append(t_copy) else: warnings.warn('TRISO particle is partially or completely ' diff --git a/tests/regression_tests/triso/inputs_true.dat b/tests/regression_tests/triso/inputs_true.dat index 5c03ad86b..2ea049465 100644 --- a/tests/regression_tests/triso/inputs_true.dat +++ b/tests/regression_tests/triso/inputs_true.dat @@ -1,428 +1,428 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.3333333333333333 0.3333333333333333 0.3333333333333333 - 30 + 38 3 3 3 -0.5 -0.5 -0.5 -9 10 11 -6 7 8 -3 4 5 +17 18 19 +14 15 16 +11 12 13 -18 19 20 -15 16 17 -12 13 14 +26 27 28 +23 24 25 +20 21 22 -27 28 29 -24 25 26 -21 22 23 +35 36 37 +32 33 34 +29 30 31 - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - +