Always call LocalCoord::rotate and set LocalCoord::rotated.

This commit is contained in:
Patrick Shriwise 2021-03-31 23:31:12 -05:00
parent 114a1062ea
commit 66e7e998af
2 changed files with 5 additions and 3 deletions

View file

@ -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) {
//========================================================================

View file

@ -38,6 +38,10 @@ namespace openmc {
void
LocalCoord::rotate(const std::vector<double>& rotation)
{
if (rotation.empty()) {
this->rotated = false;
return;
}
this->r = this->r.rotate(rotation);
this->u = this->u.rotate(rotation);
this->rotated = true;