From a6e89ecc117525acd462a2077103e9f12f02da10 Mon Sep 17 00:00:00 2001 From: Andrew Myers Date: Wed, 26 Apr 2023 17:12:11 -0700 Subject: [PATCH] Implement increment for pure SoA (#3278) The proposed changes: - [x] fix a bug or incorrect behavior in AMReX - [x] 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_ParticleContainerI.H | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Src/Particle/AMReX_ParticleContainerI.H b/Src/Particle/AMReX_ParticleContainerI.H index 053fe18c7a..234c7d7bdc 100644 --- a/Src/Particle/AMReX_ParticleContainerI.H +++ b/Src/Particle/AMReX_ParticleContainerI.H @@ -582,9 +582,10 @@ ParticleContainer_impl::Incremen const auto dxi = geom.InvCellSizeArray(); const auto domain = geom.Domain(); amrex::ParticleToMesh(*this, mf, lev, - [=] AMREX_GPU_DEVICE (const ParticleType& p, + [=] AMREX_GPU_DEVICE (const typename ParticleTileType::ConstParticleTileDataType& ptd, int ip, amrex::Array4 const& count) { + const auto& p = make_particle{}(ptd, ip); auto iv = getParticleCell(p, plo, dxi, domain); amrex::Gpu::Atomic::AddNoRet(&count(iv), 1.0_rt); }, false);