Skip to content

Commit

Permalink
Added Error messages for when no cells are selected (#19)
Browse files Browse the repository at this point in the history
* added Error Message for when no cells are selected

* added Error Message for when no cells are selected for MCNP

* changed default Material rangeType to all

* undo change in configReverse.ini
  • Loading branch information
mxmws authored Mar 7, 2024
1 parent fc2198b commit 1672fe1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/GEOReverse/Modules/MCNPinput.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,9 @@ def selectCells(cellList,config):
for cname,c in selected.items() :
c.geom = remove_hash(cellList,cname)

if not selected:
raise ValueError("No cells selected. Check input or selection criteria in config file.")

return selected

#Change implicit cell definition (like-but type or cell with #)
Expand Down
3 changes: 3 additions & 0 deletions src/GEOReverse/Modules/XMLinput.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@ def selectCells(cellList,config):
# remove complementary in cell of the universe
# for cname,c in selected.items() :
# c.geom = remove_hash(cellList,cname)

if not selected:
raise ValueError("No cells selected. Check input or selection criteria in config file.")

return selected

Expand Down

0 comments on commit 1672fe1

Please sign in to comment.