psfun_d_serial_mod Module

This module contains the generic interfaces for the computation of the different matrix functions included in the library. The idea is that this modules computes, in a serial way, .

For symmetric matrices we implement the Schur algorithm for the computation of . For this reason we need the psfun_d_serial type to have a member pointing to a function name for f. It is already defined to get also a second optional argument that tells the function to compute instead the kth derivative of f. This is done in light of the nonsymmetric case in which the Schur-Parlett algorithm should be used instead.


Uses

    • psb_base_mod
  • module~~psfun_d_serial_mod~~UsesGraph module~psfun_d_serial_mod psfun_d_serial_mod psb_base_mod psb_base_mod module~psfun_d_serial_mod->psb_base_mod

Used by

  • module~~psfun_d_serial_mod~~UsedByGraph module~psfun_d_serial_mod psfun_d_serial_mod module~psfun_d_krylov_mod psfun_d_krylov_mod module~psfun_d_krylov_mod->module~psfun_d_serial_mod proc~psfun_d_parallel_apply psfun_d_parallel_apply proc~psfun_d_parallel_apply->module~psfun_d_serial_mod program~arnolditest arnolditest program~arnolditest->module~psfun_d_serial_mod program~arnolditest->module~psfun_d_krylov_mod program~serialtest serialtest program~serialtest->module~psfun_d_serial_mod program~lanczostest lanczostest program~lanczostest->module~psfun_d_serial_mod program~lanczostest->module~psfun_d_krylov_mod module~psfun_d_lanczos_mod psfun_d_lanczos_mod module~psfun_d_lanczos_mod->module~psfun_d_krylov_mod module~psfun_d_sai_mod psfun_d_sai_mod module~psfun_d_sai_mod->module~psfun_d_krylov_mod module~psfun_d_arnoldi_mod psfun_d_arnoldi_mod module~psfun_d_arnoldi_mod->module~psfun_d_krylov_mod

Contents


Abstract Interfaces

abstract interface

  • public function func(x, k)

    Arguments

    Type IntentOptional AttributesName
    real(kind=psb_dpk_), intent(in) :: x

    Value to be computed

    integer(kind=psb_ipk_), intent(in), optional :: k

    Computes kth derivative

    Return Value real(kind=psb_dpk_)


Derived Types

type, public :: psfun_d_serial

Components

TypeVisibility AttributesNameInitial
procedure(func), public, pointer, nopass:: f_ptr=> null()

Pointer of a function

character(len=20), public :: fname ='EXP'

Name of the function

integer(kind=psb_ipk_), public :: padedegree =6_psb_ipk_

Degree of Padé expansion

integer(kind=psb_ipk_), public :: phiorder =1_psb_ipk_

Order of the -function

real(kind=psb_dpk_), public :: scaling =1.0_psb_dpk_

of

character(len=20), public :: variant ='EXPOKIT'

Implementatio variant

Type-Bound Procedures

generic, public :: apply => applya, applys
procedure, public, pass(fun) :: applya => psfun_d_serial_apply_array
procedure, public, pass(fun) :: applys => psfun_d_serial_apply_sparse
generic, public :: set => setstring, setreal, setinteger, setfunction
procedure, public, pass(fun) :: setfunction => psfun_d_setpointer
procedure, public, pass(fun) :: setinteger => psfun_d_setinteger
procedure, public, pass(fun) :: setreal => psfun_d_setreal
procedure, public, pass(fun) :: setstring => psfun_d_setstring

Subroutines

public subroutine psfun_d_serial_apply_array(fun, a, y, x, info)

This is the core of the function apply on a serial matrix to compute . It calls on the specific routines implementing the different functions. It is the function to modify if ones want to interface a new function that was not previously available or a new algorithm (variant) for an already existing function.

Read more…

Arguments

Type IntentOptional AttributesName
class(psfun_d_serial), intent(inout) :: fun

Function information

real(kind=psb_dpk_), intent(in) :: a(:,:)

Matrix

real(kind=psb_dpk_), intent(out) :: y(:)

Output vector

real(kind=psb_dpk_), intent(in) :: x(:)

Input vector

integer(kind=psb_ipk_), intent(out) :: info

Information on the output

Read more…

public subroutine psfun_d_serial_apply_sparse(fun, a, y, x, info)

This is the core of the function apply on a serial matrix to compute when A is memorized in a sparse storage. In this case the routine converts it to a dense storage and then calls the array version of itself. That is the one implementing the different functions. It is the function to modify if ones want to interface a new function that was not previously available or a new algorithm (variant) for an already existing function.

Arguments

Type IntentOptional AttributesName
class(psfun_d_serial), intent(inout) :: fun

Function information

type(psb_dspmat_type), intent(inout) :: a

Matrix

real(kind=psb_dpk_), intent(out) :: y(:)

Output vector

real(kind=psb_dpk_), intent(in) :: x(:)

Input vector

integer(kind=psb_ipk_), intent(out) :: info

Information on the output