mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-24 12:05:32 -04:00
Use 0-based indices for materials consistently
This commit is contained in:
parent
5c6633c2c3
commit
4a89075890
17 changed files with 82 additions and 107 deletions
|
|
@ -676,8 +676,8 @@ void position_rgb(Particle p, Plot pl, RGBColor& rgb, int& id)
|
|||
rgb = WHITE;
|
||||
id = -1;
|
||||
} else {
|
||||
rgb = pl.colors_[p.material - 1];
|
||||
id = model::materials[p.material - 1]->id_;
|
||||
rgb = pl.colors_[p.material];
|
||||
id = model::materials[p.material]->id_;
|
||||
}
|
||||
} else if (PlotColorBy::cells == pl.color_by_) {
|
||||
// Assign color based on cell
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue