Subroutine that works as an interface for initializing various gyro-angle distributions for the different simulated particle species.
At this moment this subroutine only calls the subroutine to generate a uniform gyro-angle distribution. This will be modified later.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(KORC_PARAMS), | intent(in) | :: | params | Core KORC simulation parameters. |
||
type(FIELDS), | intent(in) | :: | F | An instance of the KORC derived type FIELDS. This structure has the information of the magnetic field. |
||
type(SPECIES), | intent(inout), | DIMENSION(:), ALLOCATABLE | :: | spp | An instance of the derived type SPECIES containing all the parameters and simulation variables of the different species in the simulation. |
subroutine initial_gyro_distribution(params,F,spp)
!! @note Subroutine that works as an interface for initializing various
!! gyro-angle distributions for the different simulated particle
!! species. @endnote
!! @todo At this moment this subroutine only calls the subroutine
!! to generate
!! a uniform gyro-angle distribution. This will be modified later. @endtodo
TYPE(KORC_PARAMS), INTENT(IN) :: params
!! Core KORC simulation parameters.
TYPE(FIELDS), INTENT(IN) :: F
!! An instance of the KORC derived type FIELDS. This structure has
!! the information of the magnetic field.
TYPE(SPECIES), DIMENSION(:), ALLOCATABLE, INTENT(INOUT) :: spp
!! An instance of the derived type SPECIES containing all the parameters
!! and simulation variables of the different species in the simulation.
INTEGER :: ss
!! Species iterator.
do ss=1_idef,params%num_species
SELECT CASE (TRIM(spp(ss)%energy_distribution))
CASE ('THERMAL')
!Nothing, all was done in initialize_particles through
!thermal_distribution
CASE DEFAULT
call gyro_distribution(params,F,spp(ss))
END SELECT
end do
end subroutine initial_gyro_distribution