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(X, alpha, Y, beta)

    ! ... Rest of your code ...

Module Procedures

private subroutine axpby_basis_rsp(X, alpha, Y, beta)

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
class(abstract_vector_rsp), intent(inout) :: X(:)

Input/Ouput array of abstract_vector.

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

Scalar multipliers.

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

Array of abstract_vector to be added/subtracted to X.

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

Scalar multipliers.

private subroutine axpby_basis_rdp(X, alpha, Y, beta)

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
class(abstract_vector_rdp), intent(inout) :: X(:)

Input/Ouput array of abstract_vector.

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

Scalar multipliers.

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

Array of abstract_vector to be added/subtracted to X.

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

Scalar multipliers.

private subroutine axpby_basis_csp(X, alpha, Y, beta)

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
class(abstract_vector_csp), intent(inout) :: X(:)

Input/Ouput array of abstract_vector.

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

Scalar multipliers.

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

Array of abstract_vector to be added/subtracted to X.

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

Scalar multipliers.

private subroutine axpby_basis_cdp(X, alpha, Y, beta)

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
class(abstract_vector_cdp), intent(inout) :: X(:)

Input/Ouput array of abstract_vector.

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

Scalar multipliers.

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

Array of abstract_vector to be added/subtracted to X.

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

Scalar multipliers.