Skip to content

Commit

Permalink
When checking for periodic outs on GPU, copy full particle data (#3646)
Browse files Browse the repository at this point in the history
Fixes a bug in mapped coordinates when GPUs are enabled.

The proposed changes:
- [x] fix a bug or incorrect behavior in AMReX
- [ ] 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 committed Nov 29, 2023
1 parent 4b8dd03 commit 44c5c7a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Src/Particle/AMReX_ParticleUtil.H
Original file line number Diff line number Diff line change
Expand Up @@ -487,11 +487,7 @@ partitionParticlesByDest (PTile& ptile, const PLocator& ploc, CellAssignor&& ass
}
else
{
amrex::Particle<0> p_prime;
AMREX_D_TERM(p_prime.pos(0) = src_data.pos(0, i+this_offset);,
p_prime.pos(1) = src_data.pos(1, i+this_offset);,
p_prime.pos(2) = src_data.pos(2, i+this_offset););

auto p_prime = src_data.getSuperParticle(i+this_offset);
enforcePeriodic(p_prime, plo, phi, rlo, rhi, is_per);
auto tup_prime = ploc(p_prime, lev_min, lev_max, nGrow, assignor);
assigned_grid = amrex::get<0>(tup_prime);
Expand Down

0 comments on commit 44c5c7a

Please sign in to comment.