mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Fixed plotting with void cells. Closes #110 on github.
This commit is contained in:
parent
45976ca6f7
commit
4654ee4e8d
1 changed files with 10 additions and 3 deletions
13
src/plot.F90
13
src/plot.F90
|
|
@ -115,9 +115,16 @@ contains
|
|||
if (pl % color_by == PLOT_COLOR_MATS) then
|
||||
! Assign color based on material
|
||||
c => cells(p % coord % cell)
|
||||
r = pl % colors(c % material) % rgb(1)
|
||||
g = pl % colors(c % material) % rgb(2)
|
||||
b = pl % colors(c % material) % rgb(3)
|
||||
if (c % material == MATERIAL_VOID) then
|
||||
! By default, color void cells white
|
||||
r = 255
|
||||
g = 255
|
||||
b = 255
|
||||
else
|
||||
r = pl % colors(c % material) % rgb(1)
|
||||
g = pl % colors(c % material) % rgb(2)
|
||||
b = pl % colors(c % material) % rgb(3)
|
||||
end if
|
||||
else if (pl % color_by == PLOT_COLOR_CELLS) then
|
||||
! Assign color based on cell
|
||||
r = pl % colors(p % coord % cell) % rgb(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue