Avoid very low macroparticle weight
This commit is contained in:
parent
8ce86663a7
commit
2c49e47712
1 changed files with 3 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue