gs2_heating Module

FIXME : Add documentation

GGH


Contents


Interfaces

public interface init_htype

Allocate the array components of heating_diagnostics

FIXME: Could be replaced with elemental constructor

  • private subroutine init_htype_0(h, nspec)

    FIXME : Add documentation

    Arguments

    Type IntentOptional Attributes Name
    type(heating_diagnostics), intent(inout) :: h
    integer, intent(in) :: nspec
  • private subroutine init_htype_1(h, nspec)

    FIXME : Add documentation

    Arguments

    Type IntentOptional Attributes Name
    type(heating_diagnostics), intent(inout), dimension(:) :: h
    integer, intent(in) :: nspec
  • private subroutine init_htype_2(h, nspec)

    FIXME : Add documentation

    Arguments

    Type IntentOptional Attributes Name
    type(heating_diagnostics), intent(inout), dimension(:,:) :: h
    integer, intent(in) :: nspec
  • private subroutine init_htype_3(h, nspec)

    FIXME : Add documentation

    Arguments

    Type IntentOptional Attributes Name
    type(heating_diagnostics), intent(inout), dimension(:,:,:) :: h
    integer, intent(in) :: nspec

public interface zero_htype

  • private subroutine zero_htype_0(h)

    FIXME : Add documentation

    Arguments

    Type IntentOptional Attributes Name
    type(heating_diagnostics), intent(inout) :: h
  • private subroutine zero_htype_1(h)

    FIXME : Add documentation

    Arguments

    Type IntentOptional Attributes Name
    type(heating_diagnostics), intent(inout), dimension(:) :: h
  • private subroutine zero_htype_2(h)

    FIXME : Add documentation

    Arguments

    Type IntentOptional Attributes Name
    type(heating_diagnostics), intent(inout), dimension(:,:) :: h
  • private subroutine zero_htype_3(h)

    FIXME : Add documentation

    Arguments

    Type IntentOptional Attributes Name
    type(heating_diagnostics), intent(inout), dimension(:,:,:) :: h

public interface del_htype

  • private subroutine del_htype_0(h)

    FIXME : Add documentation

    Arguments

    Type IntentOptional Attributes Name
    type(heating_diagnostics), intent(inout) :: h
  • private subroutine del_htype_1(h)

    FIXME : Add documentation

    Arguments

    Type IntentOptional Attributes Name
    type(heating_diagnostics), intent(inout), dimension(:) :: h
  • private subroutine del_htype_2(h)

    FIXME : Add documentation

    Arguments

    Type IntentOptional Attributes Name
    type(heating_diagnostics), intent(inout), dimension(:,:) :: h
  • private subroutine del_htype_3(h)

    FIXME : Add documentation

    Arguments

    Type IntentOptional Attributes Name
    type(heating_diagnostics), intent(inout), dimension(:,:,:) :: h

public interface init_dvtype

  • private subroutine init_dvtype_0(dv, nspec)

    FIXME : Add documentation

    Arguments

    Type IntentOptional Attributes Name
    type(dens_vel_diagnostics), intent(inout) :: dv
    integer, intent(in) :: nspec
  • private subroutine init_dvtype_1(dv, nspec)

    FIXME : Add documentation

    Arguments

    Type IntentOptional Attributes Name
    type(dens_vel_diagnostics), intent(inout), dimension(:) :: dv
    integer, intent(in) :: nspec
  • private subroutine init_dvtype_2(dv, nspec)

    FIXME : Add documentation

    Arguments

    Type IntentOptional Attributes Name
    type(dens_vel_diagnostics), intent(inout), dimension(:,:) :: dv
    integer, intent(in) :: nspec
  • private subroutine init_dvtype_3(dv, nspec)

    FIXME : Add documentation

    Arguments

    Type IntentOptional Attributes Name
    type(dens_vel_diagnostics), intent(inout), dimension(:,:,:) :: dv
    integer, intent(in) :: nspec

public interface zero_dvtype

  • private subroutine zero_dvtype_0(dv)

    FIXME : Add documentation

    Arguments

    Type IntentOptional Attributes Name
    type(dens_vel_diagnostics), intent(inout) :: dv
  • private subroutine zero_dvtype_1(dv)

    FIXME : Add documentation

    Arguments

    Type IntentOptional Attributes Name
    type(dens_vel_diagnostics), intent(inout), dimension(:) :: dv
  • private subroutine zero_dvtype_2(dv)

    FIXME : Add documentation

    Arguments

    Type IntentOptional Attributes Name
    type(dens_vel_diagnostics), intent(inout), dimension(:,:) :: dv
  • private subroutine zero_dvtype_3(dv)

    FIXME : Add documentation

    Arguments

    Type IntentOptional Attributes Name
    type(dens_vel_diagnostics), intent(inout), dimension(:,:,:) :: dv

