Avoid very low macroparticle weight

This commit is contained in:
Jorge Gonzalez 2026-04-06 12:02:34 +02:00
commit 2c49e47712

View file

@ -292,6 +292,9 @@ MODULE moduleInject
! Adjust the weight of particles to match the new current
self%weightPerEdge(e) = self%weightPerEdge(e) + 1.0d-1 * alpha
! Limit the weight of a macroparticle to 1.0
self%weightPerEdge(e) = max(self%weightPerEdge(e), 1.d0)
end do
end select