contains the type that points to the routines of one chosen hmap_cyl
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | public | :: | test_called | = | .FALSE. |
initialize the type hmap_cyl, reading from parameterfile and then call init_params
self
initialize the type hmap_cyl, given the parameters as arguments
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | cyl_len |
total length of cylinder |
self
Allocate and initialize auxiliary variable at zeta position.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_cyl), | intent(in) | :: | sf | |||
| real(kind=wp), | intent(in) | :: | zeta | |||
| logical, | intent(in) | :: | do_2nd_der |
compute second derivative and store second derivative terms |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=wp), | public | :: | zeta | ||||
| logical, | public | :: | do_2nd_der |
| public function hmap_cyl_init_aux (sf, zeta, do_2nd_der) | Allocate and initialize auxiliary variable at zeta position. |
| 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 | :: | cyl_len |
| public function hmap_cyl_init () | initialize the type hmap_cyl, reading from parameterfile and then call init_params |
| public function hmap_cyl_init_params (cyl_len) | initialize the type hmap_cyl, given the parameters as arguments |
| final :: hmap_cyl_free |
initialize the type hmap_cyl, reading from parameterfile and then call init_params
self
initialize the type hmap_cyl, given the parameters as arguments
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | cyl_len |
total length of cylinder |
self
Allocate and initialize auxiliary variable at zeta position.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_cyl), | intent(in) | :: | sf | |||
| real(kind=wp), | intent(in) | :: | zeta | |||
| logical, | intent(in) | :: | do_2nd_der |
compute second derivative and store second derivative terms |
evaluate the mapping h (X^1,X^2,zeta) -> (x,y,z)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_cyl), | 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_cyl), | 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_cyl), | intent(in) | :: | sf | |||
| real(kind=wp), | intent(in) | :: | q_in(3) |
evaluate derivative of Jacobian of mapping h: dJ_h/dq^k, k=1,2 at q=(X^1,X^2,zeta)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_cyl), | 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_cyl), | 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 d/dq^k(G_ij(q_G)) qR_j) , k=1,2 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_cyl), | 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) |
finalize the type hmap_cyl
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(t_hmap_cyl), | intent(inout) | :: | sf |
self |
evaluate all metrics necesseray for optimizer
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_cyl), | 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 all quantities at one given point (elemental)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | cyl_len |
input parameter |
||
| real(kind=wp), | intent(in) | :: | q1 |
solution variables q1,q2 |
||
| real(kind=wp), | intent(in) | :: | q2 |
solution variables q1,q2 |
||
| real(kind=wp), | intent(in) | :: | dX1_dt |
theta derivative of solution variables q1,q2 |
||
| real(kind=wp), | intent(in) | :: | dX2_dt |
theta derivative of solution variables q1,q2 |
||
| real(kind=wp), | intent(in) | :: | dX1_dz |
zeta derivative of solution variables q1,q2 |
||
| real(kind=wp), | intent(in) | :: | dX2_dz |
zeta derivative of solution variables q1,q2 |
||
| real(kind=wp), | intent(out) | :: | Jh |
Jac,1/Jac,g_{ab} with a=theta/zeta b=theta/zeta |
||
| real(kind=wp), | intent(out) | :: | g_tt |
Jac,1/Jac,g_{ab} with a=theta/zeta b=theta/zeta |
||
| real(kind=wp), | intent(out) | :: | g_tz |
Jac,1/Jac,g_{ab} with a=theta/zeta b=theta/zeta |
||
| real(kind=wp), | intent(out) | :: | g_zz |
Jac,1/Jac,g_{ab} with a=theta/zeta b=theta/zeta |
||
| real(kind=wp), | intent(out) | :: | Jh_dq1 |
and their variation vs q1 |
||
| real(kind=wp), | intent(out) | :: | g_tt_dq1 |
and their variation vs q1 |
||
| real(kind=wp), | intent(out) | :: | g_tz_dq1 |
and their variation vs q1 |
||
| real(kind=wp), | intent(out) | :: | g_zz_dq1 |
and their variation vs q1 |
||
| real(kind=wp), | intent(out) | :: | Jh_dq2 |
and their variation vs q2 |
||
| real(kind=wp), | intent(out) | :: | g_tt_dq2 |
and their variation vs q2 |
||
| real(kind=wp), | intent(out) | :: | g_tz_dq2 |
and their variation vs q2 |
||
| real(kind=wp), | intent(out) | :: | g_zz_dq2 |
and their variation vs q2 |
||
| real(kind=wp), | intent(out) | :: | g_t1 |
dq^{i}/dthetaG^{i1}, dq^{i}/dthetaG^{i2}, and dq^{i}/dzetaG^{i1}, dq^{i}/dzetaG^{i2} and G^{11},G^{22} |
||
| real(kind=wp), | intent(out) | :: | g_t2 |
dq^{i}/dthetaG^{i1}, dq^{i}/dthetaG^{i2}, and dq^{i}/dzetaG^{i1}, dq^{i}/dzetaG^{i2} and G^{11},G^{22} |
||
| real(kind=wp), | intent(out) | :: | g_z1 |
dq^{i}/dthetaG^{i1}, dq^{i}/dthetaG^{i2}, and dq^{i}/dzetaG^{i1}, dq^{i}/dzetaG^{i2} and G^{11},G^{22} |
||
| real(kind=wp), | intent(out) | :: | g_z2 |
dq^{i}/dthetaG^{i1}, dq^{i}/dthetaG^{i2}, and dq^{i}/dzetaG^{i1}, dq^{i}/dzetaG^{i2} and G^{11},G^{22} |
||
| real(kind=wp), | intent(out) | :: | Gh11 |
dq^{i}/dthetaG^{i1}, dq^{i}/dthetaG^{i2}, and dq^{i}/dzetaG^{i1}, dq^{i}/dzetaG^{i2} and G^{11},G^{22} |
||
| real(kind=wp), | intent(out) | :: | Gh22 |
dq^{i}/dthetaG^{i1}, dq^{i}/dthetaG^{i2}, and dq^{i}/dzetaG^{i1}, dq^{i}/dzetaG^{i2} and G^{11},G^{22} |
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_cyl), | 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_cyl), | 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) |
test hmap_cyl
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_cyl), | intent(inout) | :: | sf |
self |