Skip to content

Commit 44c5c7a

Browse files
authored
When checking for periodic outs on GPU, copy full particle data (#3646)
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
1 parent 4b8dd03 commit 44c5c7a

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Src/Particle/AMReX_ParticleUtil.H

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -487,11 +487,7 @@ partitionParticlesByDest (PTile& ptile, const PLocator& ploc, CellAssignor&& ass
487487
}
488488
else
489489
{
490-
amrex::Particle<0> p_prime;
491-
AMREX_D_TERM(p_prime.pos(0) = src_data.pos(0, i+this_offset);,
492-
p_prime.pos(1) = src_data.pos(1, i+this_offset);,
493-
p_prime.pos(2) = src_data.pos(2, i+this_offset););
494-
490+
auto p_prime = src_data.getSuperParticle(i+this_offset);
495491
enforcePeriodic(p_prime, plo, phi, rlo, rhi, is_per);
496492
auto tup_prime = ploc(p_prime, lev_min, lev_max, nGrow, assignor);
497493
assigned_grid = amrex::get<0>(tup_prime);

0 commit comments

Comments
 (0)