mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-25 04:25:29 -04:00
Support cell densities per instances in plots (#4006)
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
parent
5203640549
commit
e73d8048da
3 changed files with 26 additions and 7 deletions
|
|
@ -88,10 +88,7 @@ void PropertyData::set_value(size_t y, size_t x, const Particle& p, int level,
|
|||
{
|
||||
Cell* c = model::cells.at(p.lowest_coord().cell()).get();
|
||||
data_(y, x, 0) = (p.sqrtkT() * p.sqrtkT()) / K_BOLTZMANN;
|
||||
if (c->type_ != Fill::UNIVERSE && p.material() != MATERIAL_VOID) {
|
||||
Material* m = model::materials.at(p.material()).get();
|
||||
data_(y, x, 1) = m->density_gpcc_;
|
||||
}
|
||||
data_(y, x, 1) = c->density(p.cell_instance());
|
||||
}
|
||||
|
||||
void PropertyData::set_overlap(size_t y, size_t x, int /*overlap_idx*/)
|
||||
|
|
@ -150,7 +147,7 @@ void RasterData::set_value(size_t y, size_t x, const Particle& p, int level,
|
|||
// set density (g/cm³)
|
||||
if (c->type_ != Fill::UNIVERSE && p.material() != MATERIAL_VOID) {
|
||||
Material* m = model::materials.at(p.material()).get();
|
||||
property_data_(y, x, 1) = m->density_gpcc_;
|
||||
property_data_(y, x, 1) = c->density(p.cell_instance());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue