From 0dd1448a561ca012e27cc1cbbedf61a0814afc25 Mon Sep 17 00:00:00 2001 From: Miriam Date: Tue, 25 Aug 2020 21:40:30 +0000 Subject: [PATCH] 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. --- openmc/mgxs/library.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openmc/mgxs/library.py b/openmc/mgxs/library.py index aca46958d..d9518e78d 100644 --- a/openmc/mgxs/library.py +++ b/openmc/mgxs/library.py @@ -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