t_hmap_knot Derived Type

type, public, extends(c_hmap) :: t_hmap_knot


Inherits

type~~t_hmap_knot~~InheritsGraph type~t_hmap_knot t_hmap_knot type~c_hmap c_hmap type~t_hmap_knot->type~c_hmap

Components

Type Visibility Attributes Name Initial
integer, public :: which_hmap

points to hmap (1: MHD3D)

integer, public :: nfp = -1

number of field periods used in hmap. If =-1, its not used

logical, public :: initialized = .FALSE.
real(kind=wp), public :: k
real(kind=wp), public :: l
real(kind=wp), public :: R0
real(kind=wp), public :: delta

Constructor

public interface t_hmap_knot

  • public function hmap_knot_init() result(sf)

    initialize the type hmap_knot, reading from parameter file and then call init_params

    Arguments

    None

    Return Value type(t_hmap_knot)

    self

  • public function hmap_knot_init_params(knot_kl, knot_R0, knot_delta) result(sf)

    initialize the type hmap_knot, from given parameters as arguments

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: knot_kl(1:2)
    real(kind=wp), intent(in) :: knot_R0
    real(kind=wp), intent(in) :: knot_delta

    Return Value type(t_hmap_knot)

    self


Finalization Procedures

final :: hmap_knot_free

  • public subroutine hmap_knot_free(sf)

    finalize the type hmap_knot

    Arguments

    Type IntentOptional Attributes Name
    type(t_hmap_knot), intent(inout) :: sf

    self


Type-Bound Procedures

procedure, public :: eval_aux => hmap_eval_aux

  • public function hmap_eval_aux(sf, q1, q2, xv) result(x_out)

    evaluate the mapping h (X^1,X^2,zeta) -> (x,y,z) cartesian INFO: default routine that can be overwritten by specific hmap class, not using additional hmap-dependent auxiliary variables, but calling the pointwise routine eval

    Arguments

    Type IntentOptional Attributes Name
    class(c_hmap), intent(in) :: sf
    real(kind=wp), intent(in) :: q1
    real(kind=wp), intent(in) :: q2
    class(c_hmap_auxvar), intent(in) :: xv

    Return Value real(kind=wp), (3)

procedure, public :: eval_aux_all => hmap_eval_aux_all

  • public function hmap_eval_aux_all(sf, np, q1_in, q2_in, xv) result(xyz)

    call %eval_aux on 1d array of points of size np, using auxiliary variable array of same size

    Arguments

    Type IntentOptional Attributes Name
    class(c_hmap), intent(in) :: sf
    integer, intent(in) :: np
    real(kind=wp), intent(in) :: q1_in(1:np)
    real(kind=wp), intent(in) :: q2_in(1:np)
    class(c_hmap_auxvar), intent(in) :: xv(1:np)

    Return Value real(kind=wp), (1:3,1:np)

procedure, public :: eval_dxdq_aux => hmap_eval_dxdq_aux

  • public function hmap_eval_dxdq_aux(sf, q1, q2, q1_vec, q2_vec, q3_vec, xv) result(dxdq_qvec)

    evaluate total derivative of the mapping sum k=1,3 (dx(1:3)/dq^k) q_vec^k, where dx(1:3)/dq^k, k=1,2,3 is evaluated at q_in=(X^1,X^2,zeta) , INFO: default routine that can be overwritten by specific hmap class, not using additional hmap-dependent auxiliary variables, but calling the generic routine eval_dxdq_pw

    Arguments

    Type IntentOptional Attributes Name
    class(c_hmap), intent(in) :: sf
    real(kind=wp), intent(in) :: q1
    real(kind=wp), intent(in) :: q2
    real(kind=wp), intent(in) :: q1_vec
    real(kind=wp), intent(in) :: q2_vec
    real(kind=wp), intent(in) :: q3_vec
    class(c_hmap_auxvar), intent(in) :: xv

    Return Value real(kind=wp), (3)

