ROL
ROL::Lanczos< Real > Class Template Reference

Interface for computing the Lanczos vectors and approximate solutions to symmetric indefinite linear systems. More...

#include <ROL_Lanczos.hpp>

Public Types

enum class  FLAG_ITERATE : unsigned {
  ITERATE_SUCCESS = 0 , ITERATE_SMALL_BETA , ITERATE_MAX_REACHED , ITERATE_ORTHO_TOL ,
  ITERATE_LAST
}
enum class  FLAG_SOLVE : unsigned { SOLVE_SUCCESS = 0 , SOLVE_ILLEGAL_VALUE , SOLVE_SINGULAR_U , SOLVE_LAST }

Public Member Functions

 Lanczos (ROL::ParameterList &PL)
void initialize (const V &b)
void initialize (const V &x0, const V &b, const LO &A, Real &tol)
void reset (const V &b)
void reset (const V &x0, const V &b, const LO &A, Real &tol)
FLAG_ITERATE iterate (const OP &A, Real &tol)
void eigenvalues (std::vector< Real > &E)
FLAG_SOLVE solve (V &x, Real tau=0)

Private Types

template<typename T>
using vector = std::vector<T>
typedef Vector< Real > V
typedef LinearOperator< Real > OP
typedef ROL::ParameterList PL

Private Member Functions

void allocate (void)

Private Attributes

template vector< Real > size_type uint
ROL::LAPACK< int, Real > lapack_
vector< ROL::Ptr< V > > Q_
vector< Real > alpha_
vector< Real > beta_
vector< Real > dl_
vector< Real > d_
vector< Real > du_
vector< Real > du2_
vector< Real > y_
vector< Real > work_
vector< int > ipiv_
ROL::Ptr< Vu_
Real max_beta_
Real tol_beta_
Real tol_ortho_
int maxit_
int k_

Detailed Description

template<class Real>
class ROL::Lanczos< Real >

Interface for computing the Lanczos vectors and approximate solutions to symmetric indefinite linear systems.

Definition at line 30 of file ROL_Lanczos.hpp.

Member Typedef Documentation

◆ vector

template<class Real>
template<typename T>
using ROL::Lanczos< Real >::vector = std::vector<T>
private

Definition at line 33 of file ROL_Lanczos.hpp.

◆ V

template<class Real>
typedef Vector<Real> ROL::Lanczos< Real >::V
private

Definition at line 37 of file ROL_Lanczos.hpp.

◆ OP

template<class Real>
typedef LinearOperator<Real> ROL::Lanczos< Real >::OP
private

Definition at line 38 of file ROL_Lanczos.hpp.

◆ PL

template<class Real>
typedef ROL::ParameterList ROL::Lanczos< Real >::PL
private

Definition at line 40 of file ROL_Lanczos.hpp.

Member Enumeration Documentation

◆ FLAG_ITERATE

template<class Real>
enum class ROL::Lanczos::FLAG_ITERATE : unsigned
strong
Enumerator
ITERATE_SUCCESS 
ITERATE_SMALL_BETA 
ITERATE_MAX_REACHED 
ITERATE_ORTHO_TOL 
ITERATE_LAST 

Definition at line 101 of file ROL_Lanczos.hpp.

◆ FLAG_SOLVE

template<class Real>
enum class ROL::Lanczos::FLAG_SOLVE : unsigned
strong
Enumerator
SOLVE_SUCCESS 
SOLVE_ILLEGAL_VALUE 
SOLVE_SINGULAR_U 
SOLVE_LAST 

Definition at line 109 of file ROL_Lanczos.hpp.

Constructor & Destructor Documentation

◆ Lanczos()

template<class Real>
ROL::Lanczos< Real >::Lanczos ( ROL::ParameterList & PL)
inline

Definition at line 117 of file ROL_Lanczos.hpp.

References maxit_, ROL::ROL_EPSILON(), tol_beta_, and tol_ortho_.

Member Function Documentation

◆ allocate()

template<class Real>
void ROL::Lanczos< Real >::allocate ( void )
inlineprivate

Definition at line 73 of file ROL_Lanczos.hpp.

References alpha_, beta_, d_, dl_, du2_, du_, ipiv_, maxit_, Q_, u_, uint, work_, and y_.

Referenced by initialize(), and initialize().

◆ initialize() [1/2]

template<class Real>
void ROL::Lanczos< Real >::initialize ( const V & b)
inline

Definition at line 129 of file ROL_Lanczos.hpp.

References allocate(), and reset().

◆ initialize() [2/2]

template<class Real>
void ROL::Lanczos< Real >::initialize ( const V & x0,
const V & b,
const LO & A,
Real & tol )
inline

Definition at line 135 of file ROL_Lanczos.hpp.

References allocate(), and reset().

◆ reset() [1/2]

template<class Real>
void ROL::Lanczos< Real >::reset ( const V & b)
inline

Definition at line 142 of file ROL_Lanczos.hpp.

References beta_, k_, max_beta_, and Q_.

Referenced by initialize(), and initialize().

◆ reset() [2/2]

