From 547b95dfee663d197a1ad343157132e47564251f Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Mon, 9 Jan 2012 15:06:07 -0500 Subject: [PATCH 1/2] Added search for particle from universe 0 if particle can't be found after crossing lattice. --- src/geometry.F90 | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/geometry.F90 b/src/geometry.F90 index 35612f23cc..1dae6cedc8 100644 --- a/src/geometry.F90 +++ b/src/geometry.F90 @@ -513,9 +513,21 @@ contains ! Find cell in next lattice element call find_cell(p, found) if (.not. found) then - message = "Could not locate particle " // trim(to_str(p % id)) // & - " in universe " // to_str(universes(p % coord % universe) % id) - call fatal_error() + ! In some circumstances, a particle crossing the corner of a cell may not + ! be able to be found in the next universe. In this scenario we cut off + ! all lower-level coordinates and search from universe zero + + ! Remove lower coordinates + call deallocate_coord(p % coord0 % next) + p % coord => p % coord0 + + ! Search for particle + call find_cell(p, found) + if (.not. found) then + message = "Could not locate particle " // trim(to_str(p % id)) // & + " after crossing a lattice boundary." + call fatal_error() + end if end if end subroutine cross_lattice From d6be646d9fc09fd1dd7632edf0844f69e0171a27 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Mon, 9 Jan 2012 15:06:42 -0500 Subject: [PATCH 2/2] Added check for floating-point exceptions for Intel compiler in Makefile. --- src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index bb81589dc7..8b8a7b151e 100644 --- a/src/Makefile +++ b/src/Makefile @@ -32,7 +32,7 @@ ifeq ($(COMPILER),intel) # Debugging ifeq ($(DEBUG),yes) - F90FLAGS += -g -traceback -ftrapuv -fp-stack-check -check all + F90FLAGS += -g -traceback -ftrapuv -fp-stack-check -check all -fpe0 LDFLAGS += -g endif