procedure, public :: eval_dxdq_aux_all => hmap_eval_dxdq_aux_all

  • public function hmap_eval_dxdq_aux_all(sf, np, q1, q2, q1_vec, q2_vec, q3_vec, xv) result(dxdq_qvec)

    call %eval_dxdq_aux on 1d array of points of size np, using auxiliary variable array of same size

    Arguments

    Type IntentOptional Attributes Name
    class(c_hmap), intent(in) :: sf
    integer, intent(in) :: np
    real(kind=wp), intent(in) :: q1(1:np)
    real(kind=wp), intent(in) :: q2(1:np)
    real(kind=wp), intent(in) :: q1_vec(1:np)
    real(kind=wp), intent(in) :: q2_vec(1:np)
    real(kind=wp), intent(in) :: q3_vec(1:np)
    class(c_hmap_auxvar), intent(in) :: xv(1:np)

    Return Value real(kind=wp), (1:3,1:np)

procedure, public :: eval_Jh_aux => hmap_eval_Jh_aux

  • public function hmap_eval_Jh_aux(sf, q1, q2, xv) result(Jh)

    evaluate Jacobian of mapping h: J_h=sqrt(det(G)) at q=(X^1,X^2,zeta) INFO: default routine that can be overwritten by specific hmap class, not using additional hmap-dependent auxiliary variables, but calling the pointwise routine eval_Jh

    Arguments

    Type IntentOptional Attributes Name
    class(c_hmap), intent(in) :: sf
    real(kind=wp), intent(in) :: q1
    real(kind=wp), intent(in) :: q2
    class(c_hmap_auxvar), intent(in) :: xv

    Return Value real(kind=wp)

procedure, public :: eval_Jh_aux_all => hmap_eval_Jh_aux_all

  • public function hmap_eval_Jh_aux_all(sf, np, q1, q2, xv) result(Jh)

    call %eval_Jh_aux on 1d array of points of size np, using auxiliary variable array of same size

    Arguments

    Type IntentOptional Attributes Name
    class(c_hmap), intent(in) :: sf
    integer, intent(in) :: np
    real(kind=wp), intent(in) :: q1(1:np)
    real(kind=wp), intent(in) :: q2(1:np)
    class(c_hmap_auxvar), intent(in) :: xv(1:np)

    Return Value real(kind=wp), (1:np)

procedure, public :: eval_Jh_dq_aux => hmap_eval_Jh_dq_aux

  • public function hmap_eval_Jh_dq_aux(sf, q1, q2, q1_vec, q2_vec, q3_vec, xv) result(Jh_dq)

    evaluate derivative of Jacobian of mapping h: sum_k dJ_h(q)/dq^k q_vec^k, k=1,2 at q=(X^1,X^2,zeta) INFO: default routine that can be overwritten by specific hmap class, not using additional hmap-dependent auxiliary variables, but calling the pointwise routine eval_Jh_dq

    Arguments

    Type IntentOptional Attributes Name
    class(c_hmap), intent(in) :: sf
    real(kind=wp), intent(in) :: q1
    real(kind=wp), intent(in) :: q2
    real(kind=wp), intent(in) :: q1_vec
    real(kind=wp), intent(in) :: q2_vec
    real(kind=wp), intent(in) :: q3_vec
    class(c_hmap_auxvar), intent(in) :: xv

    Return Value real(kind=wp)

procedure, public :: eval_Jh_dq_aux_all => hmap_eval_Jh_dq_aux_all

  • public function hmap_eval_Jh_dq_aux_all(sf, np, q1, q2, q1_vec, q2_vec, q3_vec, xv) result(Jh_dq)

    call %eval_Jh_dq1_aux on 1d array of points of size np, using auxiliary variable array of same size

    Arguments

    Type IntentOptional Attributes Name
    class(c_hmap), intent(in) :: sf
    integer, intent(in) :: np
    real(kind=wp), intent(in) :: q1(1:np)
    real(kind=wp), intent(in) :: q2(1:np)
    real(kind=wp), intent(in) :: q1_vec(1:np)
    real(kind=wp), intent(in) :: q2_vec(1:np)
    real(kind=wp), intent(in) :: q3_vec(1:np)
    class(c_hmap_auxvar), intent(in) :: xv(1:np)

    Return Value real(kind=wp), (1:np)

