m_tdsops Module



Interfaces

public interface tdsops_t

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

    Constructor function for the tdsops_t class.

    'n', 'delta', 'operation', and 'scheme' are necessary arguments. Number of points 'n', distance between two points 'delta', the 'operation' the tridiagonal system defines, and the 'scheme' that specifies the exact scheme we choose to apply for the operation. The remaining arguments are optional. 'from_to' is necessary for interpolation and staggared derivative, and it can be 'v2p' or 'p2v'. If the specific region the instance is operating is not a boundary region, then 'bc_start' and 'bc_end' are either 'null' or not defined. 'sym' is relevant when the boundary condition is free-slip. If sym is .true. then it means the field we operate on is assumed to be an even function (symmetric) accross the boundary. If it is .false. it means that the field is assumed to be an odd function (anti-symmetric). 'c_nu', 'nu0_nu' are relevant when operation is second order derivative and scheme is compact6-hyperviscous.

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: tds_n
    real(kind=dp), intent(in) :: delta
    character(len=*), intent(in) :: operation
    character(len=*), intent(in) :: scheme
    integer, intent(in), optional :: n_halo

    Number of halo cells

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

    'v2p' or 'p2v'

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

    Boundary Cond.

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

    Boundary Cond.

    logical, intent(in), optional :: sym

    (==npaire), only for Neumann BCs

    real(kind=dp), intent(in), optional :: c_nu

    params for hypervisc.

    real(kind=dp), intent(in), optional :: nu0_nu

    params for hypervisc.

    Return Value type(tdsops_t)

    return value of the function


Derived Types

type, public ::  tdsops_t

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 :: 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

Constructor

public function tdsops_init (tds_n, delta, operation, scheme, n_halo, from_to, bc_start, bc_end, sym, c_nu, nu0_nu)

Constructor function for the tdsops_t class.

Read more…

Type-Bound Procedures

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

type, public ::  dirps_t

Directional tridiagonal solver container.

Read more…

Components

Type Visibility Attributes Name Initial
class(tdsops_t), public, allocatable :: der1st
class(tdsops_t), public, allocatable :: der1st_sym
class(tdsops_t), public, allocatable :: der2nd
class(tdsops_t), public, allocatable :: der2nd_sym
class(tdsops_t), public, allocatable :: stagder_v2p
class(tdsops_t), public, allocatable :: stagder_p2v
class(tdsops_t), public, allocatable :: interpl_v2p
class(tdsops_t), public, allocatable :: interpl_p2v
integer, public :: dir

Functions

public function tdsops_init(tds_n, delta, operation, scheme, n_halo, from_to, bc_start, bc_end, sym, c_nu, nu0_nu) result(tdsops)

Constructor function for the tdsops_t class.

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: tds_n
real(kind=dp), intent(in) :: delta
character(len=*), intent(in) :: operation
character(len=*), intent(in) :: scheme
integer, intent(in), optional :: n_halo

Number of halo cells

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

'v2p' or 'p2v'

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

Boundary Cond.

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

Boundary Cond.

logical, intent(in), optional :: sym

(==npaire), only for Neumann BCs

real(kind=dp), intent(in), optional :: c_nu

params for hypervisc.

real(kind=dp), intent(in), optional :: nu0_nu

params for hypervisc.

Return Value type(tdsops_t)

return value of the function

public pure function get_tds_n(mesh, dir, from_to) result(tds_n)

Get the tds_n size based on the from_to value (and the mesh)

Arguments

Type IntentOptional Attributes Name
class(mesh_t), intent(in) :: mesh
integer, intent(in) :: dir
character(len=*), intent(in), optional :: from_to

Return Value integer


Subroutines

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

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

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

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

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

public subroutine preprocess_thom(self, b)

Arguments

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