Merge pull request #957 from GiudGiud/lost_cell_particle

Made not finding the particle's cell while tracking a non-fatal error
This commit is contained in:
Paul Romano 2018-01-23 06:34:35 -06:00 committed by GitHub
commit 3bcfa25a7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,7 +2,7 @@ module tracking
use constants
use cross_section, only: calculate_xs
use error, only: fatal_error, warning, write_message
use error, only: warning, write_message
use geometry_header, only: cells
use geometry, only: find_cell, distance_to_boundary, cross_lattice, &
check_cell_overlap
@ -85,7 +85,9 @@ contains
if (p % coord(p % n_coord) % cell == NONE) then
call find_cell(p, found_cell)
if (.not. found_cell) then
call fatal_error("Could not locate particle " // trim(to_str(p % id)))
call p % mark_as_lost("Could not find the cell containing" &
// " particle " // trim(to_str(p %id)))
return
end if
! set birth cell attribute