procedure, public :: eval_gij_aux => hmap_eval_gij_aux

  • public function hmap_eval_gij_aux(sf, qL1, qL2, qL3, q1, q2, qR1, qR2, qR3, xv) result(g_ab)

    evaluate sum_ij (qL_i (G_ij(q_G)) qR_j) ,, where qL=(dX^1/dalpha,dX^2/dalpha ,dzeta/dalpha) and qR=(dX^1/dbeta,dX^2/dbeta ,dzeta/dbeta) and dzeta_dalpha then known to be either 0.0 for ds and dtheta and 1.0 for dzeta INFO: default routine that can be overwritten by specific hmap class, not using additional hmap-dependent auxiliary variables, but calling the pointwise routine eval_gij

    Arguments

    Type IntentOptional Attributes Name
    class(c_hmap), intent(in) :: sf
    real(kind=wp), intent(in) :: qL1
    real(kind=wp), intent(in) :: qL2
    real(kind=wp), intent(in) :: qL3
    real(kind=wp), intent(in) :: q1
    real(kind=wp), intent(in) :: q2
    real(kind=wp), intent(in) :: qR1
    real(kind=wp), intent(in) :: qR2
    real(kind=wp), intent(in) :: qR3
    class(c_hmap_auxvar), intent(in) :: xv

    Return Value real(kind=wp)

procedure, public :: eval_gij_aux_all => hmap_eval_gij_aux_all

  • public function hmap_eval_gij_aux_all(sf, np, qL1, qL2, qL3, q1, q2, qR1, qR2, qR3, xv) result(g_ab)

    Arguments

    Type IntentOptional Attributes Name
    class(c_hmap), intent(in) :: sf
    integer, intent(in) :: np
    real(kind=wp), intent(in) :: qL1(1:np)
    real(kind=wp), intent(in) :: qL2(1:np)
    real(kind=wp), intent(in) :: qL3(1:np)
    real(kind=wp), intent(in) :: q1(1:np)
    real(kind=wp), intent(in) :: q2(1:np)
    real(kind=wp), intent(in) :: qR1(1:np)
    real(kind=wp), intent(in) :: qR2(1:np)
    real(kind=wp), intent(in) :: qR3(1:np)
    class(c_hmap_auxvar), intent(in) :: xv(1:np)

    Return Value real(kind=wp), (1:np)

procedure, public :: eval_gij_dq_aux => hmap_eval_gij_dq_aux

  • public function hmap_eval_gij_dq_aux(sf, qL1, qL2, qL3, q1, q2, qR1, qR2, qR3, q1_vec, q2_vec, q3_vec, xv) result(g_ab_dq)

    evaluate sum_k sum_ij (qL_i d/dq^k(G_ij(q_G)) qR_j) q_vec^k, k=1,2,3 where qL=(dX^1/dalpha,dX^2/dalpha [,dzeta/dalpha]) and qR=(dX^1/dbeta,dX^2/dbeta [,dzeta/dbeta]) and where qL=(dX^1/dalpha,dX^2/dalpha ,dzeta/dalpha) and qR=(dX^1/dbeta,dX^2/dbeta ,dzeta/dbeta) and dzeta_dalpha then known to be either 0.0 for ds and dtheta and 1.0 for dzeta INFO: default routine that can be overwritten by specific hmap class, not using additional hmap-dependent auxiliary variables, but calling the pointwise routine eval_gij_dq

    Arguments

    Type IntentOptional Attributes Name
    class(c_hmap), intent(in) :: sf
    real(kind=wp), intent(in) :: qL1
    real(kind=wp), intent(in) :: qL2
    real(kind=wp), intent(in) :: qL3
    real(kind=wp), intent(in) :: q1
    real(kind=wp), intent(in) :: q2
    real(kind=wp), intent(in) :: qR1
    real(kind=wp), intent(in) :: qR2
    real(kind=wp), intent(in) :: qR3
    real(kind=wp), intent(in) :: q1_vec
    real(kind=wp), intent(in) :: q2_vec
    real(kind=wp), intent(in) :: q3_vec
    class(c_hmap_auxvar), intent(in) :: xv

    Return Value real(kind=wp)

