parallel_map_t Derived Type

type, public :: parallel_map_t

Datatype for parallel_map


Contents


Components

Type Visibility Attributes Name Initial
real(kind=GP), public, dimension(:), allocatable :: dpar_cano_stag_fwd

Parallel distance from phi_cano to phi_cano+dphi/2

real(kind=GP), public, dimension(:), allocatable :: dpar_cano_stag_bwd

Parallel distance from phi_cano to phi_cano-dphi/2

real(kind=GP), public, dimension(:), allocatable :: dpar_cano_cano_fwd

Parallel distance from phi_cano to phi_cano+dphi

real(kind=GP), public, dimension(:), allocatable :: dpar_cano_cano_bwd

Parallel distance from phi_cano to phi_cano-dphi

real(kind=GP), public, dimension(:), allocatable :: fluxbox_vol_cano

Fluxbox volume from phi_cano-dphi/2 to phi_cano+dphi/2

real(kind=GP), public, pointer, dimension(:) :: dpar_stag_cano_fwd => null()

Parallel distance from phi_stag to phi_stag+dphi/2 Points to dpar_stag_cano_fwd_mem for non-axisymmetric case Points to dpar_cano_stag_fwd for axisymmetric case

real(kind=GP), public, pointer, dimension(:) :: dpar_stag_cano_bwd => null()

Parallel distance from phi_stag to phi_stag-dphi/2 Points to dpar_stag_cano_bwd_mem for non-axisymmetric case Points to dpar_cano_stag_bwd for axisymmetric case

real(kind=GP), public, pointer, dimension(:) :: dpar_stag_stag_fwd => null()

Parallel distance from phi_stag to phi_stag+dphi Points to dpar_stag_stag_fwd_mem for non-axisymmetric case Points to dpar_cano_cano_fwd for axisymmetric case

real(kind=GP), public, pointer, dimension(:) :: dpar_stag_stag_bwd => null()

Parallel distance from phi_stag to phi_stag-dphi Points to dpar_stag_stag_bwd_mem for non-axisymmetric case Points to dpar_cano_cano_bwd for axisymmetric case

real(kind=GP), public, pointer, dimension(:) :: fluxbox_vol_stag => null()

Fluxbox volume for staggered grid from phi_stag-dphi/2 to phi_stag+dphi/2 Points to fluxbox_vol_stag_mem for non-axisymmetric case Points to fluxbox_vol_cano for axisymmetric case

type(csrmat_t), public, allocatable :: map_stag_cano_fwd

Map matrix to staggered mesh (phi_stag) from forward canonical mesh (phi_stag+dphi/2)

type(csrmat_t), public, allocatable :: map_stag_cano_bwd

Map matrix to staggered mesh (phi_stag) from backward canonical mesh (phi_stag-dphi/2)

type(csrmat_t), public, allocatable :: map_cano_cano_fwd

Map matrix to canonical mesh (phi_cano) from forward canonical mesh (phi_cano+dphi)

type(csrmat_t), public, allocatable :: map_cano_cano_fwd2

Map matrix to canonical mesh (phi_cano) from next but one forward canonical mesh (phi_cano+2dphi)

type(csrmat_t), public, allocatable :: map_cano_cano_bwd

Map matrix to canonical mesh (phi_cano) from backward canonical mesh (phi_cano-dphi)

type(csrmat_t), public, allocatable :: map_cano_cano_bwd2

Map matrix to canonical mesh (phi_cano) from next but one backward canonical mesh (phi_cano-2dphi)

type(csrmat_t), public, pointer :: map_cano_stag_fwd => null()

Map matrix to canonical mesh (phi_cano) from forward staggered mesh (phi_cano+dphi/2) Points to map_cano_stag_fwd_mem for non-axisymmetric case Points to map_stag_cano_fwd for axisymmetric case

type(csrmat_t), public, pointer :: map_cano_stag_bwd => null()

