Stokhos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Static Public Member Functions | List of all members
Stokhos::Lanczos< vectorspace_type, operator_type > Class Template Reference

Applies Lanczos procedure to a given matrix. More...

#include <Stokhos_Lanczos.hpp>

Public Types

typedef operator_type::ordinal_type ordinal_type
 
typedef operator_type::value_type value_type
 
typedef
Teuchos::SerialDenseVector
< ordinal_type, value_type
vector_type
 
typedef
Teuchos::SerialDenseMatrix
< ordinal_type, value_type
matrix_type
 

Static Public Member Functions

static void compute (ordinal_type k, const vectorspace_type &vs, const operator_type &A, const vector_type &u_init, matrix_type &u, Teuchos::Array< value_type > &alpha, Teuchos::Array< value_type > &beta, Teuchos::Array< value_type > &nrm_sqrd)
 Compute Lanczos basis. More...
 
static void computeNormalized (ordinal_type k, const vectorspace_type &vs, const operator_type &A, const vector_type &u_init, matrix_type &u, Teuchos::Array< value_type > &alpha, Teuchos::Array< value_type > &beta, Teuchos::Array< value_type > &nrm_sqrd)
 Compute Lanczos basis. More...
 
static void gramSchmidt (ordinal_type k, const vectorspace_type &vs, matrix_type &u, vector_type &u2)
 Gram-Schmidt orthogonalization routine. More...
 

Detailed Description

template<typename vectorspace_type, typename operator_type>
class Stokhos::Lanczos< vectorspace_type, operator_type >

Applies Lanczos procedure to a given matrix.

Given a matrix $A$, a starting vector $u_0$, and integer $k>0$, applies the Lanczos procedure to compute an orthogonal basis for the Krylov subspace

\[ \mathcal{K}(A, u_0, k) = \{ u_0, A_u_0, A^2 u_0, \dots, A^k u_0 \}. \]

The basis vectors are given by

\[ u_{i+1} = Au_i - \alpha_i u_i - \beta_i u_{i-1}, \;\; i=0,\dots,k \]

where $u_{-1} = 0$ and

\[ alpha_i = \frac{u_i^T W (Au_i)}{u_i^T W u_i}, \;\; beta_i = \frac{u_i^T W u_i}{u_{i-1}^T W u_{i-1}}. \]

Here $W$ is a diagonal weighting matrix.

Definition at line 121 of file Stokhos_Lanczos.hpp.

Member Typedef Documentation

template<typename vectorspace_type , typename operator_type >
typedef operator_type::ordinal_type Stokhos::Lanczos< vectorspace_type, operator_type >::ordinal_type

Definition at line 124 of file Stokhos_Lanczos.hpp.

template<typename vectorspace_type , typename operator_type >
typedef operator_type::value_type Stokhos::Lanczos< vectorspace_type, operator_type >::value_type

Definition at line 125 of file Stokhos_Lanczos.hpp.

template<typename vectorspace_type , typename operator_type >
typedef Teuchos::SerialDenseVector<ordinal_type,value_type> Stokhos::Lanczos< vectorspace_type, operator_type >::vector_type

Definition at line 126 of file Stokhos_Lanczos.hpp.

template<typename vectorspace_type , typename operator_type >
typedef Teuchos::SerialDenseMatrix<ordinal_type,value_type> Stokhos::Lanczos< vectorspace_type, operator_type >::matrix_type

Definition at line 127 of file Stokhos_Lanczos.hpp.

Member Function Documentation

template<typename vectorspace_type , typename operator_type >
static void Stokhos::Lanczos< vectorspace_type, operator_type >::compute ( ordinal_type  k,
const vectorspace_type &  vs,
const operator_type &  A,
const vector_type u_init,
matrix_type u,
Teuchos::Array< value_type > &  alpha,
Teuchos::Array< value_type > &  beta,
Teuchos::Array< value_type > &  nrm_sqrd 
)
inlinestatic

Compute Lanczos basis.

Definition at line 130 of file Stokhos_Lanczos.hpp.

template<typename vectorspace_type , typename operator_type >
static void Stokhos::Lanczos< vectorspace_type, operator_type >::computeNormalized ( ordinal_type  k,
const vectorspace_type &  vs,
const operator_type &  A,
const vector_type u_init,
matrix_type u,
Teuchos::Array< value_type > &  alpha,
Teuchos::Array< value_type > &  beta,
Teuchos::Array< value_type > &  nrm_sqrd 
)
inlinestatic

Compute Lanczos basis.

Definition at line 194 of file Stokhos_Lanczos.hpp.

template<typename vectorspace_type , typename operator_type >
static void Stokhos::Lanczos< vectorspace_type, operator_type >::gramSchmidt ( ordinal_type  k,
const vectorspace_type &  vs,
matrix_type u,
vector_type u2 
)
inlinestatic

Gram-Schmidt orthogonalization routine.

Definition at line 251 of file Stokhos_Lanczos.hpp.


The documentation for this class was generated from the following file: