model_apar_shift_m Module

Implementation of apar_shift model



Contents


Derived Types

type, public ::  apar_shift_t

Type containing necessary objects and subroutines for apar_shift

Components

Type Visibility Attributes Name Initial
type(variable_t), public :: apar_shift

Background shift in apar

type(snapshot_t), public :: snaps_apar_shift

Snapshots for apar_shift

Type-Bound Procedures

procedure , public :: init => initialise_apar_shift Subroutine
procedure , public :: eval_fluct => evaluate_apar_fluct Subroutine
procedure , public :: write_snaps Subroutine
procedure , public :: timestep => timestep_apar_shift Subroutine

Subroutines

public subroutine initialise_apar_shift(self, comm_handler, equi, mesh_cano, mesh_stag, apar, tau, isnaps_apar_shift, apar_shift_firsts, dapar_shift_firsts)

Initialise apar shift variable, snapshot, and timestepper

Arguments

Type IntentOptional Attributes Name
class(apar_shift_t), intent(inout) :: self

Instance of class

type(comm_handler_t), intent(in) :: comm_handler

Communicators

class(equilibrium_t), intent(inout) :: equi

Equilibrium

type(mesh_cart_t), intent(inout) :: mesh_cano

Mesh (canonical) within poloidal plane

type(mesh_cart_t), intent(inout) :: mesh_stag

Mesh (staggered) within poloidal plane

type(variable_t), intent(in) :: apar

Parallel electromagnetic potential

real(kind=GP), intent(in) :: tau

Time

integer, intent(out) :: isnaps_apar_shift

Snapshot of apar shift model

real(kind=GP), intent(in), optional, dimension(mesh_stag%get_n_points(), tstep_order-1) :: apar_shift_firsts

Initial storage of apar_shift at previous timesteps to achieve high order accuracy

real(kind=GP), intent(in), optional, dimension(mesh_stag%get_n_points(), tstep_order-1) :: dapar_shift_firsts

Initial storage of dapar_shift at previous timesteps to achieve high order accuracy

public subroutine evaluate_apar_fluct(self, comm_handler, equi, mesh_stag, apar, apar_fluct)

Evaluate the fluctuating part of parallel electromagnetic potential

Arguments

Type IntentOptional Attributes Name
class(apar_shift_t), intent(inout) :: self

Instance of class

type(comm_handler_t), intent(in) :: comm_handler

Communicators

class(equilibrium_t), intent(inout) :: equi

Equilibrium

type(mesh_cart_t), intent(inout) :: mesh_stag

Mesh (staggered) within poloidal plane

type(variable_t), intent(in) :: apar

Full parallel electromagnetic potential returned from Ohm's law

type(variable_t), intent(inout) :: apar_fluct

Fluctuating part of apar to be used by flutter terms

public subroutine write_snaps(self, comm_handler, isnaps_apar_shift, tau)

Writes apar_shift to snapshots

Arguments

Type IntentOptional Attributes Name
class(apar_shift_t), intent(inout) :: self

Instance of class

type(comm_handler_t), intent(in) :: comm_handler

Communicators

integer, intent(in) :: isnaps_apar_shift

Snapshot of apar shift model

real(kind=GP), intent(in) :: tau

Time

public subroutine timestep_apar_shift(self, comm_handler, mesh_stag, tau, apar)

Advances apar_shift from t to t+1

Arguments

Type IntentOptional Attributes Name
class(apar_shift_t), intent(inout) :: self

Instance of class

type(comm_handler_t), intent(in) :: comm_handler

Communicators

type(mesh_cart_t), intent(in) :: mesh_stag

Mesh (staggered) within poloidal plane

real(kind=GP), intent(in) :: tau

Time

type(variable_t), intent(in) :: apar

Parallel electromagnetic potential at timestep t