diff --git a/src/geometry.cpp b/src/geometry.cpp index 8e6519fa86..9d612412b5 100644 --- a/src/geometry.cpp +++ b/src/geometry.cpp @@ -188,9 +188,7 @@ find_cell_inner(Particle& p, const NeighborList* neighbor_list) coord.r -= c.translation_; // Apply rotation. - if (!c.rotation_.empty()) { - coord.rotate(c.rotation_); - } + coord.rotate(c.rotation_); } else if (c.type_ == Fill::LATTICE) { //======================================================================== diff --git a/src/particle.cpp b/src/particle.cpp index 2e24131742..d05b81d848 100644 --- a/src/particle.cpp +++ b/src/particle.cpp @@ -38,6 +38,10 @@ namespace openmc { void LocalCoord::rotate(const std::vector& rotation) { + if (rotation.empty()) { + this->rotated = false; + return; + } this->r = this->r.rotate(rotation); this->u = this->u.rotate(rotation); this->rotated = true;