First step of performance improvement
Finalysing first step of performance improvement focusing on reducing iteration CPU time by improving calculation of basic element functions, which took a lot of the CPU time
This commit is contained in:
parent
7b7a5c45ca
commit
746c5bea09
13 changed files with 260 additions and 252 deletions
|
|
@ -111,13 +111,13 @@ MODULE moduleCollisions
|
|||
IMPLICIT NONE
|
||||
|
||||
REAL(8):: n(1:3)
|
||||
REAL(8):: cosXii, sinXii, eps
|
||||
REAL(8):: cosXi, sinXi, eps
|
||||
|
||||
cosXii = random(-1.D0, 1.D0)
|
||||
sinXii = DSQRT(1.D0 - cosXii**2)
|
||||
cosXi = random(-1.D0, 1.D0)
|
||||
sinXi = DSQRT(1.D0 - cosXi**2)
|
||||
eps = random(0.D0, PI2)
|
||||
|
||||
n = (/ cosXii, sinXii*DCOS(eps), sinXii*DSIN(eps) /)
|
||||
n = (/ cosXi, sinXi*DCOS(eps), sinXi*DSIN(eps) /)
|
||||
|
||||
END FUNCTION randomDirectionVHS
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue