initial_gyro_distribution Subroutine

public subroutine initial_gyro_distribution(params, F, spp)

Arguments

Type IntentOptional AttributesName
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.


Called by

proc~~initial_gyro_distribution~~CalledByGraph proc~initial_gyro_distribution initial_gyro_distribution proc~set_up_particles_ic set_up_particles_ic proc~set_up_particles_ic->proc~initial_gyro_distribution program~main main program~main->proc~set_up_particles_ic

Contents


Source Code

  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