procedure, public :: eval_gij_dq_aux_all => hmap_eval_gij_dq_aux_all

  • public function hmap_eval_gij_dq_aux_all(sf, np, qL1, qL2, qL3, q1, q2, qR1, qR2, qR3, q1_vec, q2_vec, q3_vec, xv) result(g_ab_dq)

    Arguments

    Type IntentOptional Attributes Name
    class(c_hmap), intent(in) :: sf
    integer, intent(in) :: np
    real(kind=wp), intent(in) :: qL1(1:np)
    real(kind=wp), intent(in) :: qL2(1:np)
    real(kind=wp), intent(in) :: qL3(1:np)
    real(kind=wp), intent(in) :: q1(1:np)
    real(kind=wp), intent(in) :: q2(1:np)
    real(kind=wp), intent(in) :: qR1(1:np)
    real(kind=wp), intent(in) :: qR2(1:np)
    real(kind=wp), intent(in) :: qR3(1:np)
    real(kind=wp), intent(in) :: q1_vec(1:np)
    real(kind=wp), intent(in) :: q2_vec(1:np)
    real(kind=wp), intent(in) :: q3_vec(1:np)
    class(c_hmap_auxvar), intent(in) :: xv(1:np)

    Return Value real(kind=wp), (1:np)

procedure, public :: get_dx_dqi_aux => hmap_get_dx_dqi_aux

  • public subroutine hmap_get_dx_dqi_aux(sf, q1, q2, xv, dx_dq1, dx_dq2, dx_dq3)

    evaluate all first derivatives dx(1:3)/dq^i, i=1,2,3 , at q_in=(X^1,X^2,zeta), INFO: default routine that can be overwritten by specific hmap class, not using additional hmap-dependent auxiliary variables, but calling the generic routine get_dx_dqi

    Arguments

    Type IntentOptional Attributes Name
    class(c_hmap), intent(in) :: sf
    real(kind=wp), intent(in) :: q1
    real(kind=wp), intent(in) :: q2
    class(c_hmap_auxvar), intent(in) :: xv
    real(kind=wp), intent(out), DIMENSION(3) :: dx_dq1
    real(kind=wp), intent(out), DIMENSION(3) :: dx_dq2
    real(kind=wp), intent(out), DIMENSION(3) :: dx_dq3

procedure, public :: get_ddx_dqij_aux => hmap_get_ddx_dqij_aux

  • public subroutine hmap_get_ddx_dqij_aux(sf, q1, q2, xv, ddx_dq11, ddx_dq12, ddx_dq13, ddx_dq22, ddx_dq23, ddx_dq33)

    evaluate all second derivatives d^2x(1:3)/(dq^i dq^j), i,j=1,2,3 , at q_in=(X^1,X^2,zeta), INFO: default routine that can be overwritten by specific hmap class, not using additional hmap-dependent auxiliary variables, but calling the generic routine get_ddx_dqij

    Arguments

    Type IntentOptional Attributes Name
    class(c_hmap), intent(in) :: sf
    real(kind=wp), intent(in) :: q1
    real(kind=wp), intent(in) :: q2
    class(c_hmap_auxvar), intent(in) :: xv
    real(kind=wp), intent(out), DIMENSION(3) :: ddx_dq11
    real(kind=wp), intent(out), DIMENSION(3) :: ddx_dq12
    real(kind=wp), intent(out), DIMENSION(3) :: ddx_dq13
    real(kind=wp), intent(out), DIMENSION(3) :: ddx_dq22
    real(kind=wp), intent(out), DIMENSION(3) :: ddx_dq23
    real(kind=wp), intent(out), DIMENSION(3) :: ddx_dq33

procedure, public :: eval_all => hmap_knot_eval_all

  • public subroutine hmap_knot_eval_all(sf, ndims, dim_zeta, xv, q1, q2, dX1_dt, dX2_dt, dX1_dz, dX2_dz, Jh, g_tt, g_tz, g_zz, Jh_dq1, g_tt_dq1, g_tz_dq1, g_zz_dq1, Jh_dq2, g_tt_dq2, g_tz_dq2, g_zz_dq2, g_t1, g_t2, g_z1, g_z2, Gh11, Gh22)

    evaluate all metrics necesseray for optimizer

    Arguments

    Type IntentOptional Attributes Name
    class(t_hmap_knot), intent(in) :: sf
    integer, intent(in) :: ndims(3)

    3D dimensions of input arrays

    integer, intent(in) :: dim_zeta

    which dimension is zeta dependent

    class(c_hmap_auxvar), intent(in) :: xv(ndims(dim_zeta))

    zeta point positions

    real(kind=wp), intent(in), DIMENSION(ndims(1),ndims(2),ndims(3)) :: q1
    real(kind=wp), intent(in), DIMENSION(ndims(1),ndims(2),ndims(3)) :: q2
    real(kind=wp), intent(in), DIMENSION(ndims(1),ndims(2),ndims(3)) :: dX1_dt
    real(kind=wp), intent(in), DIMENSION(ndims(1),ndims(2),ndims(3)) :: dX2_dt
    real(kind=wp), intent(in), DIMENSION(ndims(1),ndims(2),ndims(3)) :: dX1_dz
    real(kind=wp), intent(in), DIMENSION(ndims(1),ndims(2),ndims(3)) :: dX2_dz
    real(kind=wp), intent(out), DIMENSION(ndims(1),ndims(2),ndims(3)) :: Jh
    real(kind=wp), intent(out), DIMENSION(ndims(1),ndims(2),ndims(3)) :: g_tt
    real(kind=wp), intent(out), DIMENSION(ndims(1),ndims(2),ndims(3)) :: g_tz
    real(kind=wp), intent(out), DIMENSION(ndims(1),ndims(2),ndims(3)) :: g_zz
    real(kind=wp), intent(out), DIMENSION(ndims(1),ndims(2),ndims(3)) :: Jh_dq1
    real(kind=wp), intent(out), DIMENSION(ndims(1),ndims(2),ndims(3)) :: g_tt_dq1
    real(kind=wp), intent(out), DIMENSION(ndims(1),ndims(2),ndims(3)) :: g_tz_dq1
    real(kind=wp), intent(out), DIMENSION(ndims(1),ndims(2),ndims(3)) :: g_zz_dq1
    real(kind=wp), intent(out), DIMENSION(ndims(1),ndims(2),ndims(3)) :: Jh_dq2
    real(kind=wp), intent(out), DIMENSION(ndims(1),ndims(2),ndims(3)) :: g_tt_dq2
    real(kind=wp), intent(out), DIMENSION(ndims(1),ndims(2),ndims(3)) :: g_tz_dq2
    real(kind=wp), intent(out), DIMENSION(ndims(1),ndims(2),ndims(3)) :: g_zz_dq2
    real(kind=wp), intent(out), DIMENSION(ndims(1),ndims(2),ndims(3)) :: g_t1
    real(kind=wp), intent(out), DIMENSION(ndims(1),ndims(2),ndims(3)) :: g_t2
    real(kind=wp), intent(out), DIMENSION(ndims(1),ndims(2),ndims(3)) :: g_z1
    real(kind=wp), intent(out), DIMENSION(ndims(1),ndims(2),ndims(3)) :: g_z2
    real(kind=wp), intent(out), DIMENSION(ndims(1),ndims(2),ndims(3)) :: Gh11
    real(kind=wp), intent(out), DIMENSION(ndims(1),ndims(2),ndims(3)) :: Gh22

procedure, public :: eval => hmap_knot_eval

  • public function hmap_knot_eval(sf, q_in) result(x_out)

    evaluate the mapping h (q1,q2,zeta) -> (x,y,z)

    Arguments

    Type IntentOptional Attributes Name
    class(t_hmap_knot), intent(in) :: sf
    real(kind=wp), intent(in) :: q_in(3)

    Return Value real(kind=wp), (3)

procedure, public :: eval_dxdq => hmap_knot_eval_dxdq

  • public function hmap_knot_eval_dxdq(sf, q_in, q_vec) result(dxdq_qvec)

    evaluate total derivative of the mapping sum k=1,3 (dx(1:3)/dq^k) q_vec^k, where dx(1:3)/dq^k, k=1,2,3 is evaluated at q_in=(X^1,X^2,zeta) ,

    Arguments

    Type IntentOptional Attributes Name
    class(t_hmap_knot), intent(in) :: sf
    real(kind=wp), intent(in) :: q_in(3)
    real(kind=wp), intent(in) :: q_vec(3)

    Return Value real(kind=wp), (3)

procedure, public :: eval_Jh => hmap_knot_eval_Jh

  • public function hmap_knot_eval_Jh(sf, q_in) result(Jh)

    evaluate Jacobian of mapping h: J_h=sqrt(det(G)) at q=(q^1,q^2,zeta)

    Arguments

    Type IntentOptional Attributes Name
    class(t_hmap_knot), intent(in) :: sf
    real(kind=wp), intent(in) :: q_in(3)

    Return Value real(kind=wp)

procedure, public :: eval_Jh_dq => hmap_knot_eval_Jh_dq

  • public function hmap_knot_eval_Jh_dq(sf, q_in, q_vec) result(Jh_dq)

    evaluate derivative of Jacobian of mapping h: sum_k q_vec^k * dJ_h/dq^k, k=1,2,3 at q=(q^1,q^2,zeta)

    Arguments

    Type IntentOptional Attributes Name
    class(t_hmap_knot), intent(in) :: sf
    real(kind=wp), intent(in) :: q_in(3)
    real(kind=wp), intent(in) :: q_vec(3)

    Return Value real(kind=wp)

procedure, public :: eval_gij => hmap_knot_eval_gij

  • public function hmap_knot_eval_gij(sf, qL_in, q_G, qR_in) result(g_ab)

    evaluate sum_ij (qL_i (G_ij(q_G)) qR_j) ,, where qL=(dX^1/dalpha,dX^2/dalpha ,dzeta/dalpha) and qR=(dX^1/dbeta,dX^2/dbeta ,dzeta/dbeta) and dzeta_dalpha then known to be either 0.0 for ds and dtheta and 1.0 for dzeta

    Arguments

    Type IntentOptional Attributes Name
    class(t_hmap_knot), intent(in) :: sf
    real(kind=wp), intent(in) :: qL_in(3)
    real(kind=wp), intent(in) :: q_G(3)
    real(kind=wp), intent(in) :: qR_in(3)

    Return Value real(kind=wp)

procedure, public :: eval_gij_dq => hmap_knot_eval_gij_dq

  • public function hmap_knot_eval_gij_dq(sf, qL_in, q_G, qR_in, q_vec) result(g_ab_dq)

    evaluate sum_k sum_ij (qL_i d/dq^k(G_ij(q_G)) qR_j) *q_vec^k, k=1,2,3 where qL=(dX^1/dalpha,dX^2/dalpha [,dzeta/dalpha]) and qR=(dX^1/dbeta,dX^2/dbeta [,dzeta/dbeta]) and where qL=(dX^1/dalpha,dX^2/dalpha ,dzeta/dalpha) and qR=(dX^1/dbeta,dX^2/dbeta ,dzeta/dbeta) and dzeta_dalpha then known to be either 0.0 for ds and dtheta and 1.0 for dzeta

    Arguments

    Type IntentOptional Attributes Name
    class(t_hmap_knot), intent(in) :: sf
    real(kind=wp), intent(in) :: qL_in(3)
    real(kind=wp), intent(in) :: q_G(3)
    real(kind=wp), intent(in) :: qR_in(3)
    real(kind=wp), intent(in) :: q_vec(3)

    Return Value real(kind=wp)

