Function used to find the zeros of of \ref korc_spatial_distribution.exponential_torus.
@param f Value of function. @param r Guess value of radial position of the particles. @param a Minor radius of the toroidal distribution @param ko Decay rate of radial distribution, see of \ref korc_spatial_distribution.exponential_torus. @param P Deviate of a random uniform distribution in the interval .
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rp), | intent(in) | :: | r | |||
real(kind=rp), | intent(in) | :: | a | |||
real(kind=rp), | intent(in) | :: | ko | |||
real(kind=rp), | intent(in) | :: | P |
FUNCTION fzero(r,a,ko,P) RESULT(f)
REAL(rp) :: f
REAL(rp), INTENT(IN) :: r
REAL(rp), INTENT(IN) :: a
REAL(rp), INTENT(IN) :: ko
REAL(rp), INTENT(IN) :: P
f = EXP(-ko*r)*(1.0_rp + r*ko) + ( 1.0_rp - EXP(-ko*a)*(1.0_rp + a*ko) )*P - 1.0_rp
END FUNCTION fzero