Skip to content

Commit

Permalink
fix a couple of places where we underflow the particle idcpu
Browse files Browse the repository at this point in the history
  • Loading branch information
atmyers committed Jan 5, 2024
1 parent 7aba6b4 commit 3e53f58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Source/Particles/PhysicalParticleContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ namespace
if (has_breit_wheeler) {p_optical_depth_BW[ip] = 0._rt;}
#endif

idcpu[ip] = uint64_t(-1);
amrex::ParticleIDWrapper{idcpu[ip]} = uint64_t(-1);
}
}

Expand Down
2 changes: 1 addition & 1 deletion Source/Particles/Resampling/LevelingThinning.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ void LevelingThinning::operator() (WarpXParIter& pti, const int lev,
// Remove particle with probability 1 - particle_weight/level_weight
if (random_number > w[indices[i]]/level_weight)
{
idcpu[indices[i]] = -1;
amrex::ParticleIDWrapper{idcpu[indices[i]]} = -1;
}
// Set particle weight to level weight otherwise
else
Expand Down

0 comments on commit 3e53f58

Please sign in to comment.