diff --git a/src/modules/moduleInject.f90 b/src/modules/moduleInject.f90 index 2b23ac6..52e26d3 100644 --- a/src/modules/moduleInject.f90 +++ b/src/modules/moduleInject.f90 @@ -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