From c6b67e64434c15483a26733eadbb7335b10be7ea Mon Sep 17 00:00:00 2001 From: Sterling Harper Date: Wed, 19 Apr 2017 19:13:07 -0400 Subject: [PATCH] Make sure source is in geometry before fiss. check --- src/source.F90 | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/source.F90 b/src/source.F90 index e4a01ce049..81931245a6 100644 --- a/src/source.F90 +++ b/src/source.F90 @@ -130,7 +130,7 @@ contains ! Repeat sampling source location until a good site has been found found = .false. - do while (.not.found) + do while (.not. found) ! Set particle defaults call p % initialize() @@ -145,16 +145,18 @@ contains call find_cell(p, found) ! Check if spatial site is in fissionable material - select type (space => external_source(i) % space) - type is (SpatialBox) - if (space % only_fissionable) then - if (p % material == MATERIAL_VOID) then - found = .false. - elseif (.not. materials(p % material) % fissionable) then - found = .false. + if (found) then + select type (space => external_source(i) % space) + type is (SpatialBox) + if (space % only_fissionable) then + if (p % material == MATERIAL_VOID) then + found = .false. + elseif (.not. materials(p % material) % fissionable) then + found = .false. + end if end if - end if - end select + end select + end if ! Check for rejection if (.not. found) then