| 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 |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(c_hmap), | intent(in) | :: | sf | |||
| integer, | intent(in) | :: | ndims(3) | |||
| integer, | intent(in) | :: | dim_zeta | |||
| class(c_hmap_auxvar), | intent(in) | :: | xv(ndims(dim_zeta)) | |||
| 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 |
evaluate the mapping h q=(X^1,X^2,zeta) -> (x,y,z)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(c_hmap), | intent(in) | :: | sf | |||
| real(kind=wp), | intent(in) | :: | q_in(3) |
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
| Type | Intent | Optional | 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 |
call %eval_aux on 1d array of points of size np, using auxiliary variable array of same size
| Type | Intent | Optional | 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) |
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) ,
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(c_hmap), | intent(in) | :: | sf | |||
| real(kind=wp), | intent(in) | :: | q_in(3) | |||
| real(kind=wp), | intent(in) | :: | q_vec(3) |
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
| Type | Intent | Optional | 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 |
call %eval_dxdq_aux on 1d array of points of size np, using auxiliary variable array of same size
| Type | Intent | Optional | 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) |
evaluate Jacobian of mapping h: J_h=sqrt(det(G)) at q=(X^1,X^2,zeta)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(c_hmap), | intent(in) | :: | sf | |||
| real(kind=wp), | intent(in) | :: | q_in(3) |
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
| Type | Intent | Optional | 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 |
call %eval_Jh_aux on 1d array of points of size np, using auxiliary variable array of same size
| Type | Intent | Optional | 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) |
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)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(c_hmap), | intent(in) | :: | sf | |||
| real(kind=wp), | intent(in) | :: | q_in(3) | |||
| real(kind=wp), | intent(in) | :: | q_vec(3) |
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
| Type | Intent | Optional | 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 |
call %eval_Jh_dq1_aux on 1d array of points of size np, using auxiliary variable array of same size
| Type | Intent | Optional | 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) |
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 of ds and dtheta and 1 for dzeta
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(c_hmap), | 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) |
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
| Type | Intent | Optional | 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 |
| Type | Intent | Optional | 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) |
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 dzeta_dalpha then known to be either 0 of ds and dtheta and 1 for dzeta
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(c_hmap), | 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) |
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
| Type | Intent | Optional | 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 |
| Type | Intent | Optional | 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) |
evaluate all first derivatives dx(1:3)/dq^i, i=1,2,3 , at q_in=(X^1,X^2,zeta),
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(c_hmap), | intent(in) | :: | sf | |||
| real(kind=wp), | intent(in) | :: | q_in(3) | |||
| real(kind=wp), | intent(out) | :: | dx_dq1(3) | |||
| real(kind=wp), | intent(out) | :: | dx_dq2(3) | |||
| real(kind=wp), | intent(out) | :: | dx_dq3(3) |
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
| Type | Intent | Optional | 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 |
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),
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(c_hmap), | intent(in) | :: | sf | |||
| real(kind=wp), | intent(in) | :: | q_in(3) | |||
| real(kind=wp), | intent(out) | :: | ddx_dq11(3) | |||
| real(kind=wp), | intent(out) | :: | ddx_dq12(3) | |||
| real(kind=wp), | intent(out) | :: | ddx_dq13(3) | |||
| real(kind=wp), | intent(out) | :: | ddx_dq22(3) | |||
| real(kind=wp), | intent(out) | :: | ddx_dq23(3) | |||
| real(kind=wp), | intent(out) | :: | ddx_dq33(3) |
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
| Type | Intent | Optional | 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 |
TYPE, ABSTRACT :: c_hmap !--------------------------------------------------------------------------------------------------------------------------------- !input parameters INTEGER :: which_hmap !! points to hmap (1: MHD3D) INTEGER :: nfp=-1 !! number of field periods used in hmap. If =-1, its not used !--------------------------------------------------------------------------------------------------------------------------------- CONTAINS PROCEDURE(i_sub_hmap_eval_all ),DEFERRED :: eval_all ! eval?? is a generic name and can be called in three different ways, depending on the arguments : ! eval??_pw: pointwise evaluation, without precomputed auxiliary variables (slow) ! eval??_aux: pointwise evaluation, with precomputed auxiliary variables (fast) ! eval??_aux_all: evaluation on 1d array of points, with array of precomputed auxiliary variables (fast, with omp parallel loop) !%eval PROCEDURE(i_fun_hmap_eval ),DEFERRED :: eval PROCEDURE :: eval_aux => hmap_eval_aux PROCEDURE :: eval_aux_all => hmap_eval_aux_all !%eval_dxdq PROCEDURE(i_fun_hmap_eval_dxdq ),DEFERRED :: eval_dxdq PROCEDURE :: eval_dxdq_aux => hmap_eval_dxdq_aux PROCEDURE :: eval_dxdq_aux_all => hmap_eval_dxdq_aux_all !%eval_Jh PROCEDURE(i_fun_hmap_eval_Jh ),DEFERRED :: eval_Jh PROCEDURE :: eval_Jh_aux => hmap_eval_Jh_aux PROCEDURE :: eval_Jh_aux_all => hmap_eval_Jh_aux_all !eval_Jh_dq1 PROCEDURE(i_fun_hmap_eval_Jh_dq ),DEFERRED :: eval_Jh_dq PROCEDURE :: eval_Jh_dq_aux => hmap_eval_Jh_dq_aux PROCEDURE :: eval_Jh_dq_aux_all => hmap_eval_Jh_dq_aux_all !eval_gij PROCEDURE(i_fun_hmap_eval_gij ),DEFERRED :: eval_gij PROCEDURE :: eval_gij_aux => hmap_eval_gij_aux PROCEDURE :: eval_gij_aux_all => hmap_eval_gij_aux_all !eval_gij_dq1 PROCEDURE(i_fun_hmap_eval_gij_dq),DEFERRED :: eval_gij_dq PROCEDURE :: eval_gij_dq_aux => hmap_eval_gij_dq_aux PROCEDURE :: eval_gij_dq_aux_all => hmap_eval_gij_dq_aux_all PROCEDURE(i_sub_hmap_get_dx_dqi) ,DEFERRED :: get_dx_dqi PROCEDURE :: get_dx_dqi_aux => hmap_get_dx_dqi_aux PROCEDURE(i_sub_hmap_get_ddx_dqij),DEFERRED:: get_ddx_dqij PROCEDURE :: get_ddx_dqij_aux => hmap_get_ddx_dqij_aux !--------------------------------------------------------------------------------------------------------------------------------- END TYPE c_hmap