| 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 |
|
| integer, | public | :: | n_max | = | 0 |
maximum number of toroidal modes needed to describe hmap. Used for estimating the number of integration points. |
|
| logical, | public | :: | initialized | = | .FALSE. |
initialize the type hmap_RZ, no additional readin from parameterfile needed.
self
finalize the type hmap_RZ
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(t_hmap_RZ), | intent(inout) | :: | sf |
self |
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) , 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) 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) 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.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 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), 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 , 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 |
evaluate all metrics necesseray for optimizer
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_RZ), | 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 |
evaluate the mapping h (X^1,X^2,zeta) -> (x,y,z) cartesian
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_RZ), | intent(in) | :: | sf | |||
| real(kind=wp), | intent(in) | :: | q_in(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) ,
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_RZ), | intent(in) | :: | sf | |||
| real(kind=wp), | intent(in) | :: | q_in(3) | |||
| real(kind=wp), | intent(in) | :: | q_vec(3) |
evaluate Jacobian of mapping h: J_h=sqrt(det(G)) at q=(X^1,X^2,zeta)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_RZ), | intent(in) | :: | sf | |||
| real(kind=wp), | intent(in) | :: | q_in(3) |
evaluate derivative of Jacobian of mapping h: sum q_vec^k * dJ_h/dq^k, k=1,2,3 at q=(X^1,X^2,zeta)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_RZ), | intent(in) | :: | sf | |||
| real(kind=wp), | intent(in) | :: | q_in(3) | |||
| real(kind=wp), | intent(in) | :: | q_vec(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
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_RZ), | 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_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
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_RZ), | 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 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(t_hmap_RZ), | 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 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(t_hmap_RZ), | 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) |
TYPE,EXTENDS(c_hmap) :: t_hmap_RZ !--------------------------------------------------------------------------------------------------------------------------------- LOGICAL :: initialized=.FALSE. !--------------------------------------------------------------------------------------------------------------------------------- ! parameters for hmap_RZ: !--------------------------------------------------------------------------------------------------------------------------------- CONTAINS FINAL :: hmap_RZ_free PROCEDURE :: eval_all => hmap_RZ_eval_all PROCEDURE :: eval => hmap_RZ_eval PROCEDURE :: eval_dxdq => hmap_RZ_eval_dxdq PROCEDURE :: eval_Jh => hmap_RZ_eval_Jh PROCEDURE :: eval_Jh_dq => hmap_RZ_eval_Jh_dq PROCEDURE :: eval_gij => hmap_RZ_eval_gij PROCEDURE :: eval_gij_dq => hmap_RZ_eval_gij_dq PROCEDURE :: get_dx_dqi => hmap_RZ_get_dx_dqi PROCEDURE :: get_ddx_dqij => hmap_RZ_get_ddx_dqij !--------------------------------------------------------------------------------------------------------------------------------- END TYPE t_hmap_RZ