geometry Module



Variables

Type Visibility Attributes Name Initial
type(flux_surface_type), public :: geo_surf
real, public :: grad_x_grad_y_end
real, public :: clebsch_factor
real, public :: aref
real, public :: bref
real, public :: dxdpsi
real, public :: dydalpha
real, private :: dqdrho
real, public :: dIdrho
real, public :: grho_norm
real, public :: drhodpsi
real, public :: drhodpsip
real, public :: drhodpsip_psi0
real, private :: shat
real, private :: qinp
real, public :: exb_nonlin_fac
real, public :: exb_nonlin_fac_p
real, public :: flux_fac
real, public :: b_dot_grad_z_averaged_eqarc
real, public :: dzetadz
real, public :: twist_and_shift_geo_fac
real, public :: gfac
real, public, dimension(:), allocatable :: zed_eqarc
real, public, dimension(:), allocatable :: alpha
real, public, dimension(:), allocatable :: gradpar
real, public, dimension(:), allocatable :: b_dot_grad_z_averaged
real, public, dimension(:), allocatable :: dBdrho
real, public, dimension(:), allocatable :: d2Bdrdth
real, public, dimension(:), allocatable :: dgradpardrho
real, public, dimension(:), allocatable :: btor
real, public, dimension(:), allocatable :: Rmajor
real, public, dimension(:, :), allocatable :: bmag
real, public, dimension(:, :), allocatable :: bmag_psi0
real, public, dimension(:, :), allocatable :: dbdzed
real, public, dimension(:, :), allocatable :: cvdrift
real, public, dimension(:, :), allocatable :: cvdrift0
real, public, dimension(:, :), allocatable :: gbdrift
real, public, dimension(:, :), allocatable :: gbdrift0
real, public, dimension(:, :), allocatable :: dcvdriftdrho
real, public, dimension(:, :), allocatable :: dcvdrift0drho
real, public, dimension(:, :), allocatable :: dgbdriftdrho
real, public, dimension(:, :), allocatable :: dgbdrift0drho
real, public, dimension(:, :), allocatable :: gds2
real, public, dimension(:, :), allocatable :: gds21
real, public, dimension(:, :), allocatable :: gds22
real, public, dimension(:, :), allocatable :: gds23
real, public, dimension(:, :), allocatable :: gds24
real, public, dimension(:, :), allocatable :: gds25
real, public, dimension(:, :), allocatable :: gds26
real, public, dimension(:, :), allocatable :: dgds2dr
real, public, dimension(:, :), allocatable :: dgds21dr
real, public, dimension(:, :), allocatable :: dgds22dr
real, public, dimension(:, :), allocatable :: x_displacement_fac
real, public, dimension(:, :), allocatable :: jacob
real, public, dimension(:, :), allocatable :: djacdrho
real, public, dimension(:, :), allocatable :: grho
real, public, dimension(:, :), allocatable :: grad_x
real, public, dimension(:, :), allocatable :: dl_over_b
real, public, dimension(:, :), allocatable :: d_dl_over_b_drho
real, public, dimension(:, :), allocatable :: theta_vmec
real, public, dimension(:, :), allocatable :: zeta
real, public, dimension(:, :, :), allocatable :: dVolume
real, public, dimension(:, :), allocatable :: b_dot_grad_z
real, public, dimension(:, :), allocatable :: gradzeta_gradx_R2overB2
real, public, dimension(:, :), allocatable :: gradzeta_grady_R2overB2
real, public, dimension(:, :), allocatable :: b_dot_grad_zeta_RR
integer, private :: sign_torflux
integer, public :: geo_option_switch
integer, private, parameter :: geo_option_local = 1
integer, private, parameter :: geo_option_inputprof = 2
integer, public, parameter :: geo_option_vmec = 3
integer, private, parameter :: geo_option_multibox = 4
integer, private, parameter :: geo_option_zpinch = 5
logical, private :: overwrite_bmag
logical, private :: overwrite_b_dot_grad_zeta
logical, private :: overwrite_geometry
logical, private :: overwrite_gds2
logical, private :: overwrite_gds21
logical, private :: overwrite_gds22
logical, private :: overwrite_gds23
logical, private :: overwrite_gds24
logical, private :: overwrite_gbdrift
logical, private :: overwrite_cvdrift
logical, private :: overwrite_gbdrift0
logical, public :: q_as_x
character(len=100), private :: geo_file
logical, private :: geoinit = .false.
logical, private :: set_bmag_const

Subroutines

public subroutine init_geometry(nalpha, naky)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nalpha
integer, intent(in) :: naky

private subroutine get_geometry_arrays_from_VMEC(nalpha, naky)

Calculate = dkx/dky * jtwist Minus its sign gives the direction of the shift in kx for the twist-and-shift BC Note that the default BC are the unconnected BC in the module

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nalpha
integer, intent(in) :: naky

private subroutine get_geometry_arrays_from_Miller(nalpha)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nalpha

private subroutine get_geometry_arrays_from_zpinch(nalpha)

b_dot_grad_z is the alpha-dependent b . grad z, and gradpar is the constant-in-alpha part of it. for a z-pinch, b_dot_grad_z is independent of alpha.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nalpha

private subroutine overwrite_selected_geometric_coefficients(nalpha)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nalpha

private subroutine set_ffs_geo_coefs_constant(nalpha)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nalpha

private subroutine set_coef_constant(coef, nalpha)

Arguments

Type IntentOptional Attributes Name
real, intent(inout), dimension(:, -nzgrid:) :: coef
integer, intent(in) :: nalpha

private subroutine allocate_arrays(nalpha, nzgrid)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nalpha
integer, intent(in) :: nzgrid

private subroutine read_parameters()

Arguments

None

private subroutine broadcast_arrays()

Arguments

None

public subroutine communicate_geo_multibox(l_edge, r_edge)

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: l_edge
real, intent(in) :: r_edge

private subroutine get_dzed(nz, dz, f, df)

Arguments

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

private subroutine get_b_dot_grad_z_averaged_eqarc(gp, z, dz, gp_eqarc)

Arguments

Type IntentOptional Attributes Name
real, intent(in), dimension(-nzgrid:) :: gp
real, intent(in), dimension(-nzgrid:) :: z
real, intent(in), dimension(-nzgrid:) :: dz
real, intent(out) :: gp_eqarc

private subroutine get_zed_eqarc(gp, dz, z, gp_eqarc, z_eqarc)

Arguments

Type IntentOptional Attributes Name
real, intent(in), dimension(-nzgrid:) :: gp
real, intent(in), dimension(-nzgrid:) :: dz
real, intent(in), dimension(-nzgrid:) :: z
real, intent(in) :: gp_eqarc
real, intent(out), dimension(-nzgrid:) :: z_eqarc

private subroutine integrate_zed(dz, f, intf)

Arguments

Type IntentOptional Attributes Name
real, intent(in), dimension(-nzgrid:) :: dz
real, intent(in), dimension(-nzgrid:) :: f
real, intent(out) :: intf

public subroutine get_x_to_rho(llim, x_in, rho_out)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: llim
real, intent(in), dimension(:) :: x_in
real, intent(out), dimension(:) :: rho_out

private subroutine write_geometric_coefficients(nalpha)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nalpha

public subroutine finish_init_geometry()

Arguments

None

public subroutine finish_geometry()

Arguments

None