Map matrix to canonical mesh (phi_cano) from backward staggered mesh (phi_cano-dphi/2) Points tomap_cano_stag_bwd_mem for non-axisymmetric case Points to map_stag_cano_bwd for axisymmetric case

type(csrmat_t), public, pointer :: map_stag_stag_fwd => null()

Map matrix to staggered mesh (phi_stag) from forward staggered mesh (phi_stag+dphi) Points to map_stag_stag_fwd_mem for non-axisymmetric case Points to map_cano_cano_fwd for axisymmetric case

type(csrmat_t), public, pointer :: map_stag_stag_bwd => null()

Map matrix to staggered mesh (phi_stag) from backward staggered mesh (phi_stag-dphi) Points to map_cano_cano_bwd for axisymmetric case

type(csrmat_t), public, allocatable :: grad_stag_cano_fwd

Parallel gradient matrix to staggered mesh (phi_stag) from forward canonical mesh (phi_stag+dphi/2)

type(csrmat_t), public, allocatable :: grad_stag_cano_bwd

Parallel gradient matrix to staggered mesh (phi_stag) from backward canonical mesh (phi_stag-dphi/2)

type(csrmat_t), public, allocatable :: pdiv_cano_stag_fwd

Parallel divergence matrix to canonical mesh (phi_cano) from forward_staggered_mesh (phi_cano+dphi/2) ~ -fluxbox_vol_cano^(-1) * grad_stag_cano_bwd^T * fluxbox_vol_stag

type(csrmat_t), public, allocatable :: pdiv_cano_stag_bwd

Parallel divergence matrix to canonical mesh (phi_cano) from backward_staggered_mesh (phi_cano-dphi/2) ~ -fluxbox_vol_cano^(-1) * grad_stag_cano_fwd^T * fluxbox_vol_stag

type(cuda_map_t), public :: grad_stag_cano_fwd_cuda

Parallel gradient matrix exposed to CUDA

type(cuda_map_t), public :: grad_stag_cano_bwd_cuda

Parallel gradient matrix exposed to CUDA

type(cuda_map_t), public :: pdiv_cano_stag_bwd_cuda

Parallel divergence matrix exposed to CUDA

type(cuda_map_t), public :: pdiv_cano_stag_fwd_cuda

Parallel divergence matrix exposed to CUDA

type(cuda_map_t), public :: map_cano_stag_bwd_cuda

Map matrix exposed to CUDA

type(cuda_map_t), public :: map_cano_stag_fwd_cuda

Map matrix exposed to CUDA


Finalization Procedures

final :: destructor_parallel_map_t


Type-Bound Procedures

procedure, public :: get_nplanes

  • public pure function get_nplanes(self)

    Returns number of poloidal planes used for map

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_map_t), intent(in) :: self

    Instance of the type

    Return Value integer

procedure, public :: get_iplane

  • public pure function get_iplane(self)

    Returns index of poloidal plane (0 to nplanes-1)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_map_t), intent(in) :: self

    Instance of the type

    Return Value integer

procedure, public :: get_phi_cano

  • public function get_phi_cano(self)

    Returns phi coordinate of current plane

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_map_t), intent(in) :: self

    Instance of the type

    Return Value real(kind=gp)

procedure, public :: get_phi_stag

  • public function get_phi_stag(self)

    Returns phi coordinate of current staggered plane

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_map_t), intent(in) :: self

    Instance of the type

    Return Value real(kind=gp)

procedure, public :: get_dphi

  • public pure function get_dphi(self)

    Returns toroidal grid distance used for map

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_map_t), intent(in) :: self

    Instance of the type

    Return Value real(kind=gp)

procedure, public :: get_intorder

  • public pure function get_intorder(self)

    Returns interpolation order used for map

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_map_t), intent(in) :: self

    Instance of the type

    Return Value integer

procedure, public :: set_intorder

  • public subroutine set_intorder(self, intorder)

    Set interpolation order

    Arguments

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

    Instance of the type

    integer, intent(in) :: intorder

