Trying partial reflection

This commit is contained in:
Jorge Gonzalez 2026-02-03 10:15:12 +01:00
commit 159f2e7620
6 changed files with 91 additions and 60 deletions

View file

@ -387,9 +387,11 @@ MODULE moduleInject
partInj(n)%v = 0.D0
partInj(n)%v = self%vMod*direction + (/ self%v(1)%obj%randomVel(), &
self%v(2)%obj%randomVel(), &
self%v(3)%obj%randomVel() /)
do while(dot_product(partInj(n)%v, direction) <= 0.d0)
partInj(n)%v = self%vMod*direction + (/ self%v(1)%obj%randomVel(), &
self%v(2)%obj%randomVel(), &
self%v(3)%obj%randomVel() /)
end do
!If injecting a no-drift distribution and velocity is negative, reflect
if ((self%vMod == 0.D0) .and. &