Switching to variable particle weight

I have to change the injection of particles. Each edge will receive a
similar number of particles and their weight will change to have a
constant density based on the geometry.

Still testing.
This commit is contained in:
Jorge Gonzalez 2024-07-04 10:56:13 +02:00
commit b972120ed5
3 changed files with 18 additions and 27 deletions

View file

@ -40,10 +40,10 @@ MODULE moduleRandom
INTEGER:: rnd
REAL(8):: rnd01
rnd = 0.D0
rnd = 0
CALL RANDOM_NUMBER(rnd01)
rnd = INT(REAL(b - a) * rnd01) + 1
rnd = NINT(REAL(b - a) * rnd01) + a
END FUNCTION randomIntAB