mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
Resetting coordinates at lower levels in neighbor_list_find_cell.
This commit is contained in:
parent
66e7e998af
commit
a8ce144585
2 changed files with 9 additions and 5 deletions
|
|
@ -188,7 +188,9 @@ find_cell_inner(Particle& p, const NeighborList* neighbor_list)
|
|||
coord.r -= c.translation_;
|
||||
|
||||
// Apply rotation.
|
||||
coord.rotate(c.rotation_);
|
||||
if (!c.rotation_.empty()) {
|
||||
coord.rotate(c.rotation_);
|
||||
}
|
||||
|
||||
} else if (c.type_ == Fill::LATTICE) {
|
||||
//========================================================================
|
||||
|
|
@ -245,6 +247,12 @@ find_cell_inner(Particle& p, const NeighborList* neighbor_list)
|
|||
|
||||
bool neighbor_list_find_cell(Particle& p)
|
||||
{
|
||||
|
||||
// Reset all the deeper coordinate levels.
|
||||
for (int i = p.n_coord_; i < p.coord_.size(); i++) {
|
||||
p.coord_[i].reset();
|
||||
}
|
||||
|
||||
// Get the cell this particle was in previously.
|
||||
auto coord_lvl = p.n_coord_ - 1;
|
||||
auto i_cell = p.coord_[coord_lvl].cell;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue