Skip to content

Commit

Permalink
Fix start_comp offset in tracer particle routines
Browse files Browse the repository at this point in the history
  • Loading branch information
atmyers committed Aug 20, 2024
1 parent 0e97bad commit 7f2b785
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Src/Particle/AMReX_TracerParticle_mod_K.H
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ void linear_interpolate_to_particle (const P& p,
amrex::Real sz[] = {amrex::Real(1.0) - zint, zint};
#endif

for (int comp = start_comp; comp < ncomp; ++comp) {
for (int comp = start_comp; comp < start_comp + ncomp; ++comp) {
val[ctr] = ParticleReal(0.0);
#if (AMREX_SPACEDIM > 2)
for (int kk = 0; kk <=1; ++kk) {
Expand Down Expand Up @@ -378,7 +378,7 @@ void linear_interpolate_to_particle_z (const P& p,
hint_ilojhi,
hint_ihijhi};
#endif
for (int comp = start_comp; comp < ncomp; ++comp) {
for (int comp = start_comp; comp < start_comp + ncomp; ++comp) {
val[ctr] = amrex::ParticleReal(0.);
#if (AMREX_SPACEDIM == 2)
int k0 = 0;
Expand Down Expand Up @@ -550,7 +550,7 @@ void linear_interpolate_to_particle_mapped (const P& p,

int i = p.idata(0);
int j = p.idata(1);
for (int comp = start_comp; comp < ncomp; ++comp) {
for (int comp = start_comp; comp < start_comp + ncomp; ++comp) {

#if (AMREX_SPACEDIM == 2)
// Value of data at surrounding nodes
Expand Down

0 comments on commit 7f2b785

Please sign in to comment.