From dff9a87f0d5c39b74076f81537f6313457d9207a Mon Sep 17 00:00:00 2001 From: JGonzalez Date: Fri, 8 Aug 2025 19:27:27 +0200 Subject: [PATCH] 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. --- src/modules/moduleInject.f90 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/modules/moduleInject.f90 b/src/modules/moduleInject.f90 index 2a2c393..528cb91 100644 --- a/src/modules/moduleInject.f90 +++ b/src/modules/moduleInject.f90 @@ -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