axpby_basis Interface

public interface axpby_basis

In-place addition of two arrays of extended abstract_vector.

Description

This interface provides methods to add in-place two arrays of extended abstract_vector, i.e.

No out-of-place alternative is currently available in LightKrylov. If you do need an out-of-place version, you can combine axpby_basis with copy.

Example

    type(my_real_vector), dimension(10) :: X
    type(my_real_vector), dimension(10) :: Y
    real(dp), dimension(10)             :: alpha, beta

    ! ... Whatever your code is doing ...

    call axpby_basis(alpha, X, beta, Y)

    ! ... Rest of your code ...

Module Procedures

private impure elemental subroutine axpby_basis_rsp(alpha, x, beta, y)

Compute in-place where X and Y are arrays of abstract_vector and alpha and beta are real(sp) numbers.

Arguments

Type IntentOptional Attributes Name
real(kind=sp), intent(in) :: alpha

Scalar multipliers.

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

Input/Ouput array of abstract_vector.

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

Scalar multipliers.

class(abstract_vector_rsp), intent(inout) :: y

Array of abstract_vector to be added/subtracted to X.

private impure elemental subroutine axpby_basis_rdp(alpha, x, beta, y)

Compute in-place where X and Y are arrays of abstract_vector and alpha and beta are real(dp) numbers.

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: alpha

Scalar multipliers.

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

Input/Ouput array of abstract_vector.

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

Scalar multipliers.

class(abstract_vector_rdp), intent(inout) :: y

Array of abstract_vector to be added/subtracted to X.

private impure elemental subroutine axpby_basis_csp(alpha, x, beta, y)

Compute in-place where X and Y are arrays of abstract_vector and alpha and beta are complex(sp) numbers.

Arguments

Type IntentOptional Attributes Name
complex(kind=sp), intent(in) :: alpha

Scalar multipliers.

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

Input/Ouput array of abstract_vector.

complex(kind=sp), intent(in) :: beta

Scalar multipliers.

class(abstract_vector_csp), intent(inout) :: y

Array of abstract_vector to be added/subtracted to X.

private impure elemental subroutine axpby_basis_cdp(alpha, x, beta, y)

Compute in-place where X and Y are arrays of abstract_vector and alpha and beta are complex(dp) numbers.

Arguments

Type IntentOptional Attributes Name
complex(kind=dp), intent(in) :: alpha

Scalar multipliers.

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

Input/Ouput array of abstract_vector.

complex(kind=dp), intent(in) :: beta

Scalar multipliers.

class(abstract_vector_cdp), intent(inout) :: y

Array of abstract_vector to be added/subtracted to X.