Class for the computation of the boozer transform, on a given radial grid positions rho, with iota(rho) phiPrime(rho) values.
theta^Boozer=theta+lambda+iota(rho)*nu(rho,theta,zeta) zeta^Boozer =zeta +nu(rho,theta,zeta)
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | public | :: | initialized | = | .FALSE. |
set to true in init, set to false in free |
|
| integer, | public | :: | nrho |
number of rho positions |
|||
| logical, | public | :: | relambda |
if =True, J^s=0 will be recomputed, for exact integrability condition of boozer transform (but slower!) |
|||
| type(t_fBase), | public | :: | nu_fbase | ||||
| real(kind=wp), | public, | ALLOCATABLE | :: | rho_pos(:) |
rho positions, iota and phiPrime at these rho positions |
||
| real(kind=wp), | public, | ALLOCATABLE | :: | iota(:) |
rho positions, iota and phiPrime at these rho positions |
||
| real(kind=wp), | public, | ALLOCATABLE | :: | phiPrime(:) |
rho positions, iota and phiPrime at these rho positions |
||
| real(kind=wp), | public, | ALLOCATABLE | :: | lambda(:,:) |
Fourier modes for all rho positions of lambda (recomputed on the fourier space of nu) and nu for boozer transform , (iMode,irho) |
||
| real(kind=wp), | public, | ALLOCATABLE | :: | nu(:,:) |
Fourier modes for all rho positions of lambda (recomputed on the fourier space of nu) and nu for boozer transform , (iMode,irho) |
||
| class(c_hmap), | public, | POINTER | :: | hmap |
pointer to hmap class |
||
| class(c_hmap_auxvar), | public, | ALLOCATABLE | :: | hmap_xv(:) |
auxiliary variables for hmap |
initialize sfl boozer class
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | mn_max(2) |
maximum Fourier modes in theta and zeta |
||
| integer, | intent(in) | :: | mn_nyq(2) |
number of equidistant integration points (trapezoidal rule) in m and n |
||
| integer, | intent(in) | :: | nfp |
number of field periods |
||
| character(len=8) | :: | sin_cos |
can be either only sine: " sin" only cosine: " cos" or full: "sin_cos" |
|||
| class(c_hmap), | intent(in), | TARGET | :: | hmap_in | ||
| integer, | intent(in) | :: | nrho |
number of rho positions |
||
| real(kind=wp), | intent(in) | :: | rho_pos(nrho) |
rho positions, iota and phiPrime at these rho positions |
||
| real(kind=wp), | intent(in) | :: | iota(nrho) |
rho positions, iota and phiPrime at these rho positions |
||
| real(kind=wp), | intent(in) | :: | phiPrime(nrho) |
rho positions, iota and phiPrime at these rho positions |
||
| logical, | intent(in), | optional | :: | relambda_in |
DEFAULT=TRUE: lambda is recomputed on the given fourier resolution, RECOMMENDED for exact integrability condition of boozer transform, but slower. FALSE: lambda from equilibrium solution is taken. |
self
finalize sfl boozer class
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(t_sfl_boozer), | intent(inout) | :: | sf |
self |
Builds the boozer transform coordinate theta^B = theta + lambda + iota(s)*nu(s,theta,zeta) zeta^B = zeta +nu(s,theta,zeta)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_sfl_boozer), | intent(inout) | :: | sf | |||
| class(t_base), | intent(in) | :: | X1_base_in | |||
| class(t_base), | intent(in) | :: | X2_base_in | |||
| class(t_base), | intent(in) | :: | LA_base_in | |||
| real(kind=wp), | intent(in) | :: | X1_in(1:X1_base_in%s%nbase,1:X1_base_in%f%modes) | |||
| real(kind=wp), | intent(in) | :: | X2_in(1:X2_base_in%s%nbase,1:X2_base_in%f%modes) | |||
| real(kind=wp), | intent(in) | :: | LA_in(1:LA_base_in%s%nbase,1:LA_base_in%f%modes) |
interface to find_boozer_angles from the class t_sfl_boozer
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_sfl_boozer), | intent(in) | :: | sf | |||
| integer, | intent(in) | :: | tz_dim | |||
| real(kind=wp), | intent(in) | :: | tz_boozer(2,tz_dim) | |||
| real(kind=wp), | intent(out) | :: | thetzeta_out(2,tz_dim,sf%nrho) |
theta,zeta position in original angles, for given boozer angles |
interface to find_boozer_angles from the class t_sfl_boozer
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_sfl_boozer), | intent(in) | :: | sf | |||
| integer, | intent(in) | :: | irho | |||
| integer, | intent(in) | :: | tz_dim | |||
| real(kind=wp), | intent(in) | :: | tz_boozer(2,tz_dim) | |||
| real(kind=wp), | intent(out) | :: | thetzeta_out(2,tz_dim) |
TYPE :: t_sfl_boozer !--------------------------------------------------------------------------------------------------------------------------------- LOGICAL :: initialized=.FALSE. !! set to true in init, set to false in free !--------------------------------------------------------------------------------------------------------------------------------- !input parameters INTEGER :: nrho !! number of rho positions LOGICAL :: relambda !! if =True, J^s=0 will be recomputed, for exact integrability condition of boozer transform (but slower!) TYPE(t_fbase) :: nu_fbase REAL(wp),ALLOCATABLE::rho_pos(:),iota(:),phiPrime(:) !! rho positions, iota and phiPrime at these rho positions ! computed in the boozer transform REAL(wp),ALLOCATABLE::lambda(:,:),nu(:,:) !! Fourier modes for all rho positions of lambda (recomputed on the fourier space of nu) and nu for boozer transform , (iMode,irho) #ifdef PP_WHICH_HMAP TYPE(PP_T_HMAP), POINTER :: hmap !! pointer to hmap class TYPE(PP_T_HMAP_AUXVAR),ALLOCATABLE :: hmap_xv(:) !! auxiliary variables for hmap #else CLASS(c_hmap), POINTER :: hmap !! pointer to hmap class CLASS(c_hmap_auxvar),ALLOCATABLE :: hmap_xv(:) !! auxiliary variables for hmap #endif CONTAINS PROCEDURE :: get_boozer => get_boozer_sinterp FINAL :: sfl_boozer_free PROCEDURE :: find_angles => self_find_boozer_angles PROCEDURE :: find_angles_irho => self_find_boozer_angles_irho END TYPE t_sfl_boozer