mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Create compatability with lattice cells
Previously, create_mg_mode assigned a new material to all cells in the geometry. However, in certain cases, cells are filled with a lattice instead of a material. Therefore, checking if a cell if filled with a material determines whether it is appropriate to assign it a new multi group material or not.
This commit is contained in:
parent
60c3a9dc4e
commit
f76c58f62e
1 changed files with 2 additions and 2 deletions
|
|
@ -1402,12 +1402,12 @@ class Library:
|
|||
if self.domain_type == 'material':
|
||||
# Fill all appropriate Cells with new Material
|
||||
for cell in all_cells:
|
||||
if cell.fill.id == domain.id:
|
||||
if isinstance(cell.fill, openmc.Material) and cell.fill.id == domain.id:
|
||||
cell.fill = material
|
||||
|
||||
elif self.domain_type == 'cell':
|
||||
for cell in all_cells:
|
||||
if cell.id == domain.id:
|
||||
if isinstance(cell.fill, openmc.Material) and cell.id == domain.id:
|
||||
cell.fill = material
|
||||
|
||||
return mgxs_file, materials, geometry
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue