Skip to content

Commit

Permalink
Fix dangling-reference error for ParticleContainer Increment.
Browse files Browse the repository at this point in the history
  • Loading branch information
philip-blakely committed Nov 21, 2024
1 parent c9546cd commit e248781
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Src/Particle/AMReX_ParticleContainerI.H
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ ParticleContainer_impl<ParticleType, NArrayReal, NArrayInt, Allocator, CellAssig
[=] AMREX_GPU_DEVICE (const typename ParticleTileType::ConstParticleTileDataType& ptd, int ip,
amrex::Array4<amrex::Real> const& count)
{
const auto& p = make_particle<ConstParticleType>{}(ptd, ip);
const auto p = make_particle<ConstParticleType>{}(ptd, ip);
CellAssignor assignor;
IntVect iv = assignor(p, plo, dxi, domain);
amrex::Gpu::Atomic::AddNoRet(&count(iv), 1.0_rt);
Expand Down

0 comments on commit e248781

Please sign in to comment.