krylov_exptA_csp Subroutine

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 ?


Source Code

    subroutine krylov_exptA_csp(vec_out, A, vec_in, tau, info, trans)
        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 \( \exp(\tau \mathbf{A}) \).
        real(sp), intent(in) :: tau
        !! Time horizon for the exponentiation.
        integer, intent(out) :: info
        !! Information flag.
        logical, optional, intent(in) :: trans
        !! Use adjoint ?

        ! ----- Internal variables -----
        character(len=*), parameter :: this_procedure = 'krylov_exptA_csp'
        real(sp) :: tol
        integer :: kdim

        tol = atol_sp
        kdim = 30

        call kexpm(vec_out, A, vec_in, tau, tol, info, trans=trans, kdim=kdim)
        call check_info(info, 'kexpm', this_module, this_procedure)

        return
    end subroutine krylov_exptA_csp