From 2c598129dad2c58a75b48feb18dd96d51eab94eb Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Sun, 17 Mar 2019 19:27:47 -0500 Subject: [PATCH] Removing position_rgb function. --- include/openmc/plot.h | 7 ------- src/plot.cpp | 47 ------------------------------------------- 2 files changed, 54 deletions(-) diff --git a/include/openmc/plot.h b/include/openmc/plot.h index 96c2f37ad..28e6734eb 100644 --- a/include/openmc/plot.h +++ b/include/openmc/plot.h @@ -162,13 +162,6 @@ void draw_mesh_lines(Plot pl, ImageData& data); //! \param[out] image data associated with the plot object void output_ppm(Plot pl, const ImageData& data); -//! Get the rgb color for a given particle position in a plot -//! \param[in] particle with position for current pixel -//! \param[in] plot object -//! \param[out] rgb color -//! \param[out] cell or material id for particle position -void position_rgb(Particle p, Plot pl, RGBColor& rgb, int& id); - //! Initialize a voxel file //! \param[in] id of an open hdf5 file //! \param[in] dimensions of the voxel file (dx, dy, dz) diff --git a/src/plot.cpp b/src/plot.cpp index 202e8e99a..edb50ed09 100644 --- a/src/plot.cpp +++ b/src/plot.cpp @@ -715,53 +715,6 @@ PropertyData PlotBase::get_property_map() const { return generate_data(); } -//============================================================================== -// POSITION_RGB computes the red/green/blue values for a given plot with the -// current particle's position -//============================================================================== - - -void position_rgb(Particle p, Plot pl, RGBColor& rgb, int& id) -{ - p.n_coord_ = 1; - - bool found_cell = find_cell(&p, 0); - - int j = p.n_coord_ - 1; - - if (settings::check_overlaps) {check_cell_overlap(&p);} - - // Set coordinate level if specified - if (pl.level_ >= 0) {j = pl.level_ + 1;} - - if (!found_cell) { - // If no cell, revert to default color - rgb = pl.not_found_; - id = NOT_FOUND; - } else { - if (PlotColorBy::mats == pl.color_by_) { - // Assign color based on material - const auto& c = model::cells[p.coord_[j].cell]; - if (c->type_ == FILL_UNIVERSE) { - // If we stopped on a middle universe level, treat as if not found - rgb = pl.not_found_; - id = NOT_FOUND; - } else if (p.material_ == MATERIAL_VOID) { - // By default, color void cells white - rgb = WHITE; - id = MATERIAL_VOID; - } else { - rgb = pl.colors_[p.material_]; - id = model::materials[p.material_]->id_; - } - } else if (PlotColorBy::cells == pl.color_by_) { - // Assign color based on cell - rgb = pl.colors_[p.coord_[j].cell]; - id = model::cells[p.coord_[j].cell]->id_; - } - } // endif found_cell -} - //============================================================================== // OUTPUT_PPM writes out a previously generated image to a PPM file //==============================================================================