Skip to content

Commit 7aaccbb

Browse files
authored
Fix loop over particle coordinate levels for source domain rejection (#2751)
1 parent 19f121a commit 7aaccbb

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎src/source.cpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,10 @@ SourceSite IndependentSource::sample(uint64_t* seed) const
222222
found = contains(domain_ids_, model::materials[mat_index]->id());
223223
}
224224
} else {
225-
for (const auto& coord : p.coord()) {
225+
for (int i = 0; i < p.n_coord(); i++) {
226226
auto id = (domain_type_ == DomainType::CELL)
227-
? model::cells[coord.cell]->id_
228-
: model::universes[coord.universe]->id_;
227+
? model::cells[p.coord(i).cell]->id_
228+
: model::universes[p.coord(i).universe]->id_;
229229
if ((found = contains(domain_ids_, id)))
230230
break;
231231
}

0 commit comments

Comments
 (0)