Skip to content

Commit a6e89ec

Browse files
authored
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
1 parent a5a0715 commit a6e89ec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Src/Particle/AMReX_ParticleContainerI.H

+2-1
Original file line numberDiff line numberDiff line change
@@ -582,9 +582,10 @@ ParticleContainer_impl<ParticleType, NArrayReal, NArrayInt, Allocator>::Incremen
582582
const auto dxi = geom.InvCellSizeArray();
583583
const auto domain = geom.Domain();
584584
amrex::ParticleToMesh(*this, mf, lev,
585-
[=] AMREX_GPU_DEVICE (const ParticleType& p,
585+
[=] AMREX_GPU_DEVICE (const typename ParticleTileType::ConstParticleTileDataType& ptd, int ip,
586586
amrex::Array4<amrex::Real> const& count)
587587
{
588+
const auto& p = make_particle<ParticleType>{}(ptd, ip);
588589
auto iv = getParticleCell(p, plo, dxi, domain);
589590
amrex::Gpu::Atomic::AddNoRet(&count(iv), 1.0_rt);
590591
}, false);

0 commit comments

Comments
 (0)