From f1b92603c80937104ed8e0f2948cb9237838cc46 Mon Sep 17 00:00:00 2001 From: Gavin Ridley Date: Sun, 9 Jan 2022 17:56:23 -0500 Subject: [PATCH] update projection plot regr test --- src/plot.cpp | 4 ++-- tests/regression_tests/plot_projections/plots.xml | 1 + tests/regression_tests/plot_projections/results_true.dat | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plot.cpp b/src/plot.cpp index 73dd435333..f3262185e6 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 11fa27211f..85689da147 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 7f41f6a407..f1f3d92766 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