Replaced cell fix with a UserWarning in create_mg_mode

Since lattice or universe cells should still be able to have mgxs generated,
I repealed the requirement for the cell to be filled by a material.
Instead, if a non-material filled cell is used in the library domain,
a UserWarning warns the user not to include a consistuent cell along with
that lattice/universe cell.
This commit is contained in:
Miriam 2020-08-25 21:40:30 +00:00
parent 3aff054f38
commit 0dd1448a56

View file

@ -1407,7 +1407,11 @@ class Library:
elif self.domain_type == 'cell':
for cell in all_cells:
if isinstance(cell.fill, openmc.Material) and cell.id == domain.id:
if not isinstance(cell.fill, openmc.Material):
warn('If the library domain includes a lattice or universe cell '
'in conjunction with a consituent cell of that lattice/universe, '
'the multi-group simulation will fail')
if cell.id == domain.id:
cell.fill = material
return mgxs_file, materials, geometry