public interface del_dvtype

  • private subroutine del_dvtype_0(dv)

    FIXME : Add documentation

    Arguments

    Type IntentOptional Attributes Name
    type(dens_vel_diagnostics), intent(inout) :: dv
  • private subroutine del_dvtype_1(dv)

    FIXME : Add documentation

    Arguments

    Type IntentOptional Attributes Name
    type(dens_vel_diagnostics), intent(inout), dimension(:) :: dv
  • private subroutine del_dvtype_2(dv)

    FIXME : Add documentation

    Arguments

    Type IntentOptional Attributes Name
    type(dens_vel_diagnostics), intent(inout), dimension(:,:) :: dv
  • private subroutine del_dvtype_3(dv)

    FIXME : Add documentation

    Arguments

    Type IntentOptional Attributes Name
    type(dens_vel_diagnostics), intent(inout), dimension(:,:,:) :: dv

Derived Types

type, public ::  heating_diagnostics

FIXME : Add documentation

Components

Type Visibility Attributes Name Initial
real, public :: energy
real, public :: energy_dot
real, public :: antenna
real, public :: eapar
real, public :: ebpar
real, public, dimension(:), allocatable :: delfs2
real, public, dimension(:), allocatable :: hs2
real, public, dimension(:), allocatable :: phis2
real, public, dimension(:), allocatable :: hypervisc
real, public, dimension(:), allocatable :: hyperres
real, public, dimension(:), allocatable :: hypercoll
real, public, dimension(:), allocatable :: collisions
real, public, dimension(:), allocatable :: imp_colls
real, public, dimension(:), allocatable :: gradients
real, public, dimension(:), allocatable :: heating

type, public ::  dens_vel_diagnostics

Density-velocity perturbations

Components

Type Visibility Attributes Name Initial
real, public, dimension(:), allocatable :: dvpar
real, public, dimension(:), allocatable :: dvperp
real, public, dimension(:), allocatable :: dn

Functions

private pure function fdot(fl, fr, fnewl, fnewr, dtinv)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
complex, intent(in) :: fl
complex, intent(in) :: fr
complex, intent(in) :: fnewl
complex, intent(in) :: fnewr
real, intent(in) :: dtinv

Return Value complex

private pure function favg(fl, fr, fnewl, fnewr)

Construct time and space-centered quantities (should use actual bakdif and fexpr values?)

Arguments

Type IntentOptional Attributes Name
complex, intent(in) :: fl
complex, intent(in) :: fr
complex, intent(in) :: fnewl
complex, intent(in) :: fnewr

Return Value complex

private pure function fdot_t(f, fnew, dtinv)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
complex, intent(in) :: f
complex, intent(in) :: fnew
real, intent(in) :: dtinv

Return Value complex

private pure function favg_x(fl, fr)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
complex, intent(in) :: fl
complex, intent(in) :: fr

Return Value complex


Subroutines

private subroutine init_htype_0(h, nspec)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(heating_diagnostics), intent(inout) :: h
integer, intent(in) :: nspec

private subroutine init_htype_1(h, nspec)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(heating_diagnostics), intent(inout), dimension(:) :: h
integer, intent(in) :: nspec

private subroutine init_htype_2(h, nspec)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(heating_diagnostics), intent(inout), dimension(:,:) :: h
integer, intent(in) :: nspec

private subroutine init_htype_3(h, nspec)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(heating_diagnostics), intent(inout), dimension(:,:,:) :: h
integer, intent(in) :: nspec

private subroutine zero_htype_0(h)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(heating_diagnostics), intent(inout) :: h

private subroutine zero_htype_1(h)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(heating_diagnostics), intent(inout), dimension(:) :: h

private subroutine zero_htype_2(h)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(heating_diagnostics), intent(inout), dimension(:,:) :: h

private subroutine zero_htype_3(h)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(heating_diagnostics), intent(inout), dimension(:,:,:) :: h

private subroutine del_htype_0(h)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(heating_diagnostics), intent(inout) :: h

private subroutine del_htype_1(h)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(heating_diagnostics), intent(inout), dimension(:) :: h

private subroutine del_htype_2(h)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(heating_diagnostics), intent(inout), dimension(:,:) :: h

private subroutine del_htype_3(h)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(heating_diagnostics), intent(inout), dimension(:,:,:) :: h

public subroutine avg_h(h, h_hist, istep, navg)

Calculate the average of various heating quantities

Arguments

