@@ -1109,8 +1109,7 @@ void RayTracePlot::set_output_path(pugi::xml_node node)
1109
1109
// if an intersection was found.
1110
1110
int RayTracePlot::advance_to_boundary_from_void (Geometron& p)
1111
1111
{
1112
- constexpr double scoot = 1e-5 ;
1113
- double min_dist = {INFINITY};
1112
+ double min_dist {INFINITY};
1114
1113
auto coord = p.coord (0 );
1115
1114
Universe* uni = model::universes[model::root_universe].get ();
1116
1115
int intersected_surface = -1 ;
@@ -1125,7 +1124,7 @@ int RayTracePlot::advance_to_boundary_from_void(Geometron& p)
1125
1124
return -1 ;
1126
1125
else { // advance the particle
1127
1126
for (int j = 0 ; j < p.n_coord (); ++j)
1128
- p.coord (j).r += (min_dist + scoot ) * p.coord (j).u ;
1127
+ p.coord (j).r += (min_dist + TINY_BIT ) * p.coord (j).u ;
1129
1128
return std::abs (intersected_surface);
1130
1129
}
1131
1130
}
@@ -1632,11 +1631,10 @@ void Ray::trace()
1632
1631
1633
1632
i_surface_ = std::abs (surface ()) - 1 ;
1634
1633
1635
- // This means no surface was intersected.
1636
- if (i_surface_ == 2147483646 ) {
1637
- std::cout << " lost a particle, u,r=!" << std::endl;
1638
- std::cout << r () << std::endl;
1639
- std::cout << u () << std::endl;
1634
+ // This means no surface was intersected. See cell.cpp
1635
+ // and search for numeric_limits to see where we return it.
1636
+ if (surface () == std::numeric_limits<int >::max ()) {
1637
+ warning (fmt::format (" Lost a ray, r = {}, u = {}" , u, r));
1640
1638
return ;
1641
1639
}
1642
1640
0 commit comments