procedure, public :: get_xorder

  • public pure function get_xorder(self)

    Returns order of subcell splitting used for map

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_map_t), intent(in) :: self

    Instance of the type

    Return Value integer

procedure, public :: set_xorder

  • public subroutine set_xorder(self, xorder)

    Set order of subcell splitting

    Arguments

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

    Instance of the type

    integer, intent(in) :: xorder

procedure, public :: is_fixed_stencil

  • public pure function is_fixed_stencil(self)

    Returns if fixed stencil is used for interpolation

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_map_t), intent(in) :: self

    Instance of the type

    Return Value logical

procedure, public :: is_gauss_quadrature

  • public pure function is_gauss_quadrature(self)

    Returns if gauss-quadrature or midpoint rule is used for integration

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_map_t), intent(in) :: self

    Instance of the type

    Return Value logical

procedure, public :: set_parameters => set_parameters_map

  • interface

    public module subroutine set_parameters_map(self, comm_handler, filename, intorder_in, xorder_in, use_fixed_stencil_in, use_gauss_quadrature_in)

    Sets parameters for map, either via namelist from file, or setting explicitly

    Arguments

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

    Instance of the type

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

    Communicators

    character(len=*), intent(in), optional :: filename

    Filename where parameter are read from

    integer, intent(in), optional :: intorder_in

    Interpolation order

    integer, intent(in), optional :: xorder_in

    Order for subcell splitting

    logical, intent(in), optional :: use_fixed_stencil_in

    Indicates if fixed stencil is used for interpolation

    logical, intent(in), optional :: use_gauss_quadrature_in

    Indicates if gauss-quadrature or midpoint rule is used for integration

procedure, public :: set_toroidal_location

  • interface

    public module subroutine set_toroidal_location(self, new_iplane, new_phi_cano, new_phi_stag)

    Sets toroidal location

    Arguments

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

    Instance of the type

    integer, intent(in) :: new_iplane

    New toroidal index

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

    New phi_cano

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

    New phi_stag

procedure, public :: par_grad

  • interface

    public module subroutine par_grad(self, ucano, ucano_fwd, par_grad_u_stag)

    Computes parallel gradient on mesh_stag

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_map_t), intent(in) :: self

    Instance of the type

    real(kind=GP), intent(in), dimension(self%grad_stag_cano_bwd%ncol) :: ucano

    Field on mesh_cano at phi_cano

    real(kind=GP), intent(in), dimension(self%grad_stag_cano_fwd%ncol) :: ucano_fwd

    Field on mesh_cano_fwd at phi_cano+dphi

    real(kind=GP), intent(out), dimension(self%grad_stag_cano_fwd%ndim) :: par_grad_u_stag

    Parallel gradient on mesh_stag at phi_stag

procedure, public :: par_grad_single

  • interface

    public pure module function par_grad_single(self, ucano, ucano_fwd, l_stag)

    Computes parallel gradient on mesh_stag index l_stag

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_map_t), intent(in) :: self

    Instance of the type

    real(kind=GP), intent(in), dimension(self%grad_stag_cano_bwd%ncol) :: ucano

    Field on mesh_cano at phi_cano

    real(kind=GP), intent(in), dimension(self%grad_stag_cano_fwd%ncol) :: ucano_fwd

    Field on mesh_cano_fwd at phi_cano+dphi

    integer, intent(in) :: l_stag

    Index of mesh_stag at phi_stag, where parallel gradient is requested

    Return Value real(kind=gp)

procedure, public :: par_divb

  • interface

    public module subroutine par_divb(self, ustag, ustag_bwd, par_pdiv_u_cano)

    Computes parallel divergence on mesh_cano

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_map_t), intent(in) :: self

    Instance of the type

    real(kind=GP), intent(in), dimension(self%pdiv_cano_stag_fwd%ncol) :: ustag

    Field on mesh_stag at phi_stag

    real(kind=GP), intent(in), dimension(self%pdiv_cano_stag_bwd%ncol) :: ustag_bwd

    Field on mesh_stag_bwd at phi_stag-dphi

    real(kind=GP), intent(out), dimension(self%pdiv_cano_stag_fwd%ndim) :: par_pdiv_u_cano

    Parallel divergence on mesh_cano at phi_cano

