Subrotuine that calls the appropriate subroutine for calculating or interpolating the plasma profiles at the particles' position.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(KORC_PARAMS), | intent(in) | :: | params | Core KORC simulation parameters. |
||
type(PARTICLES), | intent(inout) | :: | vars | An instance of PARTICLES containing the variables of a given species. |
||
type(PROFILES), | intent(in) | :: | P | An instance of KORC's derived type PROFILES containing all the information about the plasma profiles used in the simulation. See [[korc_types] and korc_profiles. |
||
type(FIELDS), | intent(in) | :: | F | An instance of the KORC derived type FIELDS. |
subroutine get_profiles(params,vars,P,F)
!! @note Subrotuine that calls the appropriate subroutine for calculating
!! or interpolating the plasma profiles at the particles' position. @endnote
TYPE(KORC_PARAMS), INTENT(IN) :: params
!! Core KORC simulation parameters.
TYPE(PARTICLES), INTENT(INOUT) :: vars
!! An instance of PARTICLES containing the variables of a given species.
TYPE(PROFILES), INTENT(IN) :: P
!! An instance of KORC's derived type PROFILES containing all
!! the information about the plasma profiles used in the
!! simulation. See [[korc_types] and [[korc_profiles]].
TYPE(FIELDS), INTENT(IN) :: F
!! An instance of the KORC derived type FIELDS.
SELECT CASE (TRIM(params%profile_model))
CASE('ANALYTICAL')
! write(output_unit_write,'("Y in: ",E17.10)') vars%Y(1,:)
call cyl_to_cart(vars%Y, vars%X)
! write(output_unit_write,'("X getprof: ",E17.10)') vars%X(1,:)
call cart_to_tor_check_if_confined(vars%X,F,vars%Y,vars%flagCon)
! write(output_unit_write,'("flag: ",I15)') vars%flagCon(1)
call get_analytical_profiles(P,vars%Y,vars%ne,vars%Te, &
vars%Zeff,vars%flagCon)
call cart_to_cyl(vars%X, vars%Y)
! write(output_unit_write,'("Y out: ",E17.10)') vars%Y(1,:)
CASE('EXTERNAL')
call interp_profiles(params,vars,P)
CASE('UNIFORM')
call uniform_profiles(vars,P)
CASE DEFAULT
END SELECT
end subroutine get_profiles