Skip to content

Commit

Permalink
Implement increment for pure SoA (#3278)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
atmyers authored Apr 27, 2023
1 parent a5a0715 commit a6e89ec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Src/Particle/AMReX_ParticleContainerI.H
Original file line number Diff line number Diff line change
Expand Up @@ -582,9 +582,10 @@ ParticleContainer_impl<ParticleType, NArrayReal, NArrayInt, Allocator>::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<amrex::Real> const& count)
{
const auto& p = make_particle<ParticleType>{}(ptd, ip);
auto iv = getParticleCell(p, plo, dxi, domain);
amrex::Gpu::Atomic::AddNoRet(&count(iv), 1.0_rt);
}, false);
Expand Down

0 comments on commit a6e89ec

Please sign in to comment.