diff --git a/openmc/lattice.py b/openmc/lattice.py index 0fbd74f28e..b78b8b9e46 100644 --- a/openmc/lattice.py +++ b/openmc/lattice.py @@ -443,23 +443,17 @@ class Lattice(object): if self.outer is not None: clone.outer = self.outer.clone(memo) - # Clone all unique universes in the lattice - univ_clones = self.get_unique_universes() - for univ_id in univ_clones: - univ_clones[univ_id] = univ_clones[univ_id].clone(memo) - # Assign universe clones to the lattice clone for i in self.indices: if isinstance(self, RectLattice): - univ_id = self.universes[i].id - clone.universes[i] = univ_clones[univ_id] + clone.universes[i] = self.universes[i].clone() else: if self.ndim == 2: - univ_id = self.universes[i[0]][i[1]].id - clone.universes[i[0]][i[1]] = univ_clones[univ_id] + clone.universes[i[0]][i[1]] = \ + self.universes[i[0]][i[1]].clone() else: - univ_id = self.universes[i[0]][i[1]][i[2]].id - clone.universes[i[0]][i[1]][i[2]] = univ_clones[univ_id] + clone.universes[i[0]][i[1]][i[2]] = \ + self.universes[i[0]][i[1]][i[2]].clone() # Memoize the clone memo[self] = clone diff --git a/openmc/material.py b/openmc/material.py index 762337659a..87cc6befaa 100644 --- a/openmc/material.py +++ b/openmc/material.py @@ -816,7 +816,7 @@ class Material(object): """ if memo is None: - memo = dict + memo = {} # If no nemoize'd clone exists, instantiate one if self not in memo: