double_gram_schmidt_step Interface

public interface double_gram_schmidt_step

Description

Given an array of abstract_vector and an abstract_vector (or array of abstract_vectors) , this subroutine returns a modified vector orthogonal to all columns of , i.e.

using a double Gram-Schmidt process. On exit, is orthogonal to but does not have unit norm. Note moreover that is assumed to be an orthonormal set of vectors. The function can also return the projection coefficients .

Syntax

    call double_gram_schmidt_step(y, X, info [, if_chk_orthonormal] [, beta])

Arguments

  • y : abstract_vector (or array of abstract_vector) that needs to be orthogonalize in-place against . It is an intent(inout) argument.

  • X : Array of abstract_vector against which needs to be orthogonalized. Note the function assumes that is an orthonormal set of vectors, i.e. . If it this is not the case, the result is meaningless. It is an intent(in) argument.

  • info : integer Information flag.

  • if_chk_orthonormal (optional) : logical flag to check whether is an orthonormal set of vectors or not. If the orthonormality returns .false., the function raises an error. Note that this check is computationally expensive and should be disabled in production unless required for better performance. Is is an optional intent(in) argument. Default .true..

  • beta (optional) : real or complex array containing the coefficients . Is is an optional intent(out) argument.


Subroutines

private module subroutine DGS_basis_against_basis_cdp(Y, X, info, if_chk_orthonormal, beta)

Computes one step of the double Gram-Schmidt orthogonalization process of the abstract_vector y against the abstract_vector basis X

Arguments

Type IntentOptional Attributes Name
class(abstract_vector_cdp), intent(inout) :: Y(:)

Input abstract_vector basis to orthogonalize

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

Input abstract_vector basis to orthogonalize against

integer, intent(out) :: info

Information flag.

logical, intent(in), optional :: if_chk_orthonormal

Check that input Krylov vectors X form an orthonormal basis (expensive!). Default .true..

complex(kind=dp), intent(out), optional :: beta(:,:)

Projection coefficients if requested

private module subroutine DGS_basis_against_basis_csp(Y, X, info, if_chk_orthonormal, beta)

Computes one step of the double Gram-Schmidt orthogonalization process of the abstract_vector y against the abstract_vector basis X

Arguments

Type IntentOptional Attributes Name
class(abstract_vector_csp), intent(inout) :: Y(:)

Input abstract_vector basis to orthogonalize

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

Input abstract_vector basis to orthogonalize against

integer, intent(out) :: info

Information flag.

logical, intent(in), optional :: if_chk_orthonormal

Check that input Krylov vectors X form an orthonormal basis (expensive!). Default .true..

complex(kind=sp), intent(out), optional :: beta(:,:)

Projection coefficients if requested

private module subroutine DGS_basis_against_basis_rdp(Y, X, info, if_chk_orthonormal, beta)

Computes one step of the double Gram-Schmidt orthogonalization process of the abstract_vector y against the abstract_vector basis X

Arguments

Type IntentOptional Attributes Name
class(abstract_vector_rdp), intent(inout) :: Y(:)

Input abstract_vector basis to orthogonalize

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

Input abstract_vector basis to orthogonalize against

integer, intent(out) :: info

Information flag.

logical, intent(in), optional :: if_chk_orthonormal

Check that input Krylov vectors X form an orthonormal basis (expensive!). Default .true..

real(kind=dp), intent(out), optional :: beta(:,:)

Projection coefficients if requested

private module subroutine DGS_basis_against_basis_rsp(Y, X, info, if_chk_orthonormal, beta)

Computes one step of the double Gram-Schmidt orthogonalization process of the abstract_vector y against the abstract_vector basis X

Arguments

Type IntentOptional Attributes Name
class(abstract_vector_rsp), intent(inout) :: Y(:)

Input abstract_vector basis to orthogonalize

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

Input abstract_vector basis to orthogonalize against

integer, intent(out) :: info

Information flag.

logical, intent(in), optional :: if_chk_orthonormal

Check that input Krylov vectors X form an orthonormal basis (expensive!). Default .true..

real(kind=sp), intent(out), optional :: beta(:,:)

Projection coefficients if requested

private module subroutine DGS_vector_against_basis_cdp(y, X, info, if_chk_orthonormal, beta)

Computes one step of the double Gram-Schmidt orthogonalization process of the abstract_vector y against the abstract_vector basis X

Arguments

Type IntentOptional Attributes Name
class(abstract_vector_cdp), intent(inout) :: y

Input abstract_vector to orthogonalize

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

Input abstract_vector basis to orthogonalize against

integer, intent(out) :: info

Information flag.

logical, intent(in), optional :: if_chk_orthonormal

Check that input Krylov vectors X form an orthonormal basis (expensive!). Default .true..

complex(kind=dp), intent(out), optional :: beta(:)

Projection coefficients if requested

private module subroutine DGS_vector_against_basis_csp(y, X, info, if_chk_orthonormal, beta)

Computes one step of the double Gram-Schmidt orthogonalization process of the abstract_vector y against the abstract_vector basis X

Arguments

Type IntentOptional Attributes Name
class(abstract_vector_csp), intent(inout) :: y

Input abstract_vector to orthogonalize

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

Input abstract_vector basis to orthogonalize against

integer, intent(out) :: info

Information flag.

logical, intent(in), optional :: if_chk_orthonormal

Check that input Krylov vectors X form an orthonormal basis (expensive!). Default .true..

complex(kind=sp), intent(out), optional :: beta(:)

Projection coefficients if requested

private module subroutine DGS_vector_against_basis_rdp(y, X, info, if_chk_orthonormal, beta)

Computes one step of the double Gram-Schmidt orthogonalization process of the abstract_vector y against the abstract_vector basis X

Arguments

Type IntentOptional Attributes Name
class(abstract_vector_rdp), intent(inout) :: y

Input abstract_vector to orthogonalize

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

Input abstract_vector basis to orthogonalize against

integer, intent(out) :: info

Information flag.

logical, intent(in), optional :: if_chk_orthonormal

Check that input Krylov vectors X form an orthonormal basis (expensive!). Default .true..

real(kind=dp), intent(out), optional :: beta(:)

Projection coefficients if requested

private module subroutine DGS_vector_against_basis_rsp(y, X, info, if_chk_orthonormal, beta)

Computes one step of the double Gram-Schmidt orthogonalization process of the abstract_vector y against the abstract_vector basis X

Arguments

Type IntentOptional Attributes Name
class(abstract_vector_rsp), intent(inout) :: y

Input abstract_vector to orthogonalize

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

Input abstract_vector basis to orthogonalize against

integer, intent(out) :: info

Information flag.

logical, intent(in), optional :: if_chk_orthonormal

Check that input Krylov vectors X form an orthonormal basis (expensive!). Default .true..

real(kind=sp), intent(out), optional :: beta(:)

Projection coefficients if requested