diff --git a/src/plot.cpp b/src/plot.cpp index 73dd43533..f3262185e 100644 --- a/src/plot.cpp +++ b/src/plot.cpp @@ -1100,7 +1100,7 @@ int ProjectionPlot::advance_to_boundary_from_void(Particle& p) else { // advance the particle for (int j = 0; j < p.n_coord(); ++j) p.coord(j).r += (min_dist + scoot) * p.coord(j).u; - return intersected_surface; + return std::abs(intersected_surface); } } @@ -1321,7 +1321,7 @@ void ProjectionPlot::create_output() const this_line_segments[tid][horiz].emplace_back( color_by_ == PlotColorBy::mats ? p.material() : p.coord(p.n_coord() - 1).cell, - dist.distance, dist.surface_index); + dist.distance, std::abs(dist.surface_index)); // Advance particle for (int lev = 0; lev < p.n_coord(); ++lev) { diff --git a/tests/regression_tests/plot_projections/plots.xml b/tests/regression_tests/plot_projections/plots.xml index 11fa27211..85689da14 100644 --- a/tests/regression_tests/plot_projections/plots.xml +++ b/tests/regression_tests/plot_projections/plots.xml @@ -28,6 +28,7 @@ 200 200 240 240 240 example2.png + 2 diff --git a/tests/regression_tests/plot_projections/results_true.dat b/tests/regression_tests/plot_projections/results_true.dat index 7f41f6a40..f1f3d9276 100644 --- a/tests/regression_tests/plot_projections/results_true.dat +++ b/tests/regression_tests/plot_projections/results_true.dat @@ -1 +1 @@ -186d646c4959755bf809d35c9f33a931fbd5195145131ae6764955bf276d44acf24970dfff76001106b93a7ce239d67d569440136b13073082c8ee23419d721e \ No newline at end of file +18b85140df16cec9268e76d41430971be7f835b4ef84efdc0065012b2b341a6f369c14ad435a728d9224800882e4a923308859c5849cede0bc4b8ea4f3234f6f \ No newline at end of file