LightKrylov_ExpmLib Module

This module implements the evaluation of the "matrix-exponential times vector" procedure using Krylov methods.



Interfaces

public interface kexpm

Description

This interface provides methods to evaluate the matrix-vector product based on the Arnoldi method.

Syntax

    call kexpm(c, A, b, tau, tol, info [, trans] [, kdim])

Arguments

  • c : Output vector (or vectors). It is an intent(out) argument.

  • A : Linear operator to be exponentiated. It is an intent(inout) argument.

  • b : Vector to be multiplied by . It is an intent(in) argument.

  • tau : real (singe or double) time over which the matrix exponential needs to be computed. It is an intent(in) argument.

  • info : integer Information flag.

  • trans (optional) : Whether or is being used. (default trans=.false.)

  • kdim (optional) : Dimension of the Krylov subspace used in the Arnoldi method.

  • private subroutine kexpm_vec_rsp(c, A, b, tau, tol, info, trans, kdim)

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_vector_rsp), intent(out) :: c

    Best approximation of in the computed Krylov subspace

    class(abstract_linop_rsp), intent(inout) :: A

    Linear operator to be exponentiated.

    class(abstract_vector_rsp), intent(in) :: b

    Input vector on which to apply .

    real(kind=sp), intent(in) :: tau

    Time horizon for the exponentiation.

    real(kind=sp), intent(in) :: tol

    Solution tolerance based on error estimates.

    integer, intent(out) :: info

    Information flag.

    logical, intent(in), optional :: trans

    Use transpose?

    integer, intent(in), optional :: kdim

    Maximum size of the Krylov subspace.

  • private subroutine kexpm_mat_rsp(C, A, B, tau, tol, info, trans, kdim)

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_vector_rsp), intent(out) :: C(:)

    Best Krylov approximation of .

    class(abstract_linop_rsp), intent(inout) :: A

    Linear operator to be exponentiated.

    class(abstract_vector_rsp), intent(in) :: B(:)

    Input matrix on which to apply .

    real(kind=sp), intent(in) :: tau

    Time horizon for the exponentiation.

    real(kind=sp), intent(in) :: tol

    Solution toleance based on error estimates.

    integer, intent(out) :: info

    Information flag.

    logical, intent(in), optional :: trans

    Use transpose ?

    integer, intent(in), optional :: kdim

    Maximum size of the Krylov subspace.

  • private subroutine kexpm_vec_rdp(c, A, b, tau, tol, info, trans, kdim)

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_vector_rdp), intent(out) :: c

    Best approximation of in the computed Krylov subspace

    class(abstract_linop_rdp), intent(inout) :: A

    Linear operator to be exponentiated.

    class(abstract_vector_rdp), intent(in) :: b

    Input vector on which to apply .

    real(kind=dp), intent(in) :: tau

    Time horizon for the exponentiation.

    real(kind=dp), intent(in) :: tol

    Solution tolerance based on error estimates.

    integer, intent(out) :: info

    Information flag.

    logical, intent(in), optional :: trans

    Use transpose?

    integer, intent(in), optional :: kdim

    Maximum size of the Krylov subspace.

  • private subroutine kexpm_mat_rdp(C, A, B, tau, tol, info, trans, kdim)

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_vector_rdp), intent(out) :: C(:)

    Best Krylov approximation of .

    class(abstract_linop_rdp), intent(inout) :: A

    Linear operator to be exponentiated.

    class(abstract_vector_rdp), intent(in) :: B(:)

    Input matrix on which to apply .

    real(kind=dp), intent(in) :: tau

    Time horizon for the exponentiation.

    real(kind=dp), intent(in) :: tol

    Solution toleance based on error estimates.

    integer, intent(out) :: info

    Information flag.

    logical, intent(in), optional :: trans

    Use transpose ?

    integer, intent(in), optional :: kdim

    Maximum size of the Krylov subspace.

  • private subroutine kexpm_vec_csp(c, A, b, tau, tol, info, trans, kdim)

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_vector_csp), intent(out) :: c

    Best approximation of in the computed Krylov subspace

    class(abstract_linop_csp), intent(inout) :: A

    Linear operator to be exponentiated.

    class(abstract_vector_csp), intent(in) :: b

    Input vector on which to apply .

    real(kind=sp), intent(in) :: tau

    Time horizon for the exponentiation.

    real(kind=sp), intent(in) :: tol

    Solution tolerance based on error estimates.

    integer, intent(out) :: info

    Information flag.

    logical, intent(in), optional :: trans

    Use transpose?

    integer, intent(in), optional :: kdim

    Maximum size of the Krylov subspace.

  • private subroutine kexpm_mat_csp(C, A, B, tau, tol, info, trans, kdim)

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_vector_csp), intent(out) :: C(:)

    Best Krylov approximation of .

    class(abstract_linop_csp), intent(inout) :: A

    Linear operator to be exponentiated.

    class(abstract_vector_csp), intent(in) :: B(:)

    Input matrix on which to apply .

    real(kind=sp), intent(in) :: tau

    Time horizon for the exponentiation.

    real(kind=sp), intent(in) :: tol

    Solution toleance based on error estimates.

    integer, intent(out) :: info

    Information flag.

    logical, intent(in), optional :: trans

    Use transpose ?

    integer, intent(in), optional :: kdim

    Maximum size of the Krylov subspace.

  • private subroutine kexpm_vec_cdp(c, A, b, tau, tol, info, trans, kdim)

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_vector_cdp), intent(out) :: c

    Best approximation of in the computed Krylov subspace

    class(abstract_linop_cdp), intent(inout) :: A

    Linear operator to be exponentiated.

    class(abstract_vector_cdp), intent(in) :: b

    Input vector on which to apply .

    real(kind=dp), intent(in) :: tau

    Time horizon for the exponentiation.

    real(kind=dp), intent(in) :: tol

    Solution tolerance based on error estimates.

    integer, intent(out) :: info

    Information flag.

    logical, intent(in), optional :: trans

    Use transpose?

    integer, intent(in), optional :: kdim

    Maximum size of the Krylov subspace.

  • private subroutine kexpm_mat_cdp(C, A, B, tau, tol, info, trans, kdim)

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_vector_cdp), intent(out) :: C(:)

    Best Krylov approximation of .

    class(abstract_linop_cdp), intent(inout) :: A

    Linear operator to be exponentiated.

    class(abstract_vector_cdp), intent(in) :: B(:)

    Input matrix on which to apply .

    real(kind=dp), intent(in) :: tau

    Time horizon for the exponentiation.

    real(kind=dp), intent(in) :: tol

    Solution toleance based on error estimates.

    integer, intent(out) :: info

    Information flag.

    logical, intent(in), optional :: trans

    Use transpose ?

    integer, intent(in), optional :: kdim

    Maximum size of the Krylov subspace.

