From 8d6ef280c7b2180416d1bc9bbb31354cbbc45abd Mon Sep 17 00:00:00 2001 From: Andrew Myers Date: Thu, 27 Apr 2023 12:14:04 -0700 Subject: [PATCH] Fix RealVect version of pos() for pure SoA (#3283) The proposed changes: - [x] fix a bug or incorrect behavior in AMReX - [ ] add new capabilities to AMReX - [ ] changes answers in the test suite to more than roundoff level - [ ] are likely to significantly affect the results of downstream AMReX users - [ ] include documentation in the code and/or rst files, if appropriate --- Src/Particle/AMReX_ParticleTile.H | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Particle/AMReX_ParticleTile.H b/Src/Particle/AMReX_ParticleTile.H index ba68812e5bf..0cfedd1c17a 100644 --- a/Src/Particle/AMReX_ParticleTile.H +++ b/Src/Particle/AMReX_ParticleTile.H @@ -385,7 +385,7 @@ struct SoAParticle : SoAParticleBase //functions to get positions of the particle in the SOA data AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE - RealVect pos () const & {return RealVect(AMREX_D_DECL(this->m_particle_tile_data->m_rdata[0][m_index], this->m_particle_tile_data.m_rdata[1][m_index], this->m_particle_tile_data->m_rdata[2][m_index]));} + RealVect pos () const & {return RealVect(AMREX_D_DECL(this->m_particle_tile_data.m_rdata[0][m_index], this->m_particle_tile_data.m_rdata[1][m_index], this->m_particle_tile_data.m_rdata[2][m_index]));} AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE RealType& pos (int position_index) &