get_profiles Subroutine

public subroutine get_profiles(params, vars, P, F)

Arguments

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


Calls

proc~~get_profiles~~CallsGraph proc~get_profiles get_profiles proc~cart_to_cyl cart_to_cyl proc~get_profiles->proc~cart_to_cyl proc~get_analytical_profiles get_analytical_profiles proc~get_profiles->proc~get_analytical_profiles proc~uniform_profiles uniform_profiles proc~get_profiles->proc~uniform_profiles proc~cart_to_tor_check_if_confined cart_to_tor_check_if_confined proc~get_profiles->proc~cart_to_tor_check_if_confined proc~interp_profiles interp_profiles proc~get_profiles->proc~interp_profiles proc~cyl_to_cart cyl_to_cart proc~get_profiles->proc~cyl_to_cart proc~check_if_in_profiles_domain check_if_in_profiles_domain proc~interp_profiles->proc~check_if_in_profiles_domain proc~interp_3d_profiles interp_3D_profiles proc~interp_profiles->proc~interp_3d_profiles proc~korc_abort korc_abort proc~interp_profiles->proc~korc_abort proc~interp_2d_profiles interp_2D_profiles proc~interp_profiles->proc~interp_2d_profiles proc~get_fio_profile get_fio_profile proc~interp_profiles->proc~get_fio_profile ezspline_error ezspline_error proc~interp_3d_profiles->ezspline_error mpi_abort mpi_abort proc~korc_abort->mpi_abort proc~interp_2d_profiles->ezspline_error interface~fio_eval_field fio_eval_field proc~get_fio_profile->interface~fio_eval_field

Called by

proc~~get_profiles~~CalledByGraph proc~get_profiles get_profiles proc~avalanche_4d Avalanche_4D proc~avalanche_4d->proc~get_profiles proc~get_avalanche_4d get_Avalanche_4D proc~get_avalanche_4d->proc~avalanche_4d

Contents

Source Code


Source Code

  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