From 6991f1283a021e57767a5a22dd21c1b624e27936 Mon Sep 17 00:00:00 2001 From: Andrew Myers Date: Wed, 26 Apr 2023 15:57:47 -0700 Subject: [PATCH] implement increment for pure SoA --- 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 bed21486144..19990c21c26 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);