procedure, public :: get_dx_dqi => hmap_knot_get_dx_dqi

  • public subroutine hmap_knot_get_dx_dqi(sf, q_in, dx_dq1, dx_dq2, dx_dq3)

    evaluate all first derivatives dx(1:3)/dq^i, i=1,2,3 , at q_in=(X^1,X^2,zeta),

    Arguments

    Type IntentOptional Attributes Name
    class(t_hmap_knot), intent(in) :: sf
    real(kind=wp), intent(in) :: q_in(3)
    real(kind=wp), intent(out), DIMENSION(3) :: dx_dq1
    real(kind=wp), intent(out), DIMENSION(3) :: dx_dq2
    real(kind=wp), intent(out), DIMENSION(3) :: dx_dq3

procedure, public :: get_ddx_dqij => hmap_knot_get_ddx_dqij

  • public subroutine hmap_knot_get_ddx_dqij(sf, q_in, ddx_dq11, ddx_dq12, ddx_dq13, ddx_dq22, ddx_dq23, ddx_dq33)

    evaluate all second derivatives d^2x(1:3)/(dq^i dq^j), i,j=1,2,3 is evaluated at q_in=(X^1,X^2,zeta),

    Arguments

    Type IntentOptional Attributes Name
    class(t_hmap_knot), intent(in) :: sf
    real(kind=wp), intent(in) :: q_in(3)
    real(kind=wp), intent(out), DIMENSION(3) :: ddx_dq11
    real(kind=wp), intent(out), DIMENSION(3) :: ddx_dq12
    real(kind=wp), intent(out), DIMENSION(3) :: ddx_dq13
    real(kind=wp), intent(out), DIMENSION(3) :: ddx_dq22
    real(kind=wp), intent(out), DIMENSION(3) :: ddx_dq23
    real(kind=wp), intent(out), DIMENSION(3) :: ddx_dq33

procedure, public :: Rl => hmap_knot_eval_Rl

  • public pure function hmap_knot_eval_Rl(sf, q_in) result(Rl_out)

    evaluate the effective major radius coordinate Rl(q)

    Arguments

    Type IntentOptional Attributes Name
    class(t_hmap_knot), intent(in) :: sf
    real(kind=wp), intent(in) :: q_in(3)

    Return Value real(kind=wp)

procedure, public :: Zl => hmap_knot_eval_Zl

  • public pure function hmap_knot_eval_Zl(sf, q_in) result(Zl_out)

    evaluate the effective vertical coordinate Zl(q)

    Arguments

    Type IntentOptional Attributes Name
    class(t_hmap_knot), intent(in) :: sf
    real(kind=wp), intent(in) :: q_in(3)

    Return Value real(kind=wp)

Source Code

TYPE,EXTENDS(c_hmap) :: t_hmap_knot
  !---------------------------------------------------------------------------------------------------------------------------------
  LOGICAL  :: initialized=.FALSE.
  !---------------------------------------------------------------------------------------------------------------------------------
  ! parameters for hmap_knot:
  REAL(wp) :: k,  l    ! this map is based on the (k,l)-torus
  REAL(wp) :: R0       ! major radius
  REAL(wp) :: delta    ! shift of the axis
  !---------------------------------------------------------------------------------------------------------------------------------
  CONTAINS

  FINAL     :: hmap_knot_free
  PROCEDURE :: eval_all         => hmap_knot_eval_all
  PROCEDURE :: eval             => hmap_knot_eval
  PROCEDURE :: eval_dxdq        => hmap_knot_eval_dxdq
  PROCEDURE :: eval_Jh          => hmap_knot_eval_Jh
  PROCEDURE :: eval_Jh_dq       => hmap_knot_eval_Jh_dq
  PROCEDURE :: eval_gij         => hmap_knot_eval_gij
  PROCEDURE :: eval_gij_dq      => hmap_knot_eval_gij_dq
  PROCEDURE :: get_dx_dqi       => hmap_knot_get_dx_dqi
  PROCEDURE :: get_ddx_dqij     => hmap_knot_get_ddx_dqij
  !---------------------------------------------------------------------------------------------------------------------------------
  ! procedures for hmap_knot:
  PROCEDURE :: Rl            => hmap_knot_eval_Rl
  PROCEDURE :: Zl            => hmap_knot_eval_Zl
  !---------------------------------------------------------------------------------------------------------------------------------
END TYPE t_hmap_knot