m_cuda_tdsops Module


Uses

  • module~~m_cuda_tdsops~~UsesGraph module~m_cuda_tdsops m_cuda_tdsops iso_fortran_env iso_fortran_env module~m_cuda_tdsops->iso_fortran_env module~m_common m_common module~m_cuda_tdsops->module~m_common module~m_tdsops m_tdsops module~m_cuda_tdsops->module~m_tdsops module~m_mpi m_mpi module~m_common->module~m_mpi module~m_tdsops->iso_fortran_env module~m_tdsops->module~m_common module~m_mpi->iso_fortran_env mpi mpi module~m_mpi->mpi

Used by

  • module~~m_cuda_tdsops~~UsedByGraph module~m_cuda_tdsops m_cuda_tdsops module~m_cuda_backend m_cuda_backend module~m_cuda_backend->module~m_cuda_tdsops module~m_cuda_exec_dist m_cuda_exec_dist module~m_cuda_backend->module~m_cuda_exec_dist module~m_cuda_exec_thom m_cuda_exec_thom module~m_cuda_backend->module~m_cuda_exec_thom module~m_cuda_exec_dist->module~m_cuda_tdsops module~m_cuda_exec_thom->module~m_cuda_tdsops program~xcompact xcompact program~xcompact->module~m_cuda_backend

Interfaces

public interface cuda_tdsops_t

  • public function cuda_tdsops_init(n_tds, delta, operation, scheme, bc_start, bc_end, stretch, stretch_correct, n_halo, from_to, sym, c_nu, nu0_nu, filter_alpha) result(tdsops)

    Constructor function for the cuda_tdsops_t class. See tdsops_t for details.

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: n_tds
    real(kind=dp), intent(in) :: delta
    character(len=*), intent(in) :: operation
    character(len=*), intent(in) :: scheme
    integer, intent(in) :: bc_start
    integer, intent(in) :: bc_end
    real(kind=dp), intent(in), optional :: stretch(:)
    real(kind=dp), intent(in), optional :: stretch_correct(:)
    integer, intent(in), optional :: n_halo
    character(len=*), intent(in), optional :: from_to
    logical, intent(in), optional :: sym
    real(kind=dp), intent(in), optional :: c_nu
    real(kind=dp), intent(in), optional :: nu0_nu
    real(kind=dp), intent(in), optional :: filter_alpha

    Return Value type(cuda_tdsops_t)

    return value of the function


Derived Types

type, public, extends(tdsops_t) ::  cuda_tdsops_t

CUDA extension of the Tridiagonal Solver Operators class.

Read more…

Components

Type Visibility Attributes Name Initial
real(kind=dp), public, allocatable, dimension(:) :: dist_fw

fw/bw phase back subs. the auxiliary factors

real(kind=dp), public, allocatable, dimension(:) :: dist_bw

fw/bw phase back subs. the auxiliary factors

real(kind=dp), public, allocatable, dimension(:) :: dist_sa

fw/bw phase back subs. the auxiliary factors

real(kind=dp), public, allocatable, dimension(:) :: dist_sc

fw/bw phase back subs. the auxiliary factors

real(kind=dp), public, allocatable, dimension(:) :: dist_af

fw/bw phase back subs. the auxiliary factors

real(kind=dp), public, allocatable, dimension(:) :: thom_f
real(kind=dp), public, allocatable, dimension(:) :: thom_s
real(kind=dp), public, allocatable, dimension(:) :: thom_w
real(kind=dp), public, allocatable, dimension(:) :: thom_p
real(kind=dp), public, allocatable :: stretch(:)
real(kind=dp), public, allocatable :: stretch_correct(:)
real(kind=dp), public, allocatable :: coeffs(:)
real(kind=dp), public, allocatable :: coeffs_s(:,:)
real(kind=dp), public, allocatable :: coeffs_e(:,:)
real(kind=dp), public :: alpha

Compact scheme coeffs

