mod_arrays Module

Module to handle imported numerical equilibria. Contains subroutines to retrieve the equilibrium arrays from a file specified in the parfile.



Contents


Variables

TypeVisibilityAttributesNameInitial
integer, private :: file_id =123
integer, private :: num_var =10
real(kind=dp), private, allocatable:: input(:,:)
real(kind=dp), private, allocatable:: interp(:,:)
real(kind=dp), private, allocatable:: d_interp(:,:)
real(kind=dp), private, allocatable:: dd_interp(:,:)

Subroutines

public subroutine import_equilibrium_data(settings, grid)

Imports arrays from the file specified by the parfile parameter input_file. To be called in the equilibrium submodule.

Arguments

TypeIntentOptionalAttributesName
type(settings_t), intent(inout) :: settings
type(grid_t), intent(inout) :: grid

private subroutine interpolate_and_derive()

Arguments

None

public subroutine lookup_equilibrium_value(type, x, derivative, out)

Looks up the equilibrium value for given quantity and position.

Arguments

TypeIntentOptionalAttributesName
character(len=*), intent(in) :: type
real(kind=dp), intent(in) :: x
integer, intent(in) :: derivative
real(kind=dp), intent(out) :: out

private subroutine tag_to_index(tag, index)

Translates equilibrium name to index.

Arguments

TypeIntentOptionalAttributesName
character(len=*), intent(in) :: tag
integer, intent(out) :: index

public subroutine deallocate_input()

Deallocates this module's arrays. Called in main as part of cleanup.

Arguments

None