procedure, public :: par_divb_single

  • interface

    public pure module function par_divb_single(self, ustag, ustag_bwd, l_cano)

    Computes parallel divergence on mesh_cano at index l_cano

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_map_t), intent(in) :: self

    Instance of the type

    real(kind=GP), intent(in), dimension(self%pdiv_cano_stag_fwd%ncol) :: ustag

    Field on mesh_stag at phi_stag

    real(kind=GP), intent(in), dimension(self%pdiv_cano_stag_bwd%ncol) :: ustag_bwd

    Field on mesh_stag_bwd at phi_cano-dphi

    integer, intent(in) :: l_cano

    Index of mesh_cano at phi_cano, where parallel divergence is requested

    Return Value real(kind=gp)

procedure, public :: lift_cano_to_stag_single

  • interface

    public pure module function lift_cano_to_stag_single(self, ucano, ucano_fwd, l_stag)

    Lifts (maps) quantity from mesh_cano to mesh_stag at index l_stag

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_map_t), intent(in) :: self

    Instance of the type

    real(kind=GP), intent(in), dimension(self%map_stag_cano_bwd%ncol) :: ucano

    Field on mesh_cano at phi_cano

    real(kind=GP), intent(in), dimension(self%map_stag_cano_fwd%ncol) :: ucano_fwd

    Field on mesh_cano_fwd at phi_cano+dphi

    integer, intent(in) :: l_stag

    Index of mesh_stag at phi_stag, where lift is requested

    Return Value real(kind=gp)

procedure, public :: lift_cano_to_stag

  • interface

    public module subroutine lift_cano_to_stag(self, ucano, ucano_fwd, lift_u_stag)

    Lifts (maps) quantity from mesh_cano to mesh_stag

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_map_t), intent(in) :: self

    Instance of the type

    real(kind=GP), intent(in), dimension(self%map_stag_cano_bwd%ncol) :: ucano

    Field on mesh_cano at phi_cano

    real(kind=GP), intent(in), dimension(self%map_stag_cano_fwd%ncol) :: ucano_fwd

    Field on mesh_cano_fwd at phi_cano+dphi

    real(kind=GP), intent(out), dimension(self%map_stag_cano_fwd%ndim) :: lift_u_stag

    Quantity lifted to mesh_stag at phi_stag

procedure, public :: flat_stag_to_cano_single

  • interface

    public pure module function flat_stag_to_cano_single(self, ustag, ustag_bwd, l_cano)

    Flats (maps) quantity from mesh_stag to mesh_cano at index l_cano

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_map_t), intent(in) :: self

    Instance of the type

    real(kind=GP), intent(in), dimension(self%pdiv_cano_stag_fwd%ncol) :: ustag

    Field on mesh_stag at phi_stag

    real(kind=GP), intent(in), dimension(self%pdiv_cano_stag_bwd%ncol) :: ustag_bwd

    Field on mesh_stag_bwd at phi_cano-dphi

    integer, intent(in) :: l_cano

    Index of mesh_cano at phi_cano, where flat is requested

    Return Value real(kind=gp)

procedure, public :: flat_stag_to_cano

  • interface

    public module subroutine flat_stag_to_cano(self, ustag, ustag_bwd, flat_u_cano)

    Flats (maps) quantity from mesh_stag to mesh_cano

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_map_t), intent(in) :: self

    Instance of the type

    real(kind=GP), intent(in), dimension(self%map_cano_stag_fwd%ncol) :: ustag

    Field on mesh_stag at phi_stag

    real(kind=GP), intent(in), dimension(self%map_cano_stag_bwd%ncol) :: ustag_bwd

    Field on mesh_stag_bwd at phi_stag-dphi

    real(kind=GP), intent(out), dimension(self%map_cano_stag_fwd%ndim) :: flat_u_cano

    Quantity flatted to mesh_cano at phi_cano

