mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 21:25:36 -04:00
Apply @pshriwise suggestions from code review
Co-authored-by: Patrick Shriwise <pshriwise@gmail.com>
This commit is contained in:
parent
2b401bc1f1
commit
5d441251fc
1 changed files with 2 additions and 7 deletions
|
|
@ -217,19 +217,14 @@ SourceSite IndependentSource::sample(uint64_t* seed) const
|
|||
if (domain_type_ == DomainType::MATERIAL) {
|
||||
auto mat_index = p.material();
|
||||
if (mat_index != MATERIAL_VOID) {
|
||||
if (contains(domain_ids_, model::materials[mat_index]->id())) {
|
||||
found = true;
|
||||
}
|
||||
found = contains(domain_ids_, model::materials[mat_index]->id());
|
||||
}
|
||||
} else {
|
||||
for (const auto& coord : p.coord()) {
|
||||
auto id = (domain_type_ == DomainType::CELL)
|
||||
? model::cells[coord.cell]->id_
|
||||
: model::universes[coord.universe]->id_;
|
||||
if (contains(domain_ids_, id)) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
if (found = contains(domain_ids_, id)) break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue