cuda_tdsops_t Derived Type

type, public, extends(tdsops_t) :: cuda_tdsops_t

CUDA extension of the Tridiagonal Solver Operators class.

Regular tdsops_t class is initiated and the coefficient arrays are copied into device arrays so that cuda kernels can use them.


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 :: coeffs(:)
real(kind=dp), public, allocatable :: coeffs_s(:,:)
real(kind=dp), public, allocatable :: coeffs_e(:,:)
real(kind=dp), public :: alpha
real(kind=dp), public :: a
real(kind=dp), public :: b
real(kind=dp), public :: c = 0._dp
real(kind=dp), public :: d = 0._dp
logical, public :: periodic
integer, public :: tds_n
integer, public :: dir
integer, public :: n_halo
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 :: coeffs_dev(:)
real(kind=dp), public, device, allocatable :: coeffs_s_dev(:,:)
real(kind=dp), public, device, allocatable :: coeffs_e_dev(:,:)

Constructor

public interface cuda_tdsops_t

  • public function cuda_tdsops_init(n, delta, operation, scheme, n_halo, from_to, bc_start, bc_end, sym, c_nu, nu0_nu) result(tdsops)

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

    Arguments

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

    Return Value type(cuda_tdsops_t)

    return value of the function


Type-Bound Procedures

procedure, public :: stagder_1st

  • public subroutine stagder_1st(self, delta, scheme, from_to, bc_start, bc_end, sym)

    Arguments

    Type IntentOptional Attributes Name
    class(tdsops_t), intent(inout) :: self
    real(kind=dp), intent(in) :: delta
    character(len=*), intent(in) :: scheme
    character(len=*), intent(in) :: from_to
    character(len=*), intent(in), optional :: bc_start
    character(len=*), intent(in), optional :: bc_end
    logical, intent(in), optional :: sym

procedure, public :: interpl_mid

  • public subroutine interpl_mid(self, scheme, from_to, bc_start, bc_end, sym)

    Arguments

    Type IntentOptional Attributes Name
    class(tdsops_t), intent(inout) :: self
    character(len=*), intent(in) :: scheme
    character(len=*), intent(in) :: from_to
    character(len=*), intent(in), optional :: bc_start
    character(len=*), intent(in), optional :: bc_end
    logical, intent(in), optional :: sym

procedure, public :: deriv_2nd

  • public subroutine deriv_2nd(self, delta, scheme, bc_start, bc_end, sym, c_nu, nu0_nu)

    Arguments

    Type IntentOptional Attributes Name
    class(tdsops_t), intent(inout) :: self
    real(kind=dp), intent(in) :: delta
    character(len=*), intent(in) :: scheme
    character(len=*), intent(in), optional :: bc_start
    character(len=*), intent(in), optional :: bc_end
    logical, intent(in), optional :: sym
    real(kind=dp), intent(in), optional :: c_nu
    real(kind=dp), intent(in), optional :: nu0_nu

procedure, public :: deriv_1st

  • public subroutine deriv_1st(self, delta, scheme, bc_start, bc_end, sym)

    Arguments

    Type IntentOptional Attributes Name
    class(tdsops_t), intent(inout) :: self
    real(kind=dp), intent(in) :: delta
    character(len=*), intent(in) :: scheme
    character(len=*), intent(in), optional :: bc_start
    character(len=*), intent(in), optional :: bc_end
    logical, intent(in), optional :: sym

procedure, public :: preprocess_thom

  • public subroutine preprocess_thom(self, b)

    Arguments

    Type IntentOptional Attributes Name
    class(tdsops_t), intent(inout) :: self
    real(kind=dp), intent(in), dimension(:) :: b

procedure, public :: preprocess_dist

  • public subroutine preprocess_dist(self, dist_b)

    Arguments

    Type IntentOptional Attributes Name
    class(tdsops_t), intent(inout) :: self
    real(kind=dp), intent(in), dimension(:) :: dist_b