mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
Adding an xml setting for the showing the overlaps.
This commit is contained in:
parent
552ab71a50
commit
e837f2eb19
2 changed files with 17 additions and 1 deletions
|
|
@ -112,7 +112,7 @@ public:
|
|||
Position width_; //!< Plot width in geometry
|
||||
PlotBasis basis_; //!< Plot basis (XY/XZ/YZ)
|
||||
std::array<size_t, 3> pixels_; //!< Plot size in pixels
|
||||
bool color_overlaps_ = true;
|
||||
bool color_overlaps_;
|
||||
int level_; //!< Plot universe level
|
||||
};
|
||||
|
||||
|
|
@ -210,6 +210,7 @@ private:
|
|||
void set_user_colors(pugi::xml_node plot_node);
|
||||
void set_meshlines(pugi::xml_node plot_node);
|
||||
void set_mask(pugi::xml_node plot_node);
|
||||
void set_color_overlaps(pugi::xml_node plot_node);
|
||||
|
||||
// Members
|
||||
public:
|
||||
|
|
|
|||
15
src/plot.cpp
15
src/plot.cpp
|
|
@ -657,6 +657,19 @@ Plot::set_mask(pugi::xml_node plot_node)
|
|||
}
|
||||
}
|
||||
|
||||
void Plot::set_color_overlaps(pugi::xml_node plot_node) {
|
||||
color_overlaps_ = false;
|
||||
if (check_for_node(plot_node, "show_overlaps")) {
|
||||
color_overlaps_ = get_node_value_bool(plot_node, "show_overlaps");
|
||||
}
|
||||
|
||||
// make sure we allocate the vector for counting overlap checks if
|
||||
// they're going to be plotted
|
||||
if (color_overlaps_ && settings::run_mode == RUN_MODE_PLOTTING) {
|
||||
settings::check_overlaps = true;
|
||||
}
|
||||
}
|
||||
|
||||
Plot::Plot(pugi::xml_node plot_node)
|
||||
: index_meshlines_mesh_{-1}
|
||||
{
|
||||
|
|
@ -672,6 +685,7 @@ Plot::Plot(pugi::xml_node plot_node)
|
|||
set_user_colors(plot_node);
|
||||
set_meshlines(plot_node);
|
||||
set_mask(plot_node);
|
||||
set_color_overlaps(plot_node);
|
||||
} // End Plot constructor
|
||||
|
||||
//==============================================================================
|
||||
|
|
@ -868,6 +882,7 @@ void create_voxel(Plot pl)
|
|||
pltbase.basis_ = PlotBasis::xy;
|
||||
pltbase.pixels_ = pl.pixels_;
|
||||
pltbase.level_ = -1; // all universes for voxel files
|
||||
pltbase.color_overlaps_ = pl.color_overlaps_;
|
||||
|
||||
ProgressBar pb;
|
||||
for (int z = 0; z < pl.pixels_[2]; z++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue