make_fieldline Module


Uses

  • module~~make_fieldline~~UsesGraph module~make_fieldline make_fieldline module~constants constants module~make_fieldline->module~constants module~field_base field_base module~make_fieldline->module~field_base module~fieldline_mod fieldline_mod module~make_fieldline->module~fieldline_mod module~field_base->module~constants module~fieldline_mod->module~constants

Used by

  • module~~make_fieldline~~UsedByGraph module~make_fieldline make_fieldline program~main main program~main->module~make_fieldline

Derived Types

type, public ::  maxima_t

Components

Type Visibility Attributes Name Initial
integer, public :: n
real(kind=dp), public, dimension(:), allocatable :: phi
real(kind=dp), public, dimension(:), allocatable :: B
real(kind=dp), public, dimension(:), allocatable :: B_error
real(kind=dp), public, dimension(:), allocatable :: phi_error

Functions

public function is_not_integer(x, tol)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: x
real(kind=dp), intent(in) :: tol

Return Value logical

public function get_global_B_max(fieldlines) result(global_B_max)

Arguments

Type IntentOptional Attributes Name
type(fieldline_t), intent(in), dimension(:) :: fieldlines

Return Value real(kind=dp)


Subroutines

public subroutine make_flock_of_fieldlines(flock, max_n_fieldlines, iota, field, M_pol, N_tor, nfp, split_maxima)

Build a flock of field lines spanning the region between neighbouring maxima contours centered around the minima contours through the field origin.

Read more…

Arguments

Type IntentOptional Attributes Name
type(flock_of_fieldlines_t), intent(inout) :: flock
integer, intent(in) :: max_n_fieldlines

upper bound on number of field lines

real(kind=dp), intent(in) :: iota

rotational transform of field lines

class(field_t), intent(in) :: field

magnetic field representation in Boozer coordinates

real(kind=dp), intent(in) :: M_pol

poloidal helicity mode number; may be negative

real(kind=dp), intent(in) :: N_tor

toroidal helicity mode number; must equal nfp when nonzero

real(kind=dp), intent(in) :: nfp

number of field periods; must be positive integer

integer, intent(out), optional :: split_maxima

1 if a split of maxima contours was detected

public subroutine make_flock_from_labels(flock, xi_0, iota, field, M_pol, N_tor, nfp, split_maxima)

Arguments

Type IntentOptional Attributes Name
type(flock_of_fieldlines_t), intent(inout) :: flock
real(kind=dp), intent(in), dimension(:) :: xi_0
real(kind=dp), intent(in) :: iota
class(field_t), intent(in) :: field
real(kind=dp), intent(in) :: M_pol
real(kind=dp), intent(in) :: N_tor
real(kind=dp), intent(in) :: nfp
integer, intent(out), optional :: split_maxima

public subroutine find_maxima_along_fieldline(field, fieldline, interval, maxima)

Arguments

Type IntentOptional Attributes Name
class(field_t), intent(in) :: field
type(fieldline_t), intent(inout) :: fieldline
real(kind=dp), intent(in) :: interval(2)
type(maxima_t), intent(out) :: maxima

public subroutine pick_maximum_on_each_side(maxima, phi_0, symmetry_violation, phi_max, phi_max_error)

Pick the biggest maximum on each side of phi_0, with ties broken by proximity to phi_0 to respect stellarator symmetry.

Arguments

Type IntentOptional Attributes Name
type(maxima_t), intent(in) :: maxima
real(kind=dp), intent(in) :: phi_0
real(kind=dp), intent(in) :: symmetry_violation
real(kind=dp), intent(out), dimension(2) :: phi_max
real(kind=dp), intent(out), dimension(2) :: phi_max_error