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:
parent
6b78ae3738
commit
b972120ed5
3 changed files with 18 additions and 27 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue