ergo
mat::arn::Lanczos< Treal, Tmatrix, Tvector > Class Template Referenceabstract

Class template for building Krylov subspaces with Lanczos. More...

#include <Lanczos.h>

Inheritance diagram for mat::arn::Lanczos< Treal, Tmatrix, Tvector >:
mat::arn::LanczosLargestMagnitudeEig< Treal, Tmatrix, Tvector > mat::arn::LanczosLargestMagnitudeEigIfSmall< Treal, Tmatrix, Tvector >

Public Member Functions

 Lanczos (Tmatrix const &AA, Tvector const &startVec, int maxIt=100, int cap=100)
 
void restart (Tvector const &startVec)
 
virtual void run ()
 
void copyTridiag (MatrixTridiagSymmetric< Treal > &Tricopy)
 
virtual ~Lanczos ()
 

Protected Member Functions

void increaseCapacity (int const newCapacity)
 
void step ()
 
void getEigVector (Tvector &eigVec, Treal const *const eVecTri) const
 
virtual void update ()=0
 
virtual bool converged () const =0
 

Protected Attributes

Tmatrix const & A
 
Tvector * v
 
Tvector r
 Vectors spanning Krylov subspace. More...
 
MatrixTridiagSymmetric< Treal > Tri
 Residual vector. More...
 
int capacity
 
int j
 
int maxIter
 Current step. More...
 

Private Attributes

Treal alpha
 
Treal beta
 

Detailed Description

template<typename Treal, typename Tmatrix, typename Tvector>
class mat::arn::Lanczos< Treal, Tmatrix, Tvector >

Class template for building Krylov subspaces with Lanczos.

Build up Krylov subspace for symmetric matrix with a Lanczos process.

Treal: Type for real numbers

Tmatrix: The matrix class

Tvector: Vector class

Constructor & Destructor Documentation

◆ Lanczos()

template<typename Treal , typename Tmatrix , typename Tvector >
mat::arn::Lanczos< Treal, Tmatrix, Tvector >::Lanczos ( Tmatrix const &  AA,
Tvector const &  startVec,
int  maxIt = 100,
int  cap = 100 
)
inline

◆ ~Lanczos()

template<typename Treal , typename Tmatrix , typename Tvector >
virtual mat::arn::Lanczos< Treal, Tmatrix, Tvector >::~Lanczos ( )
inlinevirtual

Member Function Documentation

◆ converged()

template<typename Treal , typename Tmatrix , typename Tvector >
virtual bool mat::arn::Lanczos< Treal, Tmatrix, Tvector >::converged ( ) const
protectedpure virtual

◆ copyTridiag()

template<typename Treal , typename Tmatrix , typename Tvector >
void mat::arn::Lanczos< Treal, Tmatrix, Tvector >::copyTridiag ( MatrixTridiagSymmetric< Treal > &  Tricopy)
inline

◆ getEigVector()

template<typename Treal , typename Tmatrix , typename Tvector >
void mat::arn::Lanczos< Treal, Tmatrix, Tvector >::getEigVector ( Tvector &  eigVec,
Treal const *const  eVecTri 
) const
protected

◆ increaseCapacity()

template<typename Treal , typename Tmatrix , typename Tvector >
void mat::arn::Lanczos< Treal, Tmatrix, Tvector >::increaseCapacity ( int const  newCapacity)
protected

◆ restart()

◆ run()

◆ step()

template<typename Treal , typename Tmatrix , typename Tvector >
void mat::arn::Lanczos< Treal, Tmatrix, Tvector >::step
protected

◆ update()

template<typename Treal , typename Tmatrix , typename Tvector >
virtual void mat::arn::Lanczos< Treal, Tmatrix, Tvector >::update ( )
protectedpure virtual

Member Data Documentation

◆ A

template<typename Treal , typename Tmatrix , typename Tvector >
Tmatrix const& mat::arn::Lanczos< Treal, Tmatrix, Tvector >::A
protected

◆ alpha

template<typename Treal , typename Tmatrix , typename Tvector >
Treal mat::arn::Lanczos< Treal, Tmatrix, Tvector >::alpha
private

◆ beta

template<typename Treal , typename Tmatrix , typename Tvector >
Treal mat::arn::Lanczos< Treal, Tmatrix, Tvector >::beta
private

◆ capacity

template<typename Treal , typename Tmatrix , typename Tvector >
int mat::arn::Lanczos< Treal, Tmatrix, Tvector >::capacity
protected

◆ j

template<typename Treal , typename Tmatrix , typename Tvector >
int mat::arn::Lanczos< Treal, Tmatrix, Tvector >::j
protected

◆ maxIter

template<typename Treal , typename Tmatrix , typename Tvector >
int mat::arn::Lanczos< Treal, Tmatrix, Tvector >::maxIter
protected

◆ r

template<typename Treal , typename Tmatrix , typename Tvector >
Tvector mat::arn::Lanczos< Treal, Tmatrix, Tvector >::r
protected

Vectors spanning Krylov subspace.

In step j: Vectors 0 : j-2 is on file Vectors j-1 : j is in memory

Referenced by mat::arn::Lanczos< Treal, Tmatrix, Tvector >::Lanczos(), and mat::arn::Lanczos< Treal, Tmatrix, Tvector >::restart().

◆ Tri

template<typename Treal , typename Tmatrix , typename Tvector >
MatrixTridiagSymmetric<Treal> mat::arn::Lanczos< Treal, Tmatrix, Tvector >::Tri
protected

◆ v

template<typename Treal , typename Tmatrix , typename Tvector >
Tvector* mat::arn::Lanczos< Treal, Tmatrix, Tvector >::v
protected

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