Skip to content

Commit

Permalink
Update position in 2nd pass for tracer advect with Ucc. (#3496)
Browse files Browse the repository at this point in the history
## Summary

In the Ucc advection routine for tracer particles, the 2nd advection
pass did not increment the particle position. This change fixes the
issue, and it is now consistent with the leapfrog approach used in the
Umac advection routine.

## Additional background

## Checklist

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
dwillcox authored Aug 16, 2023
1 parent 3396b1d commit 4352810
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Src/Particle/AMReX_TracerParticles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ TracerParticleContainer::AdvectWithUcc (const MultiFab& Ucc, int lev, Real dt)
{
for (int dim=0; dim < AMREX_SPACEDIM; dim++)
{
p.rdata(dim) = p.rdata(dim) + static_cast<ParticleReal>(dt*v[dim]);
p.pos(dim) = p.rdata(dim) + static_cast<ParticleReal>(dt*v[dim]);
p.rdata(dim) = v[dim];
}
}
Expand Down

0 comments on commit 4352810

Please sign in to comment.