Skip to content

Commit

Permalink
quickfix depletable only
Browse files Browse the repository at this point in the history
  • Loading branch information
bam241 committed Oct 2, 2024
1 parent 8148957 commit 4e92a0c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion openmc/dagmc.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@ def material_overrides(self):

@material_overrides.setter
def material_overrides(self, val):
if val is not None:
if val is None:
self._material_overrides = val
return
else:
cv.check_type('material overrides', val, dict)
for key, value in val.items():
# ensuring key is a string and exists in the DAGMC file
Expand Down
2 changes: 1 addition & 1 deletion openmc/model/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1072,7 +1072,7 @@ def differentiate_mats(self, diff_volume_method: str = None, depletable_only: bo
# Extract all depletable materials which have multiple instances
distribmats = set(
[mat for mat in self.materials
if mat.depletable and mat.num_instances > 1])
if (mat.depletable or depletable_only) and mat.num_instances > 1])

if diff_volume_method == "divide equally":
for mat in distribmats:
Expand Down

0 comments on commit 4e92a0c

Please sign in to comment.