real(kind=dp), public :: a

Compact scheme coeffs

real(kind=dp), public :: b

Compact scheme coeffs

real(kind=dp), public :: c = 0._dp

Compact scheme coeffs

real(kind=dp), public :: d = 0._dp

Compact scheme coeffs

real(kind=dp), public :: beta = 0._dp

LHS 2nd off-diagonal (pentadiag LHS only)

real(kind=dp), public :: beta_lhs_s = 0._dp

j=1 backward-sub beta (0/2β Neumann, β otherwise)

logical, public :: periodic
logical, public :: pentadiag = .false.

.true. for pentadiagonal LHS schemes Solve with the serial Thomas algorithm instead of the distributed one. The distributed solver truncates a neighbour's influence at the subdomain edge, which is invisible for the well-conditioned derivative operators but not for the low-pass filter, whose system is only marginally diagonally dominant as alpha approaches 0.5. Thomas is serial along the line, so this is only valid when the direction is not decomposed.

logical, public :: prefer_thomas = .false.
integer, public :: n_tds

Tridiagonal system size

integer, public :: n_rhs

Right-hand-side builder size

integer, public :: move = 0

move between vertices and cell centres

integer, public :: n_halo

number of halo points

real(kind=dp), public, device, allocatable :: dist_fw_dev(:)
real(kind=dp), public, device, allocatable :: dist_bw_dev(:)
real(kind=dp), public, device, allocatable :: dist_sa_dev(:)
real(kind=dp), public, device, allocatable :: dist_sc_dev(:)
real(kind=dp), public, device, allocatable :: dist_af_dev(:)
real(kind=dp), public, device, allocatable :: thom_f_dev(:)
real(kind=dp), public, device, allocatable :: thom_s_dev(:)
real(kind=dp), public, device, allocatable :: thom_w_dev(:)
real(kind=dp), public, device, allocatable :: thom_p_dev(:)
real(kind=dp), public, device, allocatable :: stretch_dev(:)
real(kind=dp), public, device, allocatable :: stretch_correct_dev(:)
real(kind=dp), public, device, allocatable :: coeffs_dev(:)
real(kind=dp), public, device, allocatable :: coeffs_s_dev(:,:)
real(kind=dp), public, device, allocatable :: coeffs_e_dev(:,:)

Constructor

public function cuda_tdsops_init (n_tds, delta, operation, scheme, bc_start, bc_end, stretch, stretch_correct, n_halo, from_to, sym, c_nu, nu0_nu, filter_alpha)

Constructor function for the cuda_tdsops_t class. See tdsops_t for details.

Type-Bound Procedures

procedure, public :: lowpass
procedure, public :: stagder_1st
procedure, public :: interpl_mid
procedure, public :: deriv_2nd
procedure, public :: deriv_1st
procedure, public :: preprocess_thom
procedure, public :: preprocess_penta_dist
procedure, public :: preprocess_dist

Functions

public function cuda_tdsops_init(n_tds, delta, operation, scheme, bc_start, bc_end, stretch, stretch_correct, n_halo, from_to, sym, c_nu, nu0_nu, filter_alpha) result(tdsops)

Constructor function for the cuda_tdsops_t class. See tdsops_t for details.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n_tds
real(kind=dp), intent(in) :: delta
character(len=*), intent(in) :: operation
character(len=*), intent(in) :: scheme
integer, intent(in) :: bc_start
integer, intent(in) :: bc_end
real(kind=dp), intent(in), optional :: stretch(:)
real(kind=dp), intent(in), optional :: stretch_correct(:)
integer, intent(in), optional :: n_halo
character(len=*), intent(in), optional :: from_to
logical, intent(in), optional :: sym
real(kind=dp), intent(in), optional :: c_nu
real(kind=dp), intent(in), optional :: nu0_nu
real(kind=dp), intent(in), optional :: filter_alpha

Return Value type(cuda_tdsops_t)

return value of the function