initialize sfl boozer class
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(t_sfl_boozer), | intent(inout), | ALLOCATABLE | :: | sf |
self |
|
| 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" |
|||
| type(PP_T_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. |
SUBROUTINE sfl_boozer_new(sf,mn_max,mn_nyq,nfp,sin_cos,hmap_in,nrho,rho_pos,iota,phiPrime,relambda_in) ! MODULES USE MODgvec_fbase ,ONLY: fbase_new USE MODgvec_hmap, ONLY: hmap_new_auxvar IMPLICIT NONE !--------------------------------------------------------------------------------------------------------------------------------- ! INPUT VARIABLES 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_" #ifdef PP_WHICH_HMAP TYPE(PP_T_HMAP),INTENT(IN),TARGET :: hmap_in #else CLASS(c_hmap) ,INTENT(IN),TARGET :: hmap_in #endif INTEGER,INTENT(IN) :: nrho !! number of rho positions REAL(wp),INTENT(IN) :: rho_pos(nrho),iota(nrho),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. ! OUTPUT VARIABLES TYPE(t_sfl_boozer), ALLOCATABLE,INTENT(INOUT) :: sf !! self !================================================================================================================================= ALLOCATE(sf) sf%nrho = nrho ALLOCATE(sf%rho_pos(nrho),sf%iota(nrho),sf%phiPrime(nrho)) sf%rho_pos = rho_pos IF(ANY((sf%rho_pos.LT.1e-4_wp).OR.(sf%rho_pos.GT. 1.0_wp))) CALL abort(__STAMP__, & "sfl_boozer_new: rho_pos must be >1e-4 and <=1.0") sf%iota = iota sf%phiPrime = phiPrime IF(PRESENT(relambda_in)) THEN sf%relambda=relambda_in ELSE sf%relambda = .TRUE. ! default END IF CALL fbase_new(sf%nu_fbase,mn_max,mn_nyq,nfp,sin_cos,.TRUE.) sf%hmap => hmap_in CALL hmap_new_auxvar(sf%hmap,sf%nu_fbase%x_IP(2,:),sf%hmap_xv,.TRUE.) ALLOCATE(sf%lambda(sf%nu_fbase%modes,nrho),sf%nu(sf%nu_fbase%modes,nrho)) sf%initialized=.TRUE. END SUBROUTINE sfl_boozer_new