c_rProfile Derived Type

type, public, ABSTRACT :: c_rProfile


Inherited by

type~~c_rprofile~~InheritedByGraph type~c_rprofile c_rProfile type~t_rprofile_bspl t_rProfile_bspl type~t_rprofile_bspl->type~c_rprofile type~t_rprofile_poly t_rProfile_poly type~t_rprofile_poly->type~c_rprofile

Components

Type Visibility Attributes Name Initial
integer, public :: n_coefs
real(kind=wp), public, ALLOCATABLE :: coefs(:)

Type-Bound Procedures

procedure(i_fun_eval_at_rho2), public, deferred :: eval_at_rho2

  • function i_fun_eval_at_rho2(sf, rho2, deriv) result(profile_value) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(c_rProfile), intent(in) :: sf
    real(kind=wp), intent(in) :: rho2
    integer, intent(in), optional :: deriv

    Return Value real(kind=wp)

procedure(i_fun_antiderivative), public, deferred :: antiderivative

  • function i_fun_antiderivative(sf) result(antideriv) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(c_rProfile), intent(in) :: sf

    Return Value class(c_rProfile), ALLOCATABLE

procedure, public :: eval_at_rho => rProfile_eval_at_rho

  • public function rProfile_eval_at_rho(sf, rho, deriv) result(derivative)

    evaluate the n-th derivative of a radial profile with respect to rho ~sqrt(magnetic flux). NOTE: n has to be in [0,4] due to an explicit implementation of the product rule.

    Arguments

    Type IntentOptional Attributes Name
    class(c_rProfile) :: sf

    self

    real(kind=wp), intent(in) :: rho

    rho position rho ~sqrt(magnetic flux)

    integer, intent(in), optional :: deriv

    derivative in rho

    Return Value real(kind=wp)

    n-th derivative of a radial profile with respect to rho ~sqrt(magnetic flux).

procedure, private :: rProfile_drho2

  • public function rProfile_drho2(sf, rho) result(derivative)

    evaluate the 2nd derivative of a radial profile with respect to rho ~sqrt(magnetic flux).

    Arguments

    Type IntentOptional Attributes Name
    class(c_rProfile) :: sf

    self

    real(kind=wp), intent(in) :: rho

    rho position rho ~sqrt(magnetic flux)

    Return Value real(kind=wp)

    2nd derivative of a radial profile with respect to rho ~sqrt(magnetic flux).

procedure, private :: rProfile_drho3

  • public function rProfile_drho3(sf, rho) result(derivative)

    evaluate the 3rd derivative of a radial profile with respect to rho ~sqrt(magnetic flux).

    Arguments

    Type IntentOptional Attributes Name
    class(c_rProfile) :: sf

    self

    real(kind=wp), intent(in) :: rho

    rho position rho ~sqrt(magnetic flux)

    Return Value real(kind=wp)

    3rd derivative of a radial profile with respect to rho ~sqrt(magnetic flux)

procedure, private :: rProfile_drho4

  • public function rProfile_drho4(sf, rho) result(derivative)

    evaluate the 4th derivative of a radial profile with respect to rho ~sqrt(magnetic flux)

    Arguments

    Type IntentOptional Attributes Name
    class(c_rProfile) :: sf

    self

    real(kind=wp), intent(in) :: rho

    rho position rho ~sqrt(magnetic flux)

    Return Value real(kind=wp)

    4th derivative of a radial profile with respect to rho ~sqrt(magnetic flux).

Source Code

  TYPE, ABSTRACT :: c_rProfile
      INTEGER               :: n_coefs
      REAL(wp), ALLOCATABLE :: coefs(:)

      contains

      PROCEDURE(i_fun_eval_at_rho2), DEFERRED :: eval_at_rho2
      PROCEDURE(i_fun_antiderivative), DEFERRED :: antiderivative

      PROCEDURE :: eval_at_rho => rProfile_eval_at_rho
      ! hard coded derivatives with respect to rho=sqrt(phi/phi_edge)
      PROCEDURE, PRIVATE :: rProfile_drho2
      PROCEDURE, PRIVATE :: rProfile_drho3
      PROCEDURE, PRIVATE :: rProfile_drho4

  end type c_rProfile