This map uses the Frenet frame of a given periodic input curve X0(zeta) along the curve parameter zeta in [0,2pi]. It uses the signed orthonormal Frenet-Serret frame (TNB frame) that can be computed from derivatives of X0 in zeta. h: X_0(\zeta) + q_1 \sigma N(\zeta) + q_2 \sigma B(\zeta) with a sign switching function \sigma(\zeta), that accounts for points of zero curvature. the tangent is T=X_0' / |X_0'|, the bi-normal is B= (X_0' x X_0'') / |X_0' x X_0''|, and the normal N= B X T Derivatives use the Frenet-Serret formulas:
dT/dl = k N dN/dl = -kappa T + tau B dB/dl = -tau N
With l(\zeta) being the arc-length, and l' = |X_0'|. the curvature is kappa= |X_0' x X_0''| / (l')^3, and the torsion tau= (X_0' x X_0'').X_0''' / |X_0' x X_0''|^2
As a first representation of the curve X0(\zeta), we choose zeta to be the geometric toroidal angle zeta=phi, such that R0(zeta)cos(zeta) X0(zeta)=( R0(zeta)sin(zeta) ) Z0(zeta) and both R0,Z0 are represented as a real Fourier series with modes 0... n_max and number of Field periods Nfp R0(zeta) = sum_{n=0}^{n_{max}} rc(n)cos(nNfpzeta) + rs(n)sin(nNfpzeta)
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | public | :: | test_called | = | .FALSE. |
initialize the type hmap_frenet, reading from parameterfile and then call init_params
self
initialize the type hmap_frenet with number of elements
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | nfp |
number of field periods |
||
| integer, | intent(in) | :: | n_max |
maximum mode number of guiding curve |
||
| integer, | intent(in) | :: | nvisu |
number of visualization points per field period (-1: no visualization) |
||
| real(kind=wp), | intent(in) | :: | Rc(0:n_max) |
R cos(-n*zeta) modes of guiding curve, 0..n_max |
||
| real(kind=wp), | intent(in) | :: | Rs(0:n_max) |
R sin(-n*zeta) modes of guiding curve, 0..n_max |
||
| real(kind=wp), | intent(in) | :: | Zc(0:n_max) |
Z cos(-n*zeta) modes of guiding curve, 0..n_max |
||
| real(kind=wp), | intent(in) | :: | Zs(0:n_max) |
Z sin(-n*zeta) modes of guiding curve, 0..n_max |
||
| logical, | intent(in) | :: | omnig |
omnigeneity, gives sign function of Frenet frame. False: sigma=1, True: sigma=+1 for 0<=zeta<=pi/nfp, and -1 for pi/nfp<zeta<2pi |
self
initialize the aux variable
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_frenet), | intent(in) | :: | sf |
self |
||
| real(kind=wp), | intent(in) | :: | zeta | |||
| logical, | intent(in) | :: | do_2nd_der |
compute second derivative and store second derivative terms |
Store data that can be precomputed on a set ot zeta points depends on hmap_frenet, 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 | :: | lp | ||||
| real(kind=wp), | public | :: | kappa | ||||
| real(kind=wp), | public | :: | tau | ||||
| real(kind=wp), | public | :: | sigma | ||||
| real(kind=wp), | public | :: | lp_p | ||||
| real(kind=wp), | public | :: | kappa_p | ||||
| real(kind=wp), | public | :: | tau_p | ||||
| real(kind=wp), | public, | DIMENSION(3) | :: | X0 | |||
| real(kind=wp), | public, | DIMENSION(3) | :: | T | |||
| real(kind=wp), | public, | DIMENSION(3) | :: | N | |||
| real(kind=wp), | public, | DIMENSION(3) | :: | B |
| public function hmap_frenet_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 | :: | n_max | = | 0 |
input maximum mode number (without nfp), 0...n_max, |
|
| real(kind=wp), | public, | ALLOCATABLE | :: | rc(:) |
input cosine coefficients of R0 as array (0:n_max) of modes (0,1,...,n_max)*nfp |
||
| real(kind=wp), | public, | ALLOCATABLE | :: | rs(:) |
input sine coefficients of R0 as array (0:n_max) of modes (0,1,...,n_max)*nfp |
||
| real(kind=wp), | public, | ALLOCATABLE | :: | zc(:) |
input cosine coefficients of Z0 as array (0:n_max) of modes (0,1,...,n_max)*nfp |
||
| real(kind=wp), | public, | ALLOCATABLE | :: | zs(:) |
input sine coefficients of Z0 as array (0:n_max) of modes (0,1,...,n_max)*nfp |
||
| integer, | public, | ALLOCATABLE | :: | Xn(:) |
array of mode numbers, local variable =(0,1,...,n_max)*nfp |
||
| logical, | public | :: | omnig | = | .FALSE. |
omnigenity. True: sign change of frame at pi/nfp , False: no sign change |
| public function hmap_frenet_init () | initialize the type hmap_frenet, reading from parameterfile and then call init_params |
| public function hmap_frenet_init_params (nfp, n_max, nvisu, Rc, Rs, Zc, Zs, omnig) | initialize the type hmap_frenet with number of elements |
| final :: hmap_frenet_free |
initialize the type hmap_frenet, reading from parameterfile and then call init_params
self
initialize the type hmap_frenet with number of elements
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | nfp |
number of field periods |
||
| integer, | intent(in) | :: | n_max |
maximum mode number of guiding curve |
||
| integer, | intent(in) | :: | nvisu |
number of visualization points per field period (-1: no visualization) |
||
| real(kind=wp), | intent(in) | :: | Rc(0:n_max) |
R cos(-n*zeta) modes of guiding curve, 0..n_max |
||
| real(kind=wp), | intent(in) | :: | Rs(0:n_max) |
R sin(-n*zeta) modes of guiding curve, 0..n_max |
||
| real(kind=wp), | intent(in) | :: | Zc(0:n_max) |
Z cos(-n*zeta) modes of guiding curve, 0..n_max |
||
| real(kind=wp), | intent(in) | :: | Zs(0:n_max) |
Z sin(-n*zeta) modes of guiding curve, 0..n_max |
||
| logical, | intent(in) | :: | omnig |
omnigeneity, gives sign function of Frenet frame. False: sigma=1, True: sigma=+1 for 0<=zeta<=pi/nfp, and -1 for pi/nfp<zeta<2pi |
self
initialize the aux variable
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_frenet), | intent(in) | :: | sf |
self |
||
| real(kind=wp), | intent(in) | :: | zeta | |||
| logical, | intent(in) | :: | do_2nd_der |
compute second derivative and store second derivative terms |
sign function depending on zeta, if omnig=False, sigma=1 if omnig=True, sigma=+1 for 0<=zeta<=pi/nfp, and -1 for pi/nfp<zeta<2pi
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_frenet), | intent(in) | :: | sf | |||
| real(kind=wp), | intent(in) | :: | zeta |
evaluate the mapping h (q1,q2,zeta) -> (x,y,z)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_frenet), | 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_frenet), | 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_frenet), | 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_frenet), | 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_frenet), | 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_frenet), | 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_frenet), | 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_frenet), | 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 of ds and dtheta and 1 for dzeta
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_frenet), | 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 of ds and dtheta and 1 for dzeta
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_frenet), | 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=1,3 q_vec^k * 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 of ds and dtheta and 1 for dzeta
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_frenet), | 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_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 of ds and dtheta and 1 for dzeta
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_frenet), | 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_frenet
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(t_hmap_frenet), | intent(inout) | :: | sf |
self |
Sample axis and check for zero (<1.e-12) curvature
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_frenet), | intent(in) | :: | sf |
Write evaluation of the axis and signed frenet frame to file
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_frenet), | intent(in) | :: | sf | |||
| integer, | intent(in) | :: | nvisu |
evaluate all metrics necessary for optimizer
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_frenet), | 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_frenet_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_frenet), | 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_frenet), | 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_frenet), | 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_frenet), | 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), position and first three derivatives, from given R0,Z0 Fourier
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_frenet), | 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) | :: | X0p(1:3) |
1st derivative in zeta |
||
| real(kind=wp), | intent(out) | :: | X0pp(1:3) |
2nd derivative in zeta |
||
| real(kind=wp), | intent(out) | :: | X0ppp(1:3) |
3rd derivative in zeta |
||
| real(kind=wp), | intent(out), | optional | :: | X0p4(1:3) |
4th derivative in zeta |
evaluate 1d fourier series from given cos/sin coefficients and mode numbers xn SUM(xc(0:n_max)COS(xn(0:n_max)zeta)+xs(0:n_max)SIN(xn(0:n_max)zeta) evaluate all derivatives 1,2,3 alongside
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | n_max |
number of modes is n_max+1 (0...n_max) |
||
| integer, | intent(in) | :: | xn(0:n_max) |
array of mode numbers |
||
| real(kind=wp), | intent(in) | :: | xc(0:n_max) |
cosine coefficients |
||
| real(kind=wp), | intent(in) | :: | xs(0:n_max) |
sine coefficients |
||
| real(kind=wp), | intent(in) | :: | zeta |
angular position [0,2pi] |
||
| real(kind=wp), | intent(out) | :: | x |
value at zeta |
||
| real(kind=wp), | intent(out) | :: | xp |
1st derivative in zeta |
||
| real(kind=wp), | intent(out) | :: | xpp |
2nd derivative in zeta |
||
| real(kind=wp), | intent(out) | :: | xppp |
3rd derivative in zeta |
||
| real(kind=wp), | intent(out) | :: | xp4 |
4th derivative in zeta |
test hmap_frenet - evaluation of the map
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_hmap_frenet), | intent(inout) | :: | sf |
self |