Type IntentOptional Attributes Name
type(heating_diagnostics), intent(inout) :: h

The heating diagnostics at the current timestep

type(heating_diagnostics), intent(inout), dimension (0:) :: h_hist

The last navg timesteps of heating diagnostics

integer, intent(in) :: istep
integer, intent(in) :: navg

public subroutine avg_hk(hk, hk_hist, istep, navg)

Calculate the average of various heating quantities as a function of

Arguments

Type IntentOptional Attributes Name
type(heating_diagnostics), intent(inout), dimension(:,:) :: hk

Heating diagnostics as a function of at the current timestep

type(heating_diagnostics), intent(inout), dimension(:,:,0:) :: hk_hist

Heating diagnostics as a function of over the last navg timesteps

integer, intent(in) :: istep
integer, intent(in) :: navg

public subroutine hk_repack(hk, i, tmp)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(heating_diagnostics), intent(in), dimension (:,:) :: hk
integer, intent(in) :: i
real, intent(out), dimension(:,:,:) :: tmp

private subroutine init_dvtype_0(dv, nspec)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(dens_vel_diagnostics), intent(inout) :: dv
integer, intent(in) :: nspec

private subroutine init_dvtype_1(dv, nspec)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(dens_vel_diagnostics), intent(inout), dimension(:) :: dv
integer, intent(in) :: nspec

private subroutine init_dvtype_2(dv, nspec)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(dens_vel_diagnostics), intent(inout), dimension(:,:) :: dv
integer, intent(in) :: nspec

private subroutine init_dvtype_3(dv, nspec)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(dens_vel_diagnostics), intent(inout), dimension(:,:,:) :: dv
integer, intent(in) :: nspec

private subroutine zero_dvtype_0(dv)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(dens_vel_diagnostics), intent(inout) :: dv

private subroutine zero_dvtype_1(dv)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(dens_vel_diagnostics), intent(inout), dimension(:) :: dv

private subroutine zero_dvtype_2(dv)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(dens_vel_diagnostics), intent(inout), dimension(:,:) :: dv

private subroutine zero_dvtype_3(dv)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(dens_vel_diagnostics), intent(inout), dimension(:,:,:) :: dv

private subroutine del_dvtype_0(dv)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(dens_vel_diagnostics), intent(inout) :: dv

private subroutine del_dvtype_1(dv)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(dens_vel_diagnostics), intent(inout), dimension(:) :: dv

private subroutine del_dvtype_2(dv)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(dens_vel_diagnostics), intent(inout), dimension(:,:) :: dv

private subroutine del_dvtype_3(dv)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(dens_vel_diagnostics), intent(inout), dimension(:,:,:) :: dv

public subroutine avg_dv(dv, dv_hist, istep, navg)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(dens_vel_diagnostics), intent(inout) :: dv
type(dens_vel_diagnostics), intent(inout), dimension (0:) :: dv_hist
integer, intent(in) :: istep
integer, intent(in) :: navg

public subroutine avg_dvk(dvk, dvk_hist, istep, navg)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(dens_vel_diagnostics), intent(inout), dimension(:,:) :: dvk
type(dens_vel_diagnostics), intent(inout), dimension (:,:,0:) :: dvk_hist
integer, intent(in) :: istep
integer, intent(in) :: navg

public subroutine get_heat(h, hk, phi, apar, bpar, phinew, aparnew, bparnew)

Calculate some heating quantities: - ion/electron heating - antenna power and B-field contributions to E and E_dot - gradient contributions to heating - hyperviscosity - hyperresistivity

Read more…

Arguments

Type IntentOptional Attributes Name
type(heating_diagnostics), intent(inout) :: h
type(heating_diagnostics), intent(inout), dimension(:,:) :: hk
complex, intent(in), dimension (-ntgrid:,:,:) :: phi
complex, intent(in), dimension (-ntgrid:,:,:) :: apar
complex, intent(in), dimension (-ntgrid:,:,:) :: bpar
complex, intent(in), dimension (-ntgrid:,:,:) :: phinew
complex, intent(in), dimension (-ntgrid:,:,:) :: aparnew
complex, intent(in), dimension (-ntgrid:,:,:) :: bparnew

private pure subroutine dot(a, anew, adot, fac)

Get a theta-centered and time-centered estimate of the time derivative of a field.

Read more…

Arguments

Type IntentOptional Attributes Name
complex, intent(in), dimension (-ntgrid:,:,:) :: a
complex, intent(in), dimension (-ntgrid:,:,:) :: anew
complex, intent(out), dimension (-ntgrid:,:,:) :: adot
real, intent(in) :: fac