| 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. | ||
| 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) |
||
| 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=1024), | public | :: | ncfile | = | " " |
name of netcdf file with axis information |
|
| type(t_fBase), | public | :: | fb_hat |
container for 1d fourier base of xhat |
|||
| class(t_ncfile), | public, | ALLOCATABLE | :: | nc |
container for netcdf-file |
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
finalize the type hmap_axisNB
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(t_hmap_axisNB), | intent(inout) | :: | sf |
self |
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) |
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) |
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) |
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) |
| 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) |
| 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 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 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 |
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'') |
TYPE,EXTENDS(c_hmap) :: t_hmap_axisNB !--------------------------------------------------------------------------------------------------------------------------------- LOGICAL :: initialized=.FALSE. !--------------------------------------------------------------------------------------------------------------------------------- ! parameters for hmap_axisNB: !INTEGER :: nfp !! already part of c_hmap. Is overwritten in init! !curve description INTEGER :: nzeta=0 !! number of points in zeta direction of the input axis INTEGER :: 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(wp),ALLOCATABLE :: zeta(:) !! zeta positions in one field period (1:nzeta), on 'half' grid: zeta(i)=(i-0.5)/nzeta*(2pi/nfp) REAL(wp),ALLOCATABLE :: xyz(:,:) !! cartesian coordinates of the axis for a full turn, (1:NFP*nzeta,1:3), zeta is on 'half' grid: zeta(i)=(i-0.5)/(NFP*nzeta)*(2pi) REAL(wp),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(wp),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 !fourier modes REAL(wp),ALLOCATABLE :: xyz_hat_modes(:,:) !! fourier modes of xhat,yhat,zhat on one field period, !! x=cos(zeta)xhat-sgn_rot*sin(zeta)yhat, !! y=sin(zeta)xhat+sgn_rot*cos(zeta)yhat, z=zhat REAL(wp),ALLOCATABLE :: Nxyz_hat_modes(:,:) !! 1d fourier modes of Nxyz, one field period REAL(wp),ALLOCATABLE :: Bxyz_hat_modes(:,:) !! 1d fourier modes of Bxyz, one field period CHARACTER(LEN=1024) :: ncfile=" " !! name of netcdf file with axis information !--------------------------------------------------------------------------------------------------------------------------------- TYPE(t_fbase) :: fb_hat !! container for 1d fourier base of xhat CLASS(t_ncfile),ALLOCATABLE :: nc !! container for netcdf-file CONTAINS FINAL :: hmap_axisNB_free PROCEDURE :: eval_all => hmap_axisNB_eval_all PROCEDURE :: eval => hmap_axisNB_eval PROCEDURE :: eval_aux => hmap_axisNB_eval_aux PROCEDURE :: eval_dxdq => hmap_axisNB_eval_dxdq PROCEDURE :: eval_dxdq_aux => hmap_axisNB_eval_dxdq_aux PROCEDURE :: eval_Jh => hmap_axisNB_eval_Jh PROCEDURE :: eval_Jh_aux => hmap_axisNB_eval_Jh_aux PROCEDURE :: eval_Jh_dq => hmap_axisNB_eval_Jh_dq PROCEDURE :: eval_Jh_dq_aux => hmap_axisNB_eval_Jh_dq_aux PROCEDURE :: eval_gij => hmap_axisNB_eval_gij PROCEDURE :: eval_gij_aux => hmap_axisNB_eval_gij_aux PROCEDURE :: eval_gij_dq => hmap_axisNB_eval_gij_dq PROCEDURE :: eval_gij_dq_aux => hmap_axisNB_eval_gij_dq_aux PROCEDURE :: get_dx_dqi => hmap_axisNB_get_dx_dqi PROCEDURE :: get_dx_dqi_aux => hmap_axisNB_get_dx_dqi_aux PROCEDURE :: get_ddx_dqij => hmap_axisNB_get_ddx_dqij PROCEDURE :: get_ddx_dqij_aux => hmap_axisNB_get_ddx_dqij_aux !--------------------------------------------------------------------------------------------------------------------------------- ! procedures for hmap_axisNB: PROCEDURE :: eval_TNB => hmap_axisNB_eval_TNB_hat END TYPE t_hmap_axisNB