procedure, public :: upstream_cano_from_cano_fwd_single

  • interface

    public pure module function upstream_cano_from_cano_fwd_single(self, ucano_fwd, l_cano)

    Maps upstream values to mesh_cano from mesh_cano_fwd at phi_cano+dphi at index l_cano

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_map_t), intent(in) :: self

    Instance of the type

    real(kind=GP), intent(in), dimension(self%map_cano_cano_fwd%ncol) :: ucano_fwd

    Field on mesh_cano_fwd at phi_cano+dphi

    integer, intent(in) :: l_cano

    Index of mesh_cano, where value is requested

    Return Value real(kind=gp)

procedure, public :: upstream_cano_from_cano_fwd

  • interface

    public module subroutine upstream_cano_from_cano_fwd(self, ucano_fwd, upstream_cano_fwd)

    Maps upstream values to mesh_cano from mesh_cano_fwd at phi_cano+dphi

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_map_t), intent(in) :: self

    Instance of the type

    real(kind=GP), intent(in), dimension(self%map_cano_cano_fwd%ncol) :: ucano_fwd

    Field on mesh_cano_fwd at phi_cano+dphi

    real(kind=GP), intent(out), dimension(self%map_cano_cano_fwd%ndim) :: upstream_cano_fwd

    Upstream qauntity mapped to mesh_cano

procedure, public :: upstream_cano_from_cano_bwd_single

  • interface

    public pure module function upstream_cano_from_cano_bwd_single(self, ucano_bwd, l_cano)

    Maps upstream values to mesh_cano from mesh_cano_bwd at phi_cano-dphi at index l_cano

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_map_t), intent(in) :: self

    Instance of the type

    real(kind=GP), intent(in), dimension(self%map_cano_cano_bwd%ncol) :: ucano_bwd

    Field on mesh_cano_bwd at phi_cano-dphi

    integer, intent(in) :: l_cano

    Index of mesh_cano, where value is requested

    Return Value real(kind=gp)

procedure, public :: upstream_cano_from_cano_bwd

  • interface

    public module subroutine upstream_cano_from_cano_bwd(self, ucano_bwd, upstream_cano_bwd)

    Maps upstream values to mesh_cano from mesh_cano_bwd at phi_cano-dphi

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_map_t), intent(in) :: self

    Instance of the type

    real(kind=GP), intent(in), dimension(self%map_cano_cano_bwd%ncol) :: ucano_bwd

    Field on mesh_cano_bwd at phi_cano-dphi

    real(kind=GP), intent(out), dimension(self%map_cano_cano_bwd%ndim) :: upstream_cano_bwd

    Upstream qauntity mapped to mesh_cano

procedure, public :: upstream_cano_from_cano_fwd2_single

  • interface

    public pure module function upstream_cano_from_cano_fwd2_single(self, ucano_fwd2, l_cano)

    Maps upstream values to mesh_cano from mesh_cano_fwd2 at phi_cano+2dphi at index l_cano

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_map_t), intent(in) :: self

    Instance of the type

    real(kind=GP), intent(in), dimension(self%map_cano_cano_fwd2%ncol) :: ucano_fwd2

    Field on mesh_cano_fwd2 at phi_cano+2dphi

    integer, intent(in) :: l_cano

    Index of mesh_cano, where value is requested

    Return Value real(kind=gp)

procedure, public :: upstream_cano_from_cano_fwd2

  • interface

    public module subroutine upstream_cano_from_cano_fwd2(self, ucano_fwd2, upstream_cano_fwd2)

    Maps upstream values to mesh_cano from mesh_cano_fwd2 at phi_cano+2dphi

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_map_t), intent(in) :: self

    Instance of the type

    real(kind=GP), intent(in), dimension(self%map_cano_cano_fwd2%ncol) :: ucano_fwd2

    Field on mesh_cano_fwd2 at phi_cano+2dphi

    real(kind=GP), intent(out), dimension(self%map_cano_cano_fwd2%ndim) :: upstream_cano_fwd2

    Upstream qauntity mapped to mesh_cano

procedure, public :: upstream_cano_from_cano_bwd2_single

  • interface

    public pure module function upstream_cano_from_cano_bwd2_single(self, ucano_bwd2, l_cano)

    Maps upstream values to mesh_cano from mesh_cano_bwd2 at phi_cano-2dphi at index l_cano

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_map_t), intent(in) :: self

    Instance of the type

    real(kind=GP), intent(in), dimension(self%map_cano_cano_bwd2%ncol) :: ucano_bwd2

    Field on mesh_cano_bwd2 at phi_cano-2dphi

    integer, intent(in) :: l_cano

    Index of mesh_cano, where value is requested

    Return Value real(kind=gp)

procedure, public :: upstream_cano_from_cano_bwd2

  • interface

    public module subroutine upstream_cano_from_cano_bwd2(self, ucano_bwd2, upstream_cano_bwd2)

    Maps upstream values to mesh_cano from mesh_cano_bwd at phi_cano-dphi

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_map_t), intent(in) :: self

    Instance of the type

    real(kind=GP), intent(in), dimension(self%map_cano_cano_bwd2%ncol) :: ucano_bwd2

    Field on mesh_cano_bwd2 at phi_cano-2dphi

    real(kind=GP), intent(out), dimension(self%map_cano_cano_bwd2%ndim) :: upstream_cano_bwd2

    Upstream qauntity mapped to mesh_cano

procedure, public :: upstream_stag_from_stag_fwd_single

  • interface

    public pure module function upstream_stag_from_stag_fwd_single(self, ustag_fwd, l_stag)

    Maps upstream values to mesh_stag from mesh_stag_fwd at phi_stag+dphi at index l_stag

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_map_t), intent(in) :: self

    Instance of the type

    real(kind=GP), intent(in), dimension(self%map_stag_stag_fwd%ncol) :: ustag_fwd

    Field on mesh_stag_fwd at phi_stag+dphi

    integer, intent(in) :: l_stag

    Index of mesh_stag, where value is requested

    Return Value real(kind=gp)

procedure, public :: upstream_stag_from_stag_fwd

  • interface

    public module subroutine upstream_stag_from_stag_fwd(self, ustag_fwd, upstream_stag_fwd)

    Maps upstream values to mesh_stag from mesh_stag_fwd at phi_stag+dphi

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_map_t), intent(in) :: self

    Instance of the type

    real(kind=GP), intent(in), dimension(self%map_stag_stag_fwd%ncol) :: ustag_fwd

    Field on mesh_stag_fwd at phi_stag+dphi

    real(kind=GP), intent(out), dimension(self%map_stag_stag_fwd%ndim) :: upstream_stag_fwd

    Upstream qauntity mapped to mesh_stag

procedure, public :: upstream_stag_from_stag_bwd_single

  • interface

    public pure module function upstream_stag_from_stag_bwd_single(self, ustag_bwd, l_stag)

    Maps upstream values to mesh_stag from mesh_stag_bwd at phi_stag-dphi at index l_stag

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_map_t), intent(in) :: self

    Instance of the type

    real(kind=GP), intent(in), dimension(self%map_stag_stag_bwd%ncol) :: ustag_bwd

    Field on mesh_stag_bwd at phi_stag-dphi

    integer, intent(in) :: l_stag

    Index of mesh_stag, where value is requested

    Return Value real(kind=gp)

