@brief Subroutine that contains calls to subroutine to generate a gamma distribution for the energy distribution of a given species in the simulation.
@param[in] params Core KORC simulation parameters. @param[in,out] g Relativistic gamma factor @f$\gamma@f$ of the particles in a given species in the simulation. These are so that, they follow a Gamma distribution in energy. The parameters of the Gamma distributions are given by the user. @param[out] go Mean value of @f$\gamma@f$ of the particles in a given species. used to calculate the minimum required time step to resolve in detail the full-orbit dynamics of the particles.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(KORC_PARAMS), | intent(in) | :: | params | |||
real(kind=rp), | intent(inout), | DIMENSION(:), ALLOCATABLE | :: | g | ||
real(kind=rp), | intent(out) | :: | go |
SUBROUTINE get_gamma_distribution(params,g,go)
TYPE(KORC_PARAMS), INTENT(IN) :: params
REAL(rp), DIMENSION(:), ALLOCATABLE, INTENT(INOUT) :: g
REAL(rp), INTENT(OUT) :: go
call initialize_gamma_params(params)
call save_gamma_params(params)
call sample_gamma_distribution(params,g,go)
END SUBROUTINE get_gamma_distribution