t_transform_sfl Derived Type

type, public :: t_transform_sfl


Inherits

type~~t_transform_sfl~~InheritsGraph type~t_transform_sfl t_transform_sfl type~c_hmap c_hmap type~t_transform_sfl->type~c_hmap hmap type~t_base t_base type~t_transform_sfl->type~t_base X1sfl_base, X2sfl_base, GZ_base, GZsfl_base type~t_sfl_boozer t_sfl_boozer type~t_transform_sfl->type~t_sfl_boozer booz type~t_sgrid t_sGrid type~t_transform_sfl->type~t_sgrid sgrid_sfl type~t_fbase t_fBase type~t_base->type~t_fbase f type~t_sbase t_sBase type~t_base->type~t_sbase s type~t_sfl_boozer->type~c_hmap hmap type~c_hmap_auxvar c_hmap_auxvar type~t_sfl_boozer->type~c_hmap_auxvar hmap_xv type~t_sfl_boozer->type~t_fbase nu_fbase type~c_sgrid c_sgrid type~t_sgrid->type~c_sgrid type~t_sbase->type~t_sgrid grid type~c_sbase c_sbase type~t_sbase->type~c_sbase type~sll_c_spline_matrix sll_c_spline_matrix type~c_sbase->type~sll_c_spline_matrix mass

Components

Type Visibility Attributes Name Initial
logical, public :: initialized = .FALSE.

set to true in init, set to false in free

integer, public :: whichSFLcoord
integer, public :: fac_nyq
integer, public :: mn_max(2)
integer, public :: deg
integer, public :: continuity
integer, public :: degGP
integer, public :: nfp
integer, public :: mn_nyq(2)

number of integration points in fbase for X1sfl,X2sfl,Gtsfl,GZsfl

integer, public :: mn_nyq_booz(2)

number of integration points in fbase for boozer transform (fbase of GZ_base)

integer, public :: X1sfl_sin_cos
integer, public :: X2sfl_sin_cos
integer, public :: GZ_sin_cos
logical, public :: booz_relambda

=T: recompute lambda from mapping on full fourier series, =F: use LA from eq.

integer, public :: to_angle_method

=1: "interpolate": root search of interpolation points (mn_nyq=2(m_max,n_max)+1) in sfl angles, =2: "integrate": project to sfl angles with trapezoidal rule (integral with transform, mn_nyq=4(m_max,n_max)+1)

type(t_sGrid), public :: sgrid_sfl

grid for SFL coordinates

class(c_hmap), public, POINTER :: hmap

pointer to hmap class

class(t_base), public, ALLOCATABLE :: X1sfl_base

container for base of variable X1 in SFL coordinates

class(t_base), public, ALLOCATABLE :: X2sfl_base

container for base of variable X2 in SFL coordinates

class(t_base), public, ALLOCATABLE :: GZ_base

container for base of variable Gthet and Gzeta (transforms to BOOZER!)

class(t_base), public, ALLOCATABLE :: GZsfl_base

container for base of variable Gtheta and Gzeta in SFL coordinates

real(kind=wp), public, ALLOCATABLE :: X1sfl(:,:)

data (1:nBase,1:modes) of X1 in SFL coords.

real(kind=wp), public, ALLOCATABLE :: X2sfl(:,:)

data (1:nBase,1:modes) of X2 in SFL coords.

real(kind=wp), public, ALLOCATABLE :: Gthet(:,:)

data (1:nBase,1:modes) of Gthet in GVEC coords. (for BOOZER)

real(kind=wp), public, ALLOCATABLE :: GZ(:,:)

data (1:nBase,1:modes) of GZ in GVEC coords. (for BOOZER)

real(kind=wp), public, ALLOCATABLE :: Gtsfl(:,:)

data (1:nBase,1:modes) of Gt in SFL coords. (for BOOZER)

real(kind=wp), public, ALLOCATABLE :: GZsfl(:,:)

data (1:nBase,1:modes) of GZ in SFL coords. (for BOOZER)

type(t_sfl_boozer), public, ALLOCATABLE :: booz

subclass needed for boozer transform

