mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
address reviewers' comment on deepcopy and tests input
This commit is contained in:
parent
bd6a479370
commit
f75db76c70
2 changed files with 394 additions and 394 deletions
|
|
@ -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 '
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue