fields_implicit Module

FIXME : Add documentation


Contents


Variables

Type Visibility Attributes Name Initial
type(field_matrix_type), private, dimension (:), allocatable :: aminv
logical, public :: skip_initialisation = .false.

A variable to help with running benchmarks... do not set true unless you know what you are doing. If true, the response matrix will not be initialised and set to zero. The results of any simulation will be garbage

integer, private :: nfield
integer, private :: nidx
logical, private :: initialized = .false.
logical, private :: linked = .false.
logical, public :: field_subgath
logical, public :: dump_response = .false.
logical, public :: read_response = .false.
integer, private, dimension(:), allocatable :: recvcnts
integer, private, dimension(:), allocatable :: displs

Derived Types

type, private ::  dcell_type

FIXME : Add documentation

Components

Type Visibility Attributes Name Initial
complex, public, dimension(:), pointer :: supercell => null()

type, private ::  field_matrix_type

FIXME : Add documentation

Components

Type Visibility Attributes Name Initial
type(dcell_type), public, dimension (:), pointer :: dcell => null()

Subroutines

public subroutine init_fields_implicit()

FIXME : Add documentation

Arguments

None

public subroutine init_allfields_implicit(gf_lo)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
logical, optional :: gf_lo

private subroutine get_field_vector(fl, phi, apar, bpar)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
complex, intent(out), dimension (:,:,:) :: fl
complex, intent(in), dimension (-ntgrid:,:,:) :: phi
complex, intent(in), dimension (-ntgrid:,:,:) :: apar
complex, intent(in), dimension (-ntgrid:,:,:) :: bpar

private subroutine get_field_solution(u)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
complex, intent(in), dimension (0:) :: u

private subroutine getfield(phi, apar, bpar)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
complex, intent(in), dimension (-ntgrid:,:,:) :: phi
complex, intent(in), dimension (-ntgrid:,:,:) :: apar
complex, intent(in), dimension (-ntgrid:,:,:) :: bpar

public subroutine advance_implicit(istep, remove_zonal_flows_switch)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: istep
logical, intent(in) :: remove_zonal_flows_switch

public subroutine remove_zonal_flows()

FIXME : Add documentation

Arguments

None

private subroutine fieldline_average_phi(phi_in, phi_average, ik_only)

This generates a field line average of phi_in and writes it to phi_average. If ik_only is supplied, it will only calculate the field line average for that ky, leaving the rest of phi_avg unchanged. EGH

Read more…

Arguments

Type IntentOptional Attributes Name
complex, intent(in), dimension (-ntgrid:,:,:) :: phi_in
complex, intent(out), dimension (-ntgrid:,:,:) :: phi_average
integer, intent(in), optional :: ik_only

public subroutine reset_init()

FIXME : Add documentation

Arguments

None

private subroutine init_response_matrix()

FIXME : Add documentation
Pretty sure this barrier is not needed call barrier if (proc0) write(,) 'beginning class ',i,' with size ',nidxN_class(i) Allocate matrix am. First dimension is basically theta along the entire connected domain for each field. Second dimension is the local section of the M_class(i)N_Class(i)(2ntgrid+1)nfield compound domain. Clearly this will allocate (am(nidxN_class(i), f_lo(i)%llim_proc:f_lo(i)%ulim_alloc)) Do we need to zero all 8 arrays on every loop? This can be more expensive than might think. am = 0.0 call init_inverse_matrix (am, i) Free memory deallocate (am) end do

Read more…

Arguments

None

private subroutine init_response_row(ig, ifield, am, ic, n)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: ig
integer, intent(in) :: ifield
complex, intent(inout), dimension(:,f_lo(ic)%llim_proc:) :: am
integer, intent(in) :: ic
integer, intent(in) :: n

private subroutine init_inverse_matrix(am, ic)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
complex, intent(inout), dimension(:,f_lo(ic)%llim_proc:) :: am
integer, intent(in) :: ic

private subroutine finish_fields_layouts()

FIXME : Add documentation

Arguments

None

private subroutine kt2ki(i, n, ik, it)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
integer, intent(out) :: i
integer, intent(out) :: n
integer, intent(in) :: ik
integer, intent(in) :: it

public subroutine dump_response_to_file_imp(suffix)

A routine to dump the current response matrix to file

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in), optional :: suffix

private subroutine read_response_from_file_imp(could_read, suffix)

A routine to read the response matrix from file and populate the implicit response storage, note we also allocate the response storage objects DD>It may be anticipated that we need to fix the boundary points

Arguments

Type IntentOptional Attributes Name
logical, intent(out) :: could_read
character(len=*), intent(in), optional :: suffix

private subroutine alloc_response_objects()

A subroutine to allocate the response matrix storage objects

Arguments

None