Skip to content

Commit

Permalink
Fix loop over particle coordinate levels for source domain rejection (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
paulromano committed Nov 2, 2023
1 parent 19f121a commit 7aaccbb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 7aaccbb

Please sign in to comment.