vpamu_grids Module


Variables

Type Visibility Attributes Name Initial
logical, public :: vpamu_initialized = .false.
integer, public :: nvgrid
integer, public :: nvpa
integer, public :: nmu
real, public :: vpa_max
real, public :: vperp_max
real, public, dimension(:), allocatable :: vpa
real, public, dimension(:), allocatable :: wgts_vpa
real, public, dimension(:), allocatable :: wgts_vpa_default
real, public, dimension(:), allocatable :: wgts_mu_bare
real, public, dimension(:), allocatable :: mu
real, public, dimension(:), allocatable :: maxwell_fac
real, public, dimension(:, :), allocatable :: maxwell_vpa
real, public, dimension(:, :, :), allocatable :: int_unit
real, public, dimension(:, :, :), allocatable :: int_vpa2
real, public, dimension(:, :, :), allocatable :: int_vperp2
real, public, dimension(:, :, :), allocatable :: int_vfrth
real, public, dimension(:, :, :), allocatable :: wgts_mu
real, public, dimension(:, :, :, :), allocatable :: maxwell_mu
real, public, dimension(:, :, :, :), allocatable :: maxwell_mu_avg
real, public, dimension(:, :), allocatable :: ztmax
real, public :: dvpa
real, public, dimension(:), allocatable :: dmu
real, public, dimension(:), allocatable :: dmu_ghost
real, public, dimension(:), allocatable :: dmu_cell
real, public, dimension(:), allocatable :: mu_cell
complex, public, dimension(:), allocatable :: rbuffer
logical, public :: equally_spaced_mu_grid
logical, public :: conservative_wgts_vpa
real, public, dimension(:, :, :), allocatable :: vperp2

Interfaces

public interface integrate_species

  • public subroutine integrate_species_vmu(g, weights, total, ia_in)

    Arguments

    Type IntentOptional Attributes Name
    complex, intent(in), dimension(:, :, -nzgrid:, :, vmu_lo%llim_proc:) :: g
    real, intent(in), dimension(:) :: weights
    complex, intent(out), dimension(:, :, -nzgrid:, :) :: total
    integer, intent(in), optional :: ia_in
  • public subroutine integrate_species_vmu_single(g, iz, weights, total, ia_in, reduce_in)

    Arguments

    Type IntentOptional Attributes Name
    complex, intent(in), dimension(vmu_lo%llim_proc:) :: g
    integer, intent(in) :: iz
    real, intent(in), dimension(:) :: weights
    complex, intent(out) :: total
    integer, intent(in), optional :: ia_in
    logical, intent(in), optional :: reduce_in
  • public subroutine integrate_species_vmu_single_real(g, iz, weights, total, ia_in, reduce_in)

    Arguments

    Type IntentOptional Attributes Name
    real, intent(in), dimension(vmu_lo%llim_proc:) :: g
    integer, intent(in) :: iz
    real, intent(in), dimension(:) :: weights
    real, intent(out) :: total
    integer, intent(in), optional :: ia_in
    logical, intent(in), optional :: reduce_in
  • public subroutine integrate_species_vmu_block_complex(g, iz, weights, pout, ia_in, reduce_in)

    Arguments

    Type IntentOptional Attributes Name
    complex, intent(in), dimension(:, :, vmu_lo%llim_proc:) :: g
    integer, intent(in) :: iz
    real, intent(in), dimension(:) :: weights
    complex, intent(out), dimension(:, :) :: pout
    integer, intent(in), optional :: ia_in
    logical, intent(in), optional :: reduce_in
  • public subroutine integrate_species_vmu_block_real(g, iz, weights, pout, ia_in, reduce_in)

    Arguments

    Type IntentOptional Attributes Name
    real, intent(in), dimension(:, :, vmu_lo%llim_proc:) :: g
    integer, intent(in) :: iz
    real, intent(in), dimension(:) :: weights
    real, intent(out), dimension(:, :) :: pout
    integer, intent(in), optional :: ia_in
    logical, intent(in), optional :: reduce_in

