Skip to content

Commit 05d2ff6

Browse files
authored
Add comment that is safe to assume divisors are not zero in tracer mod (#5198)
Closes #5058. The proposed changes: - [ ] 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 4af9014 commit 05d2ff6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Src/Particle/AMReX_TracerParticle_mod_K.H

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ void linear_interpolate_to_particle_z (const P& p,
330330
++yctr;
331331
}
332332
}
333+
// it is safe to assume the divisors here are not zero or near zero.
333334
amrex::Real hint_ilo = (p.pos(1) - ht[0]) / (ht[1] - ht[0]);
334335
amrex::Real hint_ihi = (p.pos(1) - ht[2]) / (ht[3] - ht[2]);
335336

@@ -408,7 +409,7 @@ void linear_interpolate_to_particle_z (const P& p,
408409
);
409410
++zctr;
410411
}}}
411-
412+
// it is safe to assume the divisors here are not zero or near zero.
412413
amrex::Real hint_ilojlo = ( p.pos(2) - ht[0] ) / (ht[1] - ht[0]);
413414
amrex::Real hint_ilojhi = ( p.pos(2) - ht[2] ) / (ht[3] - ht[2]);
414415
amrex::Real hint_ihijlo = ( p.pos(2) - ht[4] ) / (ht[5] - ht[4]);

0 commit comments

Comments
 (0)