procedure(i_func_evalprof), public, POINTER, NOPASS :: eval_phiPrime
procedure(i_func_evalprof), public, POINTER, NOPASS :: eval_iota

Type-Bound Procedures

procedure, public :: init => transform_SFL_init

procedure, public :: BuildTransform => BuildTransform_SFL

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

    Builds X1 and X2 in SFL coordinates

    Arguments

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

    self

    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 => transform_SFL_free

Source Code

TYPE :: t_transform_sfl
  !---------------------------------------------------------------------------------------------------------------------------------
  LOGICAL              :: initialized=.FALSE.      !! set to true in init, set to false in free
  !---------------------------------------------------------------------------------------------------------------------------------
  INTEGER                     :: whichSFLcoord !!
  INTEGER                     :: fac_nyq,mn_max(2),deg,continuity,degGP,nfp
  INTEGER                     :: mn_nyq(2)     !! number of integration points in fbase for X1sfl,X2sfl,Gtsfl,GZsfl
  INTEGER                     :: mn_nyq_booz(2)!! number of integration points in fbase for boozer transform (fbase of GZ_base)
  INTEGER                     :: X1sfl_sin_cos,X2sfl_sin_cos,GZ_sin_cos
  LOGICAL                     :: booz_relambda !! =T: recompute lambda from mapping on full fourier series, =F: use LA from eq.
  INTEGER                     :: to_angle_method !! =1: "interpolate": root search of interpolation points (mn_nyq=2*(m_max,n_max)+1) in sfl angles,
                                                 !! =2: "integrate": project to sfl angles with trapezoidal rule (integral with transform, mn_nyq=4*(m_max,n_max)+1)
  TYPE(t_sgrid)               :: sgrid_sfl     !! grid for SFL coordinates
#ifdef PP_WHICH_HMAP
  TYPE(PP_T_HMAP),  POINTER     :: hmap          !! pointer to hmap class
#else
  CLASS(PP_T_HMAP),  POINTER    :: hmap          !! pointer to hmap class
#endif

  CLASS(t_base),  ALLOCATABLE :: X1sfl_base    !! container for base of variable X1 in SFL coordinates
  CLASS(t_base),  ALLOCATABLE :: X2sfl_base    !! container for base of variable X2 in SFL coordinates
  CLASS(t_base),  ALLOCATABLE :: GZ_base       !! container for base of variable  Gthet and Gzeta (transforms to BOOZER!)
  CLASS(t_base),  ALLOCATABLE :: GZsfl_base    !! container for base of variable Gtheta and Gzeta in SFL coordinates
  REAL(wp),       ALLOCATABLE :: X1sfl(:,:)    !! data (1:nBase,1:modes) of X1 in SFL coords.
  REAL(wp),       ALLOCATABLE :: X2sfl(:,:)    !! data (1:nBase,1:modes) of X2 in SFL coords.
  REAL(wp),       ALLOCATABLE :: Gthet(:,:)    !! data (1:nBase,1:modes) of Gthet in GVEC coords. (for BOOZER)
  REAL(wp),       ALLOCATABLE :: GZ(:,:)       !! data (1:nBase,1:modes) of GZ in GVEC coords. (for BOOZER)
  REAL(wp),       ALLOCATABLE :: Gtsfl(:,:)    !! data (1:nBase,1:modes) of Gt in SFL coords.  (for BOOZER)
  REAL(wp),       ALLOCATABLE :: GZsfl(:,:)    !! data (1:nBase,1:modes) of GZ in SFL coords.  (for BOOZER)
  TYPE(t_sfl_boozer),ALLOCATABLE :: booz      !! subclass needed for boozer transform
  PROCEDURE(i_func_evalprof), POINTER, NOPASS  :: eval_phiPrime
  PROCEDURE(i_func_evalprof), POINTER, NOPASS  :: eval_iota
  CONTAINS
  !PROCEDURE(i_func_evalprof),DEFERRED :: evalphiPrime
  PROCEDURE :: init       => transform_sfl_init
  PROCEDURE :: BuildTransform => BuildTransform_SFL
  PROCEDURE :: free        => transform_sfl_free
END TYPE t_transform_sfl