Implemenint injecting particles without direction

I was almost sure this was implemented in the past, but it was not working.

Now, if n = 0 or if n is not provided, particles are injected with the normal to the surface.
This commit is contained in:
Jorge Gonzalez 2025-08-08 19:27:27 +02:00
commit dff9a87f0d

View file

@ -377,7 +377,13 @@ MODULE moduleInject
!Assign particle type
partInj(n)%species => self%species
direction = self%n
if (all(self%n == 0.D0)) then
direction = randomEdge%normal
else
direction = self%n
end if
partInj(n)%v = 0.D0