public interface integrate_vmu

  • public subroutine integrate_vmu_local_real(g, iz, total)

    Arguments

    Type IntentOptional Attributes Name
    real, intent(in), dimension(:, :) :: g
    integer, intent(in) :: iz
    real, intent(out) :: total
  • public subroutine integrate_vmu_local_complex(g, iz, total)

    Arguments

    Type IntentOptional Attributes Name
    complex, intent(in), dimension(:, :) :: g
    integer, intent(in) :: iz
    complex, intent(out) :: total
  • public subroutine integrate_vmu_vmulo_complex(g, weights, total)

    Arguments

    Type IntentOptional Attributes Name
    complex, intent(in), dimension(:, :, -nzgrid:, :, vmu_lo%llim_proc:) :: g
    real, intent(in), dimension(:) :: weights
    complex, intent(out), dimension(:, :, -nzgrid:, :, :) :: total
  • public subroutine integrate_vmu_vmulo_ivmu_only_real(g, ia, iz, total)

    Arguments

    Type IntentOptional Attributes Name
    real, intent(in), dimension(vmu_lo%llim_proc:) :: g
    integer, intent(in) :: ia
    integer, intent(in) :: iz
    real, intent(out), dimension(:) :: total

public interface integrate_mu

  • public subroutine integrate_mu_local(iz, g, total)

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: iz
    real, intent(in), dimension(:, :) :: g
    real, intent(out), dimension(:) :: total
  • public subroutine integrate_mu_nonlocal(iz, g, total)

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: iz
    real, intent(in), dimension(vmu_lo%llim_proc:) :: g
    real, intent(out), dimension(:, :) :: total

public interface integrate_vpa

  • public subroutine integrate_vpa_nonlocal(g_vs_ivmus, g_vs_mus)

    Arguments

    Type IntentOptional Attributes Name
    real, intent(in), dimension(vmu_lo%llim_proc:) :: g_vs_ivmus
    real, intent(out), dimension(:, :) :: g_vs_mus

Subroutines

public subroutine read_vpamu_grids_parameters()

Arguments

None

public subroutine init_vpamu_grids()

set up the vpa grid points and integration weights set up the mu grid points and integration weights

Read more…

Arguments

None

public subroutine init_vpa_grid()

vpa is the parallel velocity at grid points wgts_vpa are the integration weights assigned to the parallel velocity grid points this is the Maxwellian in vpa parallel velocity grid goes from -vpa_max to vpa_max, with no point at vpa = 0; the lack of a point at vpa=0 avoids treating the vpa=z=0 phase space location, which is isolated from all other phase space points in the absence of collisions equal grid spacing in vpa

Read more…

Arguments

None

public subroutine set_vpa_weights(conservative)

Arguments

Type IntentOptional Attributes Name
logical, intent(in) :: conservative

public subroutine integrate_mu_local(iz, g, total)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: iz
real, intent(in), dimension(:, :) :: g
real, intent(out), dimension(:) :: total

public subroutine integrate_mu_nonlocal(iz, g, total)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: iz
real, intent(in), dimension(vmu_lo%llim_proc:) :: g
real, intent(out), dimension(:, :) :: total

public subroutine integrate_vpa_nonlocal(g_vs_ivmus, g_vs_mus)

Arguments

Type IntentOptional Attributes Name
real, intent(in), dimension(vmu_lo%llim_proc:) :: g_vs_ivmus
real, intent(out), dimension(:, :) :: g_vs_mus

public subroutine integrate_vmu_local_real(g, iz, total)

Arguments

Type IntentOptional Attributes Name
real, intent(in), dimension(:, :) :: g
integer, intent(in) :: iz
real, intent(out) :: total

public subroutine integrate_vmu_local_complex(g, iz, total)

Arguments

Type IntentOptional Attributes Name
complex, intent(in), dimension(:, :) :: g
integer, intent(in) :: iz
complex, intent(out) :: total

public subroutine integrate_vmu_vmulo_complex(g, weights, total)

Arguments

Type IntentOptional Attributes Name
complex, intent(in), dimension(:, :, -nzgrid:, :, vmu_lo%llim_proc:) :: g
real, intent(in), dimension(:) :: weights
complex, intent(out), dimension(:, :, -nzgrid:, :, :) :: total

public subroutine integrate_vmu_vmulo_ivmu_only_real(g, ia, iz, total)

Arguments

Type IntentOptional Attributes Name
real, intent(in), dimension(vmu_lo%llim_proc:) :: g
integer, intent(in) :: ia
integer, intent(in) :: iz
real, intent(out), dimension(:) :: total

