From 4c50cbcda8686d43da6c9b19909077ee3d97eba9 Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Tue, 12 Mar 2019 20:35:21 -0500 Subject: [PATCH] Removing original loop from create_ppm. --- src/plot.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plot.cpp b/src/plot.cpp index ccd96fde4..da3bdf549 100644 --- a/src/plot.cpp +++ b/src/plot.cpp @@ -4,6 +4,8 @@ #include #include +#include "xtensor/xview.hpp" + #include "openmc/cell.h" #include "openmc/constants.h" #include "openmc/file_utils.h" @@ -132,7 +134,8 @@ void create_ppm(Plot pl) // double in_pixel = (pl.width_[0])/static_cast(width); // double out_pixel = (pl.width_[1])/static_cast(height); - ImageData data({width, height}, pl.not_found_); + ImageData data({width, height}); + xt::view(data, xt::all(), xt::all()) = pl.not_found_; // int in_i, out_i; // Position r;