mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-24 12:05:32 -04:00
Using xtensor initializer constructor.
This commit is contained in:
parent
09258c5b79
commit
898d1cfb7e
1 changed files with 3 additions and 2 deletions
|
|
@ -135,11 +135,12 @@ void create_ppm(Plot pl)
|
|||
size_t width = pl.pixels_[0];
|
||||
size_t height = pl.pixels_[1];
|
||||
|
||||
ImageData data({width, height});
|
||||
xt::view(data, xt::all(), xt::all()) = pl.not_found_;
|
||||
ImageData data({width, height}, pl.not_found_);
|
||||
|
||||
// generate ids for the plot
|
||||
auto ids = pl.get_id_map();
|
||||
|
||||
// assign colors
|
||||
for (int y = 0; y < height; y++) {
|
||||
for (int x = 0; x < width; x++) {
|
||||
auto id = ids.data(y, x, pl.color_by_);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue