Skip to content

Commit

Permalink
Ensure do_SEE is executed only if SEE probability > 0
Browse files Browse the repository at this point in the history
* Also adjusted initialization of SEE_probability to 0. instead of 0.0_rt
  • Loading branch information
budjensen committed Feb 28, 2025
1 parent fb3bf81 commit cf218c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Source/Particles/ParticleBoundaries.H
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ struct ParticleBoundaries

bool reflect_all_velocities;

amrex::Real SEE_probability = 0.0_rt;
amrex::Real SEE_probability = 0.;
amrex::Real v_SEE = 0.;
};
ParticleBoundariesData data;
Expand Down
2 changes: 1 addition & 1 deletion Source/Particles/WarpXParticleContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1660,7 +1660,7 @@ WarpXParticleContainer::ApplyBoundaryConditions (){
do_SEE_flag,
boundary_conditions, engine);

if (do_SEE_flag) {
if (boundary_conditions.SEE_probability > 0. && do_SEE_flag) {
ApplyParticleBoundaries::do_SEE(xpos, ypos, zpos, gridmin, gridmax,
boundary_conditions.SEE_probability,
boundary_conditions.v_SEE,
Expand Down

0 comments on commit cf218c9

Please sign in to comment.