t_sfl_boozer Derived Type

type, public :: t_sfl_boozer

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)


Inherits

type~~t_sfl_boozer~~InheritsGraph type~t_sfl_boozer t_sfl_boozer PP_T_HMAP PP_T_HMAP type~t_sfl_boozer->PP_T_HMAP hmap PP_T_HMAP_AUXVAR PP_T_HMAP_AUXVAR type~t_sfl_boozer->PP_T_HMAP_AUXVAR hmap_xv c_hmap c_hmap type~t_sfl_boozer->c_hmap hmap c_hmap_auxvar c_hmap_auxvar type~t_sfl_boozer->c_hmap_auxvar hmap_xv type~t_fbase t_fBase type~t_sfl_boozer->type~t_fbase nu_fbase

Inherited by

type~~t_sfl_boozer~~InheritedByGraph type~t_sfl_boozer t_sfl_boozer type~t_transform_sfl t_transform_sfl type~t_transform_sfl->type~t_sfl_boozer booz

Components

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, ALLOCATABLE :: 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)

type(PP_T_HMAP), public, POINTER :: hmap

pointer to hmap class

type(PP_T_HMAP_AUXVAR), public, ALLOCATABLE :: hmap_xv(:)

auxiliary variables for hmap

class(c_hmap), public, POINTER :: hmap

pointer to hmap class

class(c_hmap_auxvar), public, ALLOCATABLE :: hmap_xv(:)

auxiliary variables for hmap


Type-Bound Procedures

procedure, public :: get_boozer => Get_Boozer_sinterp

  • private subroutine Get_Boozer_sinterp(sf, X1_base_in, X2_base_in, LA_base_in, X1_in, X2_in, LA_in)

    Builds the boozer transform coordinate theta^B = theta + lambda + iota(s)*nu(s,theta,zeta) zeta^B = zeta +nu(s,theta,zeta)

    Read more…

    Arguments

    Type IntentOptional 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)

procedure, public :: free => sfl_boozer_free

  • private subroutine sfl_boozer_free(sf)

    finalize sfl boozer class

    Arguments

    Type IntentOptional Attributes Name
    class(t_sfl_boozer), intent(inout) :: sf

    self

procedure, public :: find_angles => self_find_boozer_angles

  • private subroutine self_find_boozer_angles(sf, tz_dim, tz_boozer, thetzeta_out)

    interface to find_boozer_angles from the class t_sfl_boozer

    Arguments

    Type IntentOptional 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

procedure, public :: find_angles_irho => self_find_boozer_angles_irho

  • private subroutine self_find_boozer_angles_irho(sf, irho, tz_dim, tz_boozer, thetzeta_out)

    interface to find_boozer_angles from the class t_sfl_boozer

    Arguments

    Type IntentOptional 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)

Source Code

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), ALLOCATABLE :: 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
  PROCEDURE :: free        => sfl_boozer_free
  PROCEDURE :: find_angles => self_find_boozer_angles
  PROCEDURE :: find_angles_irho => self_find_boozer_angles_irho
END TYPE t_sfl_boozer