template<class Real>
void ROL::Lanczos< Real >::reset ( const V & x0,
const V & b,
const LO & A,
Real & tol )
inline

Definition at line 151 of file ROL_Lanczos.hpp.

References beta_, k_, max_beta_, Q_, and u_.

◆ iterate()

template<class Real>
FLAG_ITERATE ROL::Lanczos< Real >::iterate ( const OP & A,
Real & tol )
inline

◆ eigenvalues()

template<class Real>
void ROL::Lanczos< Real >::eigenvalues ( std::vector< Real > & E)
inline

Definition at line 208 of file ROL_Lanczos.hpp.

References alpha_, beta_, d_, du_, k_, lapack_, SOLVE_ILLEGAL_VALUE, SOLVE_SINGULAR_U, and work_.

◆ solve()

template<class Real>
FLAG_SOLVE ROL::Lanczos< Real >::solve ( V & x,
Real tau = 0 )
inline

Definition at line 229 of file ROL_Lanczos.hpp.

References alpha_, beta_, d_, dl_, du2_, du_, ipiv_, k_, lapack_, maxit_, uint, and y_.

Member Data Documentation

◆ uint

template<class Real>
template vector<Real> size_type ROL::Lanczos< Real >::uint
private

Definition at line 35 of file ROL_Lanczos.hpp.

Referenced by allocate(), and solve().

◆ lapack_

template<class Real>
ROL::LAPACK<int,Real> ROL::Lanczos< Real >::lapack_
private

Definition at line 44 of file ROL_Lanczos.hpp.

Referenced by eigenvalues(), and solve().

◆ Q_

template<class Real>
vector<ROL::Ptr<V> > ROL::Lanczos< Real >::Q_
private

Definition at line 46 of file ROL_Lanczos.hpp.

Referenced by allocate(), iterate(), reset(), and reset().

◆ alpha_

template<class Real>
vector<Real> ROL::Lanczos< Real >::alpha_
private

Definition at line 47 of file ROL_Lanczos.hpp.

Referenced by allocate(), eigenvalues(), iterate(), and solve().

◆ beta_

template<class Real>
vector<Real> ROL::Lanczos< Real >::beta_
private

Definition at line 48 of file ROL_Lanczos.hpp.

Referenced by allocate(), eigenvalues(), iterate(), reset(), reset(), and solve().

◆ dl_

template<class Real>
vector<Real> ROL::Lanczos< Real >::dl_
private

Definition at line 51 of file ROL_Lanczos.hpp.

Referenced by allocate(), and solve().

◆ d_

template<class Real>
vector<Real> ROL::Lanczos< Real >::d_
private

Definition at line 52 of file ROL_Lanczos.hpp.

Referenced by allocate(), eigenvalues(), and solve().

◆ du_

template<class Real>
vector<Real> ROL::Lanczos< Real >::du_
private

Definition at line 53 of file ROL_Lanczos.hpp.

Referenced by allocate(), eigenvalues(), and solve().

◆ du2_

template<class Real>
vector<Real> ROL::Lanczos< Real >::du2_
private

Definition at line 54 of file ROL_Lanczos.hpp.

Referenced by allocate(), and solve().

◆ y_

template<class Real>
vector<Real> ROL::Lanczos< Real >::y_
private

Definition at line 55 of file ROL_Lanczos.hpp.

Referenced by allocate(), and solve().

◆ work_

template<class Real>
vector<Real> ROL::Lanczos< Real >::work_
private

Definition at line 57 of file ROL_Lanczos.hpp.

Referenced by allocate(), and eigenvalues().

◆ ipiv_

template<class Real>
vector<int> ROL::Lanczos< Real >::ipiv_
private

Definition at line 58 of file ROL_Lanczos.hpp.

Referenced by allocate(), and solve().

◆ u_

template<class Real>
ROL::Ptr<V> ROL::Lanczos< Real >::u_
private

Definition at line 60 of file ROL_Lanczos.hpp.

Referenced by allocate(), iterate(), and reset().

◆ max_beta_

template<class Real>
Real ROL::Lanczos< Real >::max_beta_
private

Definition at line 62 of file ROL_Lanczos.hpp.

Referenced by iterate(), reset(), and reset().

◆ tol_beta_

template<class Real>
Real ROL::Lanczos< Real >::tol_beta_
private

Definition at line 63 of file ROL_Lanczos.hpp.

Referenced by iterate(), and Lanczos().

◆ tol_ortho_

template<class Real>
Real ROL::Lanczos< Real >::tol_ortho_
private

Definition at line 65 of file ROL_Lanczos.hpp.

Referenced by iterate(), and Lanczos().

◆ maxit_

template<class Real>
int ROL::Lanczos< Real >::maxit_
private

Definition at line 67 of file ROL_Lanczos.hpp.

Referenced by allocate(), iterate(), Lanczos(), and solve().

◆ k_

template<class Real>
int ROL::Lanczos< Real >::k_
private

Definition at line 69 of file ROL_Lanczos.hpp.

Referenced by eigenvalues(), iterate(), reset(), reset(), and solve().


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