From 45b24ca78eaa145713d8d4fb3e0c42e755817a04 Mon Sep 17 00:00:00 2001 From: YoungHui Park Date: Wed, 1 Apr 2020 17:07:41 -0500 Subject: [PATCH] Switch to push_back method instead of manual indexing --- include/openmc/particle.h | 2 -- src/particle.cpp | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/include/openmc/particle.h b/include/openmc/particle.h index 705675e2e7..f70faa611d 100644 --- a/include/openmc/particle.h +++ b/include/openmc/particle.h @@ -159,8 +159,6 @@ public: neutron, photon, electron, positron }; - int64_t icross = 0; - //! Saved ("banked") state of a particle //! NOTE: This structure's MPI type is built in initialize_mpi() of //! initialize.cpp. Any changes made to the struct here must also be diff --git a/src/particle.cpp b/src/particle.cpp index 28d93eee3c..59e5bfb94e 100644 --- a/src/particle.cpp +++ b/src/particle.cpp @@ -423,8 +423,7 @@ Particle::cross_surface() site.particle = this->type_; // site.parent_id = this->id_; // site.progeny_id = this->n_progeny_; - simulation::surf_src_bank[Particle::icross] = site; - Particle::icross += 1; + simulation::surf_src_bank.push_back(site); } // Handle any applicable boundary conditions.