Skip to content

Commit 23b1ad5

Browse files
Skip SortForDeposition if do_not_deposit (BLAST-WarpX#6267)
In large 3d cases where we have lots of neutral particles this change sped up the simulation from on average getting 0.91 steps/s to 1.45 steps/s. Signed-off-by: roelof-groenewald <[email protected]>
1 parent 09637e1 commit 23b1ad5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Source/Particles/MultiParticleContainer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,7 @@ MultiParticleContainer::SortParticlesByBin (
776776
{
777777
for (auto& pc : allcontainers) {
778778
if (sort_particles_for_deposition) {
779+
if (pc->do_not_deposit) { continue; }
779780
pc->SortParticlesForDeposition(sort_idx_type);
780781
} else {
781782
pc->SortParticlesByBin(bin_size);

0 commit comments

Comments
 (0)