public interface krylov_exptA

Description

Utility function to evaluate the matrix-exponential times vector.

Syntax

    call k_exptA(vec_out, A, vec_in, tau, info, trans)

Arguments

  • vec_out : Output vector.

  • A : Matrix to be exponentiated.

  • vec_in : Input vector.

  • tau : Integration time.

  • info : Information flag.

  • trans : Whether or is being used.

  • public subroutine krylov_exptA_rsp(vec_out, A, vec_in, tau, info, trans)

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_vector_rsp), intent(out) :: vec_out

    Solution vector.

    class(abstract_linop_rsp), intent(inout) :: A

    Linear operator to be exponentiated.

    class(abstract_vector_rsp), intent(in) :: vec_in

    Input vector to be multiplied by .

    real(kind=sp), intent(in) :: tau

    Time horizon for the exponentiation.

    integer, intent(out) :: info

    Information flag.

    logical, intent(in), optional :: trans

    Use adjoint ?

  • public subroutine krylov_exptA_rdp(vec_out, A, vec_in, tau, info, trans)

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_vector_rdp), intent(out) :: vec_out

    Solution vector.

    class(abstract_linop_rdp), intent(inout) :: A

    Linear operator to be exponentiated.

    class(abstract_vector_rdp), intent(in) :: vec_in

    Input vector to be multiplied by .

    real(kind=dp), intent(in) :: tau

    Time horizon for the exponentiation.

    integer, intent(out) :: info

    Information flag.

    logical, intent(in), optional :: trans

    Use adjoint ?

  • public subroutine krylov_exptA_csp(vec_out, A, vec_in, tau, info, trans)

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_vector_csp), intent(out) :: vec_out

    Solution vector.

    class(abstract_linop_csp), intent(inout) :: A

    Linear operator to be exponentiated.

    class(abstract_vector_csp), intent(in) :: vec_in

    Input vector to be multiplied by .

    real(kind=sp), intent(in) :: tau

    Time horizon for the exponentiation.

    integer, intent(out) :: info

    Information flag.

    logical, intent(in), optional :: trans

    Use adjoint ?

  • public subroutine krylov_exptA_cdp(vec_out, A, vec_in, tau, info, trans)

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_vector_cdp), intent(out) :: vec_out

    Solution vector.

    class(abstract_linop_cdp), intent(inout) :: A

    Linear operator to be exponentiated.

    class(abstract_vector_cdp), intent(in) :: vec_in

    Input vector to be multiplied by .

    real(kind=dp), intent(in) :: tau

    Time horizon for the exponentiation.

    integer, intent(out) :: info

    Information flag.

    logical, intent(in), optional :: trans

    Use adjoint ?


Abstract Interfaces

abstract interface

  • public subroutine abstract_exptA_cdp(vec_out, A, vec_in, tau, info, trans)

    Abstract interface to define the matrix exponential-vector product.

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_vector_cdp), intent(out) :: vec_out

    Solution vector.

    class(abstract_linop_cdp), intent(inout) :: A

    Linear operator to be exponentiated.

    class(abstract_vector_cdp), intent(in) :: vec_in

    Input vector.

    real(kind=dp), intent(in) :: tau

    Time horizon for integration.

    integer, intent(out) :: info

    Information flag.

    logical, intent(in), optional :: trans

    Use transpose ?

abstract interface

  • public subroutine abstract_exptA_csp(vec_out, A, vec_in, tau, info, trans)

    Abstract interface to define the matrix exponential-vector product.

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_vector_csp), intent(out) :: vec_out

    Solution vector.

    class(abstract_linop_csp), intent(inout) :: A

    Linear operator to be exponentiated.

    class(abstract_vector_csp), intent(in) :: vec_in

    Input vector.

    real(kind=sp), intent(in) :: tau

    Time horizon for integration.

    integer, intent(out) :: info

    Information flag.

    logical, intent(in), optional :: trans

    Use transpose ?

abstract interface

  • public subroutine abstract_exptA_rdp(vec_out, A, vec_in, tau, info, trans)

    Abstract interface to define the matrix exponential-vector product.

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_vector_rdp), intent(out) :: vec_out

    Solution vector.

    class(abstract_linop_rdp), intent(inout) :: A

    Linear operator to be exponentiated.

    class(abstract_vector_rdp), intent(in) :: vec_in

    Input vector.

    real(kind=dp), intent(in) :: tau

    Time horizon for integration.

    integer, intent(out) :: info

    Information flag.

    logical, intent(in), optional :: trans

    Use transpose ?

abstract interface

  • public subroutine abstract_exptA_rsp(vec_out, A, vec_in, tau, info, trans)

    Abstract interface to define the matrix exponential-vector product.

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_vector_rsp), intent(out) :: vec_out

    Solution vector.

    class(abstract_linop_rsp), intent(inout) :: A

    Linear operator to be exponentiated.

    class(abstract_vector_rsp), intent(in) :: vec_in

    Input vector.

    real(kind=sp), intent(in) :: tau

    Time horizon for integration.

    integer, intent(out) :: info

    Information flag.

    logical, intent(in), optional :: trans

    Use transpose ?


Subroutines

public subroutine krylov_exptA_cdp(vec_out, A, vec_in, tau, info, trans)

Arguments

Type IntentOptional Attributes Name
class(abstract_vector_cdp), intent(out) :: vec_out

Solution vector.

class(abstract_linop_cdp), intent(inout) :: A

Linear operator to be exponentiated.

class(abstract_vector_cdp), intent(in) :: vec_in

Input vector to be multiplied by .

real(kind=dp), intent(in) :: tau

Time horizon for the exponentiation.

integer, intent(out) :: info

Information flag.

logical, intent(in), optional :: trans

Use adjoint ?

public subroutine krylov_exptA_csp(vec_out, A, vec_in, tau, info, trans)

Arguments

Type IntentOptional Attributes Name
class(abstract_vector_csp), intent(out) :: vec_out

Solution vector.

class(abstract_linop_csp), intent(inout) :: A

Linear operator to be exponentiated.

class(abstract_vector_csp), intent(in) :: vec_in

Input vector to be multiplied by .

real(kind=sp), intent(in) :: tau

Time horizon for the exponentiation.

integer, intent(out) :: info

Information flag.

logical, intent(in), optional :: trans

Use adjoint ?

public subroutine krylov_exptA_rdp(vec_out, A, vec_in, tau, info, trans)

Arguments

Type IntentOptional Attributes Name
class(abstract_vector_rdp), intent(out) :: vec_out

Solution vector.

class(abstract_linop_rdp), intent(inout) :: A

Linear operator to be exponentiated.

class(abstract_vector_rdp), intent(in) :: vec_in

Input vector to be multiplied by .

real(kind=dp), intent(in) :: tau

Time horizon for the exponentiation.

integer, intent(out) :: info

Information flag.

logical, intent(in), optional :: trans

Use adjoint ?

public subroutine krylov_exptA_rsp(vec_out, A, vec_in, tau, info, trans)

Arguments

Type IntentOptional Attributes Name
class(abstract_vector_rsp), intent(out) :: vec_out

Solution vector.

class(abstract_linop_rsp), intent(inout) :: A

Linear operator to be exponentiated.

class(abstract_vector_rsp), intent(in) :: vec_in

Input vector to be multiplied by .

real(kind=sp), intent(in) :: tau

Time horizon for the exponentiation.

integer, intent(out) :: info

Information flag.

logical, intent(in), optional :: trans

Use adjoint ?