mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Fix loop over particle coordinate levels for source domain rejection (#2751)
This commit is contained in:
parent
19f121a45a
commit
7aaccbbeee
1 changed files with 3 additions and 3 deletions
|
|
@ -222,10 +222,10 @@ SourceSite IndependentSource::sample(uint64_t* seed) const
|
|||
found = contains(domain_ids_, model::materials[mat_index]->id());
|
||||
}
|
||||
} else {
|
||||
for (const auto& coord : p.coord()) {
|
||||
for (int i = 0; i < p.n_coord(); i++) {
|
||||
auto id = (domain_type_ == DomainType::CELL)
|
||||
? model::cells[coord.cell]->id_
|
||||
: model::universes[coord.universe]->id_;
|
||||
? model::cells[p.coord(i).cell]->id_
|
||||
: model::universes[p.coord(i).universe]->id_;
|
||||
if ((found = contains(domain_ids_, id)))
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue