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 .
call double_gram_schmidt_step(y, X, info [, if_chk_orthonormal] [, beta])
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.
Computes one step of the double Gram-Schmidt orthogonalization process of the
abstract_vector
y
against the abstract_vector
basis X
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_cdp), | intent(inout) | :: | Y(:) |
Input |
||
class(abstract_vector_cdp), | intent(in) | :: | X(:) |
Input |
||
integer, | intent(out) | :: | info |
Information flag. |
||
logical, | intent(in), | optional | :: | if_chk_orthonormal |
Check that input Krylov vectors |
|
complex(kind=dp), | intent(out), | optional | :: | beta(:,:) |
Projection coefficients if requested |
Computes one step of the double Gram-Schmidt orthogonalization process of the
abstract_vector
y
against the abstract_vector
basis X
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_csp), | intent(inout) | :: | Y(:) |
Input |
||
class(abstract_vector_csp), | intent(in) | :: | X(:) |
Input |
||
integer, | intent(out) | :: | info |
Information flag. |
||
logical, | intent(in), | optional | :: | if_chk_orthonormal |
Check that input Krylov vectors |
|
complex(kind=sp), | intent(out), | optional | :: | beta(:,:) |
Projection coefficients if requested |
Computes one step of the double Gram-Schmidt orthogonalization process of the
abstract_vector
y
against the abstract_vector
basis X
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_rdp), | intent(inout) | :: | Y(:) |
Input |
||
class(abstract_vector_rdp), | intent(in) | :: | X(:) |
Input |
||
integer, | intent(out) | :: | info |
Information flag. |
||
logical, | intent(in), | optional | :: | if_chk_orthonormal |
Check that input Krylov vectors |
|
real(kind=dp), | intent(out), | optional | :: | beta(:,:) |
Projection coefficients if requested |
Computes one step of the double Gram-Schmidt orthogonalization process of the
abstract_vector
y
against the abstract_vector
basis X
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_rsp), | intent(inout) | :: | Y(:) |
Input |
||
class(abstract_vector_rsp), | intent(in) | :: | X(:) |
Input |
||
integer, | intent(out) | :: | info |
Information flag. |
||
logical, | intent(in), | optional | :: | if_chk_orthonormal |
Check that input Krylov vectors |
|
real(kind=sp), | intent(out), | optional | :: | beta(:,:) |
Projection coefficients if requested |
Computes one step of the double Gram-Schmidt orthogonalization process of the
abstract_vector
y
against the abstract_vector
basis X
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_cdp), | intent(inout) | :: | y |
Input |
||
class(abstract_vector_cdp), | intent(in) | :: | X(:) |
Input |
||
integer, | intent(out) | :: | info |
Information flag. |
||
logical, | intent(in), | optional | :: | if_chk_orthonormal |
Check that input Krylov vectors |
|
complex(kind=dp), | intent(out), | optional | :: | beta(:) |
Projection coefficients if requested |
Computes one step of the double Gram-Schmidt orthogonalization process of the
abstract_vector
y
against the abstract_vector
basis X
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_csp), | intent(inout) | :: | y |
Input |
||
class(abstract_vector_csp), | intent(in) | :: | X(:) |
Input |
||
integer, | intent(out) | :: | info |
Information flag. |
||
logical, | intent(in), | optional | :: | if_chk_orthonormal |
Check that input Krylov vectors |
|
complex(kind=sp), | intent(out), | optional | :: | beta(:) |
Projection coefficients if requested |
Computes one step of the double Gram-Schmidt orthogonalization process of the
abstract_vector
y
against the abstract_vector
basis X
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_rdp), | intent(inout) | :: | y |
Input |
||
class(abstract_vector_rdp), | intent(in) | :: | X(:) |
Input |
||
integer, | intent(out) | :: | info |
Information flag. |
||
logical, | intent(in), | optional | :: | if_chk_orthonormal |
Check that input Krylov vectors |
|
real(kind=dp), | intent(out), | optional | :: | beta(:) |
Projection coefficients if requested |
Computes one step of the double Gram-Schmidt orthogonalization process of the
abstract_vector
y
against the abstract_vector
basis X
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_rsp), | intent(inout) | :: | y |
Input |
||
class(abstract_vector_rsp), | intent(in) | :: | X(:) |
Input |
||
integer, | intent(out) | :: | info |
Information flag. |
||
logical, | intent(in), | optional | :: | if_chk_orthonormal |
Check that input Krylov vectors |
|
real(kind=sp), | intent(out), | optional | :: | beta(:) |
Projection coefficients if requested |