From 69f2bc10a8a628f5feb545b393150e2b5eff01a3 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Tue, 7 Jun 2016 20:08:54 -0500 Subject: [PATCH] Warn user if TRISO particle is placed outside of lattice --- openmc/model/triso.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openmc/model/triso.py b/openmc/model/triso.py index ca519ed6f..6f0d145b2 100644 --- a/openmc/model/triso.py +++ b/openmc/model/triso.py @@ -1,6 +1,7 @@ import copy from collections import Iterable from numbers import Real +import warnings import numpy as np @@ -132,6 +133,9 @@ def create_triso_lattice(trisos, lower_left, pitch, shape, background): t_copy.cell.fill = t.cell.fill t_copy._surface.id = None triso_locations[idx].append(t_copy) + else: + warnings.warn('TRISO particle is partially or completely ' + 'outside of the lattice.') # Create universes universes = np.empty(shape[::-1], dtype=openmc.Universe)