geometry_miller Module



Variables

Type Visibility Attributes Name Initial
logical, private :: debug = .false.
integer, private :: nzed_local
real, private :: rhoc
real, private :: rmaj
real, private :: shift
real, private :: kappa
real, private :: kapprim
real, private :: tri
real, private :: triprim
real, private :: betaprim
real, private :: betadbprim
real, private :: qinp
real, private :: shat
real, private :: d2qdr2
real, private :: rgeo
real, private :: dpsipdrho
real, private :: d2psidr2
real, private :: dpsipdrho_psi0
real, private :: psitor_lcfs
real, private :: rhotor
real, private :: drhotordrho
real, private :: dIdrho
real, private :: dI
real, private :: rhoc0
logical, private :: write_profile_variation
logical, private :: read_profile_variation
logical, private :: load_psi0_variables
integer, private :: nz
integer, private :: nz2pi
real, private :: bi
real, private :: dqdr
real, private :: d2Idr2
real, private, dimension(:), allocatable :: grho
real, private, dimension(:), allocatable :: bmag
real, private, dimension(:), allocatable :: grho_psi0
real, private, dimension(:), allocatable :: bmag_psi0
real, private, dimension(:), allocatable :: gradpar
real, private, dimension(:), allocatable :: gradpararc
real, private, dimension(:), allocatable :: arc
real, private, dimension(:), allocatable :: gds2
real, private, dimension(:), allocatable :: gds21
real, private, dimension(:), allocatable :: gds22
real, private, dimension(:), allocatable :: gds23
real, private, dimension(:), allocatable :: gds24
real, private, dimension(:), allocatable :: gbdrift0
real, private, dimension(:), allocatable :: gbdrift
real, private, dimension(:), allocatable :: cvdrift0
real, private, dimension(:), allocatable :: cvdrift
real, private, dimension(:), allocatable :: d2Rdth2
real, private, dimension(:), allocatable :: d2Zdth2
real, private, dimension(:), allocatable :: d2Rdrdth
real, private, dimension(:), allocatable :: d2Zdrdth
real, private, dimension(:), allocatable :: gpsi
real, private, dimension(:), allocatable :: dBdrho
real, private, dimension(:), allocatable :: d2Bdrdth
real, private, dimension(:), allocatable :: dgradpardrho
real, private, dimension(:), allocatable :: dgradparBdrho
real, private, dimension(:), allocatable :: dBdth
real, private, dimension(:), allocatable :: gradparb
real, private, dimension(:), allocatable :: dcvdrift0drho
real, private, dimension(:), allocatable :: dgbdrift0drho
real, private, dimension(:), allocatable :: theta
real, private, dimension(:), allocatable :: varthet
real, private, dimension(:), allocatable :: dvarthdr
real, private, dimension(:), allocatable :: gradrho_gradthet
real, private, dimension(:), allocatable :: cross
real, private, dimension(:), allocatable :: d2varthdr2
real, private, dimension(:), allocatable :: gradthet2
real, private, dimension(:), allocatable :: gradalph_gradthet
real, private, dimension(:), allocatable :: gradrho_gradalph
real, private, dimension(:), allocatable :: gradalph2
real, private, dimension(:), allocatable :: d2Bdr2
real, private, dimension(:), allocatable :: d2Rdr2
real, private, dimension(:), allocatable :: d2Zdr2
real, private, dimension(:), allocatable :: drz
real, private, dimension(:), allocatable :: drzdth
real, private, dimension(:), allocatable :: d2Rdr2dth
real, private, dimension(:), allocatable :: d2Zdr2dth
real, private, dimension(:), allocatable :: d2gpsidr2
real, private, dimension(:), allocatable :: dcrossdr
real, private, dimension(:), allocatable :: dcvdriftdrho
real, private, dimension(:), allocatable :: dgbdriftdrho
real, private, dimension(:), allocatable :: dgds2dr
real, private, dimension(:), allocatable :: dgds21dr
real, private, dimension(:), allocatable :: dgds22dr
real, private, dimension(:), allocatable :: dgr2dr
real, private, dimension(:), allocatable :: dgpsi2dr
real, private, dimension(:), allocatable :: dgrgt
real, private, dimension(:), allocatable :: dgt2
real, private, dimension(:), allocatable :: dgagr
real, private, dimension(:), allocatable :: dgagt
real, private, dimension(:), allocatable :: dga2
real, private, dimension(:, :), allocatable :: Rr
real, private, dimension(:, :), allocatable :: Zr
real, private, dimension(:), allocatable :: jacrho
real, private, dimension(:), allocatable :: delthet
real, private, dimension(:), allocatable :: djacdrho
real, private, dimension(:), allocatable :: djacrdrho
real, private, dimension(:), allocatable :: d2jacdr2
real, private, dimension(:), allocatable :: dRdrho
real, private, dimension(:), allocatable :: dZdrho
real, private, dimension(:), allocatable :: dRdth
real, private, dimension(:), allocatable :: dZdth
real, private, dimension(:), allocatable :: d2R
real, private, dimension(:), allocatable :: d2Z
type(flux_surface_type), public :: local
logical, private :: defaults_initialized = .false.

Functions

private function Rpos(r, theta, j)

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: r
real, intent(in) :: theta
integer, intent(in) :: j

Return Value real

private function Zpos(r, theta, j)

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: r
real, intent(in) :: theta
integer, intent(in) :: j

Return Value real

private function mod2pi(theta)

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: theta

Return Value real

private function round(val, n)

Arguments

Type IntentOptional Attributes Name
real :: val
integer :: n

Return Value real


Subroutines

public subroutine init_local_defaults()

Arguments

None

public subroutine read_local_parameters(nzed, nzgrid, local_out)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nzed
integer, intent(in) :: nzgrid
type(flux_surface_type), intent(out) :: local_out

public subroutine communicate_parameters_multibox(surf, drl, drr)

Arguments

Type IntentOptional Attributes Name
type(flux_surface_type), intent(inout) :: surf
real, intent(in), optional :: drl
real, intent(in), optional :: drr

public subroutine get_local_geo(nzed, nzgrid, zed_in, zed_equal_arc, dpsipdrho_out, dpsipdrho_psi0_out, dIdrho_out, grho_out, bmag_out, bmag_psi0_out, gds2_out, gds21_out, gds22_out, gds23_out, gds24_out, gradpar_out, gbdrift0_out, gbdrift_out, cvdrift0_out, cvdrift_out, dBdrho_out, d2Bdrdth_out, dgradpardrho_out, btor_out, rmajor_out, dcvdrift0drho_out, dcvdriftdrho_out, dgbdrift0drho_out, dgbdriftdrho_out, dgds2dr_out, dgds21dr_out, dgds22dr_out, djacdrho_out)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nzed
integer, intent(in) :: nzgrid
real, intent(in), dimension(-nzgrid:) :: zed_in
logical, intent(in) :: zed_equal_arc
real, intent(out) :: dpsipdrho_out
real, intent(out) :: dpsipdrho_psi0_out
real, intent(out) :: dIdrho_out
real, intent(out), dimension(-nzgrid:) :: grho_out
real, intent(out), dimension(-nzgrid:) :: bmag_out
real, intent(out), dimension(-nzgrid:) :: bmag_psi0_out
real, intent(out), dimension(-nzgrid:) :: gds2_out
real, intent(out), dimension(-nzgrid:) :: gds21_out
real, intent(out), dimension(-nzgrid:) :: gds22_out
real, intent(out), dimension(-nzgrid:) :: gds23_out
real, intent(out), dimension(-nzgrid:) :: gds24_out
real, intent(out), dimension(-nzgrid:) :: gradpar_out
real, intent(out), dimension(-nzgrid:) :: gbdrift0_out
real, intent(out), dimension(-nzgrid:) :: gbdrift_out
real, intent(out), dimension(-nzgrid:) :: cvdrift0_out
real, intent(out), dimension(-nzgrid:) :: cvdrift_out
real, intent(out), dimension(-nzgrid:) :: dBdrho_out
real, intent(out), dimension(-nzgrid:) :: d2Bdrdth_out
real, intent(out), dimension(-nzgrid:) :: dgradpardrho_out
real, intent(out), dimension(-nzgrid:) :: btor_out
real, intent(out), dimension(-nzgrid:) :: rmajor_out
real, intent(out), dimension(-nzgrid:) :: dcvdrift0drho_out
real, intent(out), dimension(-nzgrid:) :: dcvdriftdrho_out
real, intent(out), dimension(-nzgrid:) :: dgbdrift0drho_out
real, intent(out), dimension(-nzgrid:) :: dgbdriftdrho_out
real, intent(out), dimension(-nzgrid:) :: dgds2dr_out
real, intent(out), dimension(-nzgrid:) :: dgds21dr_out
real, intent(out), dimension(-nzgrid:) :: dgds22dr_out
real, intent(out), dimension(-nzgrid:) :: djacdrho_out

private subroutine allocate_arrays(nr, nz)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nr
integer, intent(in) :: nz

private subroutine deallocate_arrays()

Arguments

None

public subroutine finish_local_geo()

Arguments

None

private subroutine get_drho(f, df)

Arguments

Type IntentOptional Attributes Name
real, intent(in), dimension(:, -nz:) :: f
real, intent(out), dimension(-nz:) :: df

private subroutine get_d2dthet2(f, d2f)

Arguments

Type IntentOptional Attributes Name
real, intent(in), dimension(-nz:) :: f
real, intent(out), dimension(-nz:) :: d2f

private subroutine get_dthet(f, df)

Arguments

Type IntentOptional Attributes Name
real, intent(in), dimension(-nz:) :: f
real, intent(out), dimension(-nz:) :: df

private subroutine get_jacrho()

Arguments

None

private subroutine get_gradrho(dpsipdrho, grho)

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: dpsipdrho
real, intent(out), dimension(-nz:) :: grho

private subroutine get_dIdrho(dpsipdrho, grho, dIdrho)

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: dpsipdrho
real, intent(in), dimension(-nz:) :: grho
real, intent(out) :: dIdrho

private subroutine get_djacdrho(dpsipdrho, dIdrho, grho)

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: dpsipdrho
real, intent(in) :: dIdrho
real, intent(in), dimension(-nz:) :: grho

private subroutine get_d2RZdr2()

Arguments

None

private subroutine get_dgr2dr(dpsipdrho, grho)

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: dpsipdrho
real, intent(in), dimension(-nz:) :: grho

private subroutine get_graddotgrad(dpsipdrho, grho)

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: dpsipdrho
real, intent(in), dimension(-nz:) :: grho

private subroutine get_gds(gds2, gds21, gds22, gds23, gds24)

Arguments

Type IntentOptional Attributes Name
real, intent(out), dimension(-nz:) :: gds2
real, intent(out), dimension(-nz:) :: gds21
real, intent(out), dimension(-nz:) :: gds22
real, intent(out), dimension(-nz:) :: gds23
real, intent(out), dimension(-nz:) :: gds24

private subroutine get_dBdrho(bmag, dIdrho)

Arguments

Type IntentOptional Attributes Name
real, intent(in), dimension(-nz:) :: bmag
real, intent(in) :: dIdrho

private subroutine get_varthet(dpsipdrho)

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: dpsipdrho

private subroutine get_dvarthdr(dpsipdrho, dIdrho)

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: dpsipdrho
real, intent(in) :: dIdrho

private subroutine get_d2Idr2_d2jacdr2(grho, dIdrho)

Arguments

Type IntentOptional Attributes Name
real, intent(in), dimension(-nz:) :: grho
real, intent(in) :: dIdrho

private subroutine get_d2varthdr2(dpsipdrho, dIdrho)

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: dpsipdrho
real, intent(in) :: dIdrho

private subroutine get_d2Bdr2(bmag, dIdrho)

Arguments

Type IntentOptional Attributes Name
real, intent(in), dimension(-nz:) :: bmag
real, intent(in) :: dIdrho

private subroutine get_dcrossdr(dpsipdrho, dIdrho, grho)

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: dpsipdrho
real, intent(in) :: dIdrho
real, intent(in), dimension(-nz:) :: grho

private subroutine theta_integrate(integrand, integral)

Arguments

Type IntentOptional Attributes Name
real, intent(in), dimension(-nz2pi:) :: integrand
real, intent(out) :: integral

private subroutine theta_integrate_indef(integrand, integral)

Arguments

Type IntentOptional Attributes Name
real, intent(in), dimension(-nz:) :: integrand
real, intent(out), dimension(-nz:) :: integral