public subroutine integrate_species_vmu(g, weights, total, ia_in)

Arguments

Type IntentOptional Attributes Name
complex, intent(in), dimension(:, :, -nzgrid:, :, vmu_lo%llim_proc:) :: g
real, intent(in), dimension(:) :: weights
complex, intent(out), dimension(:, :, -nzgrid:, :) :: total
integer, intent(in), optional :: ia_in

public subroutine integrate_species_vmu_single(g, iz, weights, total, ia_in, reduce_in)

Arguments

Type IntentOptional Attributes Name
complex, intent(in), dimension(vmu_lo%llim_proc:) :: g
integer, intent(in) :: iz
real, intent(in), dimension(:) :: weights
complex, intent(out) :: total
integer, intent(in), optional :: ia_in
logical, intent(in), optional :: reduce_in

public subroutine integrate_species_vmu_single_real(g, iz, weights, total, ia_in, reduce_in)

Arguments

Type IntentOptional Attributes Name
real, intent(in), dimension(vmu_lo%llim_proc:) :: g
integer, intent(in) :: iz
real, intent(in), dimension(:) :: weights
real, intent(out) :: total
integer, intent(in), optional :: ia_in
logical, intent(in), optional :: reduce_in

public subroutine integrate_species_vmu_block_complex(g, iz, weights, pout, ia_in, reduce_in)

Arguments

Type IntentOptional Attributes Name
complex, intent(in), dimension(:, :, vmu_lo%llim_proc:) :: g
integer, intent(in) :: iz
real, intent(in), dimension(:) :: weights
complex, intent(out), dimension(:, :) :: pout
integer, intent(in), optional :: ia_in
logical, intent(in), optional :: reduce_in

public subroutine integrate_species_vmu_block_real(g, iz, weights, pout, ia_in, reduce_in)

Arguments

Type IntentOptional Attributes Name
real, intent(in), dimension(:, :, vmu_lo%llim_proc:) :: g
integer, intent(in) :: iz
real, intent(in), dimension(:) :: weights
real, intent(out), dimension(:, :) :: pout
integer, intent(in), optional :: ia_in
logical, intent(in), optional :: reduce_in

public subroutine integrate_species_ffs(g, weights, pout, reduce_in)

Arguments

Type IntentOptional Attributes Name
complex, intent(in), dimension(:, :, vmu_lo%llim_proc:) :: g
real, intent(in), dimension(:) :: weights
complex, intent(out), dimension(:, :) :: pout
logical, intent(in), optional :: reduce_in

public subroutine integrate_species_ffs_rm(g, weights, pout, reduce_in)

Arguments

Type IntentOptional Attributes Name
complex, intent(in), dimension(vmu_lo%llim_proc:) :: g
real, intent(in), dimension(:) :: weights
complex, intent(out) :: pout
logical, intent(in), optional :: reduce_in

public subroutine integrate_vmu_ffs(g, weights, ia, iz, pout, reduce_in)

NB: for FFS, assume that there is only one flux annulus the inclusion of the Maxwellian term below is due to the fact that g/F is evolved for FFS

Arguments

Type IntentOptional Attributes Name
complex, intent(in), dimension(vmu_lo%llim_proc:) :: g
real, intent(in), dimension(:) :: weights
integer, intent(in) :: ia
integer, intent(in) :: iz
complex, intent(out), dimension(:) :: pout
logical, intent(in), optional :: reduce_in

public subroutine finish_vpa_grid()

Arguments

None

public subroutine init_mu_grid()

allocate arrays and initialize to zero dvpe * vpe = d(2muB0) * B/2B0 first get equally spaced grid in mu with max value mu_max = vperp_max2/(2max(bmag)) want first grid point at dmu/2 to avoid mu=0 special point dmu/2 + (nmu-1)dmu = mu_max so dmu = mu_max/(nmu-1/2) do simplest thing to start leave dmu(nmu) uninitialized. should never be used, so want valgrind or similar to return error if it is

Read more…

Arguments

None

public subroutine finish_mu_grid()

Arguments

None

public subroutine calculate_velocity_integrals()

Arguments

None

public subroutine finish_vpamu_grids()

Arguments

None