diff --git a/include/openmc/lattice.h b/include/openmc/lattice.h index 618859c80a..64936ca0a3 100644 --- a/include/openmc/lattice.h +++ b/include/openmc/lattice.h @@ -257,7 +257,7 @@ public: ReverseLatticeIter rbegin(); - bool are_valid_indices(const int i_xyz[3]) const; + bool are_valid_indices(array const& i_xyz) const; std::pair> distance(Position r, Direction u, const std::array& i_xyz) const; diff --git a/include/openmc/particle.h b/include/openmc/particle.h index e8002cedbf..0aa3f4ac54 100644 --- a/include/openmc/particle.h +++ b/include/openmc/particle.h @@ -4,7 +4,6 @@ //! \file particle.h //! \brief Particle type -#include #include #include // for unique_ptr #include @@ -55,9 +54,7 @@ public: int cell {-1}; int universe {-1}; int lattice {-1}; - int lattice_x {-1}; - int lattice_y {-1}; - int lattice_z {-1}; + array lattice_i {-1, -1, -1}; bool rotated {false}; //!< Is the level rotated? }; diff --git a/src/geometry.cpp b/src/geometry.cpp index 23622ebad0..ce6dfd65b0 100644 --- a/src/geometry.cpp +++ b/src/geometry.cpp @@ -315,7 +315,7 @@ cross_lattice(Particle& p, const BoundaryInfo& boundary) if (settings::verbosity >= 10 || p.trace_) { write_message(fmt::format( " Crossing lattice {}. Current position ({},{},{}). r={}", - lat.id_, coord.lattice_x, coord.lattice_y, coord.lattice_z, p.r()), 1); + lat.id_, coord.lattice_i[0], coord.lattice_i[1], coord.lattice_i[2], p.r()), 1); } // Set the lattice indices.