Added particle id to fatal error messages.

This commit is contained in:
Paul Romano 2011-12-21 00:48:46 -05:00
parent fd9cc40193
commit 5964082dde
2 changed files with 12 additions and 12 deletions

View file

@ -285,7 +285,8 @@ contains
! Do not handle reflective boundary conditions on lower universes
if (p % in_lower_universe) then
message = "Cannot reflect particle off surface in a lower universe."
message = "Cannot reflect particle " // trim(to_str(p % id)) // &
" off surface in a lower universe."
call fatal_error()
end if
@ -428,9 +429,9 @@ contains
! Couldn't find next cell anywhere!
if ((.not. found) .and. (.not. plotting)) then
message = "After particle crossed surface " // trim(to_str( &
surfaces(abs(p%surface)) % id)) // " it could not be located in &
&any cell and it did not leak."
message = "After particle " // trim(to_str(p % id)) // " crossed surface " &
// trim(to_str(surfaces(abs(p%surface)) % id)) // " it could not be &
&located in any cell and it did not leak."
call fatal_error()
end if
@ -495,14 +496,14 @@ contains
i_x = p % coord % lattice_x
i_y = p % coord % lattice_y
if (i_x < 1 .or. i_x > lat % n_x) then
message = "Reached edge of lattice " // trim(to_str(lat % id)) // &
" at position (" // trim(to_str(i_x)) // "," // &
trim(to_str(i_y)) // ")."
message = "Particle " // trim(to_str(p % id)) // " reached edge of &
&lattice " // trim(to_str(lat % id)) // " at position (" // &
trim(to_str(i_x)) // "," // trim(to_str(i_y)) // ")."
call fatal_error()
elseif (i_y < 1 .or. i_y > lat % n_y) then
message = "Reached edge of lattice " // trim(to_str(lat % id)) // &
" at position (" // trim(to_str(i_x)) // "," // &
trim(to_str(i_y)) // ")."
message = "Particle " // trim(to_str(p % id)) // " reached edge of &
&lattice " // trim(to_str(lat % id)) // " at position (" // &
trim(to_str(i_x)) // "," // trim(to_str(i_y)) // ")."
call fatal_error()
end if

View file

@ -44,8 +44,7 @@ contains
call find_cell(p, found_cell)
! Particle couldn't be located
if (.not. found_cell) then
write(message, '(A,3ES11.3)') &
"Could not locate cell for particle at: ", p % coord0 % xyz
message = "Could not locate particle " // trim(to_str(p % id))
call fatal_error()
end if