This map uses a given periodic input curve X0(zeta) along the curve parameter zeta in [0,2pi]. It is very similar to a Frenet-Serret frame (TNB frame), but with normal N and binormal B vectors as input functions as well. h: X_0(\zeta) + q_1 N(\zeta) + q_2 B(\zeta) the tangent is T=X_0', and N and B are assumed to be continous along zeta, so no switches. Note that since N, B are input functions, they are not assumed to be unit length nor orthogonal, but together with the tangent of the curve T = X_0' , (T, N, B) should form a linearly independent set of basis vectors, with T.(B x N) > 0.
As a representation of the curve X0(\zeta), zeta is the curve parametrization in [0,2pi] and the 3 cartesian coordinates of X0,N,B are given at a set of zeta points over one full turn, with nzeta*Nfp number of points. these will then be fourier transformed to compute derivatives
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | public | :: | test_called | = | .FALSE. |
initialize the type hmap_axisNB, reading from parameterfile and call init_params
self
initialize the type hmap_axisNB and read "G-frame" from netcdf
transform from full period cartesian coordinates to one-field period "hat" cartesian coordinates, by rotating around the zaxis with the local angle zeta, with the sign given by which direction xyz(zeta=0) rotates to xyz(zeta=2pi/nfp) INVERSION OF: x=cos(zeta)xhat - sgn_rotsin(zeta)yhat, y=cos(zeta)yhat + sgn_rotsin(zeta)xhat, z <=> zhat ==> xhat=cos(zeta)x+sgn_rotsin(zeta)y, yhat=cos(zeta)y-sgn_rotsin(zeta)x, check that all points on full period are the same in the xhat,yhat,zhat coordinates NOTE THIS FUNCTION IS USING sinz=sin(zeta),cosz=cos(zeta) and sgn_rot computed above!!!!
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | ncfile |
netcdf file containing the group "axis" from which to read the G-frame |
||
| integer, | intent(in) | :: | nvisu |
number of visualization points for G-Frame per field period, -1: no visualization |
self
initialize the aux variable
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_axisNB), | intent(in) | :: | sf |
self (hmap) |
||
| real(kind=wp), | intent(in) | :: | zeta | |||
| logical, | intent(in) | :: | do_2nd_der |
compute second derivative and store second derivative terms |
auxiliary variable
Store data that can be precomputed on a set ot zeta points depends on hmap_axisNB, but could be used for different point sets in zeta
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=wp), | public | :: | zeta | ||||
| logical, | public | :: | do_2nd_der | ||||
| real(kind=wp), | public, | DIMENSION(3) | :: | X0 |
Position,Tangent,Normal,Bi-Normal and N',B' and T',B'',N'' |
||
| real(kind=wp), | public, | DIMENSION(3) | :: | T |
Position,Tangent,Normal,Bi-Normal and N',B' and T',B'',N'' |
||
| real(kind=wp), | public, | DIMENSION(3) | :: | N |
Position,Tangent,Normal,Bi-Normal and N',B' and T',B'',N'' |
||
| real(kind=wp), | public, | DIMENSION(3) | :: | B |
Position,Tangent,Normal,Bi-Normal and N',B' and T',B'',N'' |
||
| real(kind=wp), | public, | DIMENSION(3) | :: | Np |
Position,Tangent,Normal,Bi-Normal and N',B' and T',B'',N'' |
||
| real(kind=wp), | public, | DIMENSION(3) | :: | Bp |
Position,Tangent,Normal,Bi-Normal and N',B' and T',B'',N'' |
||
| real(kind=wp), | public, | DIMENSION(3) | :: | Tp |
Position,Tangent,Normal,Bi-Normal and N',B' and T',B'',N'' |
||
| real(kind=wp), | public, | DIMENSION(3) | :: | Npp |
Position,Tangent,Normal,Bi-Normal and N',B' and T',B'',N'' |
||
| real(kind=wp), | public, | DIMENSION(3) | :: | Bpp |
Position,Tangent,Normal,Bi-Normal and N',B' and T',B'',N'' |
||
| real(kind=wp), | public, | DIMENSION(3) | :: | NxB |
cross products |
||
| real(kind=wp), | public, | DIMENSION(3) | :: | NpxB |
cross products |
||
| real(kind=wp), | public, | DIMENSION(3) | :: | NxBp |
cross products |
||
| real(kind=wp), | public | :: | BB |
dot-products of above vectors, size(nzeta_eval) |
|||
| real(kind=wp), | public | :: | NN |
dot-products of above vectors, size(nzeta_eval) |
|||
| real(kind=wp), | public | :: | NB |
dot-products of above vectors, size(nzeta_eval) |
|||
| real(kind=wp), | public | :: | BpN |
dot-products of above vectors, size(nzeta_eval) |
|||
| real(kind=wp), | public | :: | BpB |
dot-products of above vectors, size(nzeta_eval) |
|||
| real(kind=wp), | public | :: | NpN |
dot-products of above vectors, size(nzeta_eval) |
|||
| real(kind=wp), | public | :: | NpB |
dot-products of above vectors, size(nzeta_eval) |
| public function hmap_axisNB_init_aux (sf, zeta, do_2nd_der) | initialize the aux variable |
| 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. | ||
| integer, | public | :: | nzeta | = | 0 |
number of points in zeta direction of the input axis |
|
| integer, | public | :: | sgn_rot |
sign of rotation around Z axis, either +1 or -1: positive means that from one field period to the next, xyz rotate counterclockwise around the Z-axis (right hand rule), negative then clockwise. |
|||
| real(kind=wp), | public, | ALLOCATABLE | :: | zeta(:) |
zeta positions in one field period (1:nzeta), on 'half' grid: zeta(i)=(i-0.5)/nzeta*(2pi/nfp) |
||
| integer, | public | :: | n_max | = | 0 |
maximum number of fourier coefficients on a field period (<=2*nzeta-1) |
|
| real(kind=wp), | public, | ALLOCATABLE | :: | xyz(:,:) |
cartesian coordinates of the axis for a full turn, (1:NFPnzeta,1:3), zeta is on 'half' grid: zeta(i)=(i-0.5)/(NFPnzeta)*(2pi) |
||
| real(kind=wp), | public, | ALLOCATABLE | :: | Nxyz(:,:) |
"normal" vector of axis frame in cartesian coordinates for a full turn (1:NFP*nzeta,1:3). NOT ASSUMED TO BE ORTHOGONAL to tangent of curve |
||
| real(kind=wp), | public, | ALLOCATABLE | :: | Bxyz(:,:) |
"Bi-normal" vector of axis frame in cartesian coordinates for a full turn (1:NFP*nzeta,1:3). NOT ASSUMED TO BE ORTHOGONAL to tangent of curve or Nxyz |
||
| real(kind=wp), | public, | ALLOCATABLE | :: | xyz_hat_modes(:,:) |
fourier modes of xhat,yhat,zhat on one field period, x=cos(zeta)xhat-sgn_rotsin(zeta)yhat, y=sin(zeta)xhat+sgn_rotcos(zeta)yhat, z=zhat |
||
| real(kind=wp), | public, | ALLOCATABLE | :: | Nxyz_hat_modes(:,:) |
1d fourier modes of Nxyz, one field period |
||
| real(kind=wp), | public, | ALLOCATABLE | :: | Bxyz_hat_modes(:,:) |
1d fourier modes of Bxyz, one field period |
||
| character(len=100), | public | :: | ncfile | = | " " |
name of netcdf file with axis information |
|
| type(t_fBase), | public, | ALLOCATABLE | :: | fb_hat |
container for 1d fourier base of xhat |
||
| class(t_ncfile), | public, | ALLOCATABLE | :: | nc |
container for netcdf-file |
| public function hmap_axisNB_init () | initialize the type hmap_axisNB, reading from parameterfile and call init_params |
| public function hmap_axisNB_init_params (ncfile, nvisu) | initialize the type hmap_axisNB and read "G-frame" from netcdf |
| final :: hmap_axisNB_free |
initialize the type hmap_axisNB, reading from parameterfile and call init_params
self
initialize the type hmap_axisNB and read "G-frame" from netcdf
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | ncfile |
netcdf file containing the group "axis" from which to read the G-frame |
||
| integer, | intent(in) | :: | nvisu |
number of visualization points for G-Frame per field period, -1: no visualization |
self
initialize the aux variable
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_axisNB), | intent(in) | :: | sf |
self (hmap) |
||
| real(kind=wp), | intent(in) | :: | zeta | |||
| logical, | intent(in) | :: | do_2nd_der |
compute second derivative and store second derivative terms |
auxiliary variable
Rodrigues' rotation formula assumption for now is that the origin is fixed at rot_origin=(/0.,0.,0./) and the rotation axis is fixed at rot_axis=(/0.,0.,1./)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp) | :: | pos(3) | ||||
| real(kind=wp) | :: | angle |
evaluate the mapping h (q1,q2,zeta) -> (x,y,z)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_axisNB), | intent(in) | :: | sf | |||
| real(kind=wp), | intent(in) | :: | q_in(3) |
evaluate the mapping h (q1,q2,zeta) -> (x,y,z)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_axisNB), | intent(in) | :: | sf | |||
| real(kind=wp), | intent(in) | :: | q1 | |||
| real(kind=wp), | intent(in) | :: | q2 | |||
| class(c_hmap_auxvar), | intent(in) | :: | xv |
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_axisNB), | 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) ,
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_axisNB), | 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 |
evaluate Jacobian of mapping h: J_h=sqrt(det(G)) at q=(q^1,q^2,zeta)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_axisNB), | intent(in) | :: | sf | |||
| real(kind=wp), | intent(in) | :: | q_in(3) |
evaluate Jacobian of mapping h: J_h=sqrt(det(G)) at q=(q^1,q^2,zeta)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_axisNB), | intent(in) | :: | sf | |||
| real(kind=wp), | intent(in) | :: | q1 | |||
| real(kind=wp), | intent(in) | :: | q2 | |||
| class(c_hmap_auxvar), | intent(in) | :: | xv |
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)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_axisNB), | 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 q_vec^k dJ_h/dq^k, k=1,2,3 at q=(q^1,q^2,zeta)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_axisNB), | 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 |
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_axisNB), | 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
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_axisNB), | 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 |
evaluate sum_k q_vec^k * sum_ij (qL_i d/dq^k(G_ij(q_G)) qR_j) , 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_axisNB), | 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 q_vec^k * sum_ij (qL_i d/dq^k(G_ij(q_G)) qR_j) , 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_axisNB), | 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 |
finalize the type hmap_axisNB
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(t_hmap_axisNB), | intent(inout) | :: | sf |
self |
READ axis from netcdf file, needs netcdf library! ======= HEADER OF THE NETCDF FILE VERSION 3.1 =================================================================================== === FILE DESCRIPTION: * axis, normal and binormal of the frame are given in cartesian coordinates along the curve parameter zeta [0,2pi]. * The curve is allowed to have a field periodicity NFP, but the curve must be provided on a full turn. * The adata is given in real space, sampled along equidistant zeta point positions: zeta(i)=(i+0.5)/nzeta * (2pi/NFP), i=0,...,nzeta-1 always shifted by (2pi/NFP) for the next field period. Thus the number of points along the axis for a full turn is NFP*nzeta * definition of the axis-following frame in cartesian coordinates ( boundary surface at rho=1):
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_axisNB), | intent(inout) | :: | sf |
self |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_axisNB), | intent(inout) | :: | sf |
Check that the TNB frame really has the field periodicity of NFP: assumption for now is that the origin is fixed at rot_origin=(/0.,0.,0./) and the rotation axis is fixed at rot_axis=(/0.,0.,1./) sign of the rotation 'sgn_rot' is now accounted for in the transformation to xhat, so it has to be passed here.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_axisNB), | intent(in) | :: | sf | |||
| integer, | intent(in) | :: | sgn_rot |
sign of rotation |
||
| integer, | intent(out) | :: | error_nfp |
Write evaluation of the axis and signed axisNB frame to file
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_axisNB), | intent(in) | :: | sf | |||
| integer, | intent(in) | :: | nvisu |
evaluate all metrics necessary for optimizer
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_axisNB), | 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 | ||
|---|---|---|---|---|---|---|
| type(t_hmap_axisNB_auxvar), | intent(in) | :: | xv |
precomputed auxiliary variables |
||
| 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_axisNB), | 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 |
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_axisNB), | 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(t_hmap_axisNB), | 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 |
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_axisNB), | 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 curve X0(zeta), and T=X0',N,B,N',B', using the fourier series of X0_hat,N_hat and B_hat and transform from "hat" coordinates to cartesian coordinates: x=xhatcos(zeta)-sgn_rotyhatsin(zeta), y=yhatcos(zeta)+sgn_rotsin(zeta)xhat, z=zhat
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_axisNB), | intent(in) | :: | sf | |||
| real(kind=wp), | intent(in) | :: | zeta |
position along closed curve parametrized in [0,2pi] |
||
| real(kind=wp), | intent(out) | :: | X0(1:3) |
curve position in cartesian coordinates |
||
| real(kind=wp), | intent(out) | :: | T(1:3) |
tangent X0' |
||
| real(kind=wp), | intent(out) | :: | N(1:3) |
Normal |
||
| real(kind=wp), | intent(out) | :: | B(1:3) |
bi-Normal |
||
| real(kind=wp), | intent(out) | :: | Np(1:3) |
derivative of Normal in zeta (N') |
||
| real(kind=wp), | intent(out) | :: | Bp(1:3) |
derivative of bi-Normal in zeta (B') |
||
| real(kind=wp), | intent(out), | optional | :: | Tp(1:3) |
derivative of tangent in zeta (X0'') |
|
| real(kind=wp), | intent(out), | optional | :: | Npp(1:3) |
2nd derivative of Normal in zeta (N'') |
|
| real(kind=wp), | intent(out), | optional | :: | Bpp(1:3) |
2nd derivative of bi-Normal in zeta (B'') |
test hmap_axisNB - evaluation of the map
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_axisNB), | intent(inout) | :: | sf |
self |