procedure, public :: upstream_stag_from_stag_bwd

  • interface

    public module subroutine upstream_stag_from_stag_bwd(self, ustag_bwd, upstream_stag_bwd)

    Maps upstream values to mesh_stag from mesh_stag_bwd at phi_stag-dphi

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_map_t), intent(in) :: self

    Instance of the type

    real(kind=GP), intent(in), dimension(self%map_stag_stag_bwd%ncol) :: ustag_bwd

    Field on mesh_stag_bwd at phi_stag-dphi

    real(kind=GP), intent(out), dimension(self%map_stag_stag_bwd%ndim) :: upstream_stag_bwd

    Upstream qauntity mapped to mesh_stag

procedure, public :: par_grad_cuda

  • interface

    public module subroutine par_grad_cuda(self, ucano, ucano_fwd, par_grad_u_stag)

    Computes parallel gradient on mesh_stag, based on CUDA implementation, not to be called from OMP parallel region

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_map_t), intent(in) :: self

    Instance of the type

    real(kind=GP), intent(in), dimension(self%grad_stag_cano_bwd%ncol) :: ucano

    Field on mesh_cano at phi_cano

    real(kind=GP), intent(in), dimension(self%grad_stag_cano_fwd%ncol) :: ucano_fwd

    Field on mesh_cano_fwd at phi_cano+dphi

    real(kind=GP), intent(out), dimension(self%grad_stag_cano_fwd%ndim) :: par_grad_u_stag

    Parallel gradient on mesh_stag at phi_stag

procedure, public :: par_divb_cuda

  • interface

    public module subroutine par_divb_cuda(self, ustag, ustag_bwd, par_pdiv_u_cano)

    Computes parallel divergence on mesh_cano, based on CUDA implementation, not to be called from OMP parallel region

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_map_t), intent(in) :: self

    Instance of the type

    real(kind=GP), intent(in), dimension(self%pdiv_cano_stag_fwd%ncol) :: ustag

    Field on mesh_stag at phi_stag

    real(kind=GP), intent(in), dimension(self%pdiv_cano_stag_bwd%ncol) :: ustag_bwd

    Field on mesh_stag_bwd at phi_stag-dphi

    real(kind=GP), intent(out), dimension(self%pdiv_cano_stag_fwd%ndim) :: par_pdiv_u_cano

    Parallel divergence on mesh_cano at phi_cano

procedure, public :: write_netcdf => write_netcdf_parallel_map

  • interface

    public module subroutine write_netcdf_parallel_map(self, axisymmetric, fgid)

    Writes parallel map to netcdf file

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_map_t), intent(in) :: self

    Instance of the type

    logical, intent(in) :: axisymmetric

    Indicates if output is written based on axisymmetric equilibria, writes out only non-redundant data

    integer, intent(in) :: fgid

    netcdf file or group id

procedure, public :: read_netcdf => read_netcdf_parallel_map

  • interface

    public module subroutine read_netcdf_parallel_map(self, axisymmetric, fgid)

    Reads parallel map to netcdf file

    Arguments

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

    Instance of the type

    logical, intent(in) :: axisymmetric

    Indicates if input is read based on axisymmetric equilibria

    integer, intent(in) :: fgid

    netcdf file or group id

procedure, public :: display => display_parallel_map

  • interface

    public module subroutine display_parallel_map(self)

    Displays information about parallel_map

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_map_t), intent(in) :: self

    Instance of the type

procedure, public :: build => build_parallel_map

  • interface

    public module subroutine build_parallel_map(self, comm_handler, equi, mesh_cano, mesh_stag, dbgout)

    Builds parallel map matrices, parallel gradient and map metadata

    Arguments

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

    Instance of the type

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

    Communicators

    class(equilibrium_t) :: equi

    Equilibrium (not changed)

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

    Mesh (canonical)

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

    Mesh (staggered)

    integer, intent(in), optional :: dbgout

    Debug output level

procedure, public :: build_cuda_struct

  • interface

    public module subroutine build_cuda_struct(self)

    Exposes matrices to CUDA

    Arguments

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

    Instance of the type