ug4
ug::PowerMethod< TAlgebra > Class Template Reference

#include <power_method.h>

Public Types

typedef TAlgebra algebra_type
 
typedef TAlgebra::matrix_type matrix_type
 
typedef TAlgebra::vector_type vector_type
 
typedef vector_type::value_type vector_value_type
 

Public Member Functions

int calculate_max_eigenvalue ()
 
int calculate_min_eigenvalue ()
 
size_t get_iterations ()
 
double get_max_eigenvalue ()
 
double get_min_eigenvalue ()
 
 PowerMethod ()
 
void print_eigenvector ()
 
void print_matrix_A ()
 
void print_matrix_B ()
 
void set_linear_operator_A (SmartPtr< ILinearOperator< vector_type > > loA)
 
void set_linear_operator_B (SmartPtr< ILinearOperator< vector_type > > loB)
 
void set_max_iterations (size_t maxIterations)
 
void set_precision (double precision)
 
void set_solver (SmartPtr< ILinearOperatorInverse< vector_type > > solver)
 
void set_start_vector (SmartPtr< vector_type > vec)
 

Public Attributes

size_t m_iteration
 

Private Types

typedef IPreconditioner< TAlgebra >::matrix_operator_type matrix_operator_type
 

Private Member Functions

double B_norm (vector_type &x)
 
SmartPtr< vector_typecreate_approximation_vector ()
 
void normalize_approximations ()
 

Private Attributes

double m_dMaxEigenvalue
 
double m_dMinEigenvalue
 
double m_dPrecision
 
size_t m_maxIterations
 
int m_numDirichletRows
 
SmartPtr< vector_typem_spEigenvector
 
SmartPtr< vector_typem_spEigenvectorOld
 
SmartPtr< ILinearOperator< vector_type > > m_spLinOpA
 
SmartPtr< ILinearOperator< vector_type > > m_spLinOpB
 
SmartPtr< matrix_operator_typem_spMatOpA
 
SmartPtr< matrix_operator_typem_spMatOpB
 
SmartPtr< vector_typem_spResidual
 
SmartPtr< ILinearOperatorInverse< vector_type > > m_spSolver
 
std::vector< bool > m_vbDirichlet
 

Detailed Description

template<typename TAlgebra>
class ug::PowerMethod< TAlgebra >

Power Method Eigensolver

The Power Method solves generalized eigenvalue problems of the form A v = lambda B v calculating the largest/smallest (in terms of abs(lambda)) eigenvalues of the problem for sparse matrices A and B which e.g. emerge from FE or FV discretizations.

Member Typedef Documentation

◆ algebra_type

template<typename TAlgebra >
typedef TAlgebra ug::PowerMethod< TAlgebra >::algebra_type

◆ matrix_operator_type

template<typename TAlgebra >
typedef IPreconditioner<TAlgebra>::matrix_operator_type ug::PowerMethod< TAlgebra >::matrix_operator_type
private

◆ matrix_type

template<typename TAlgebra >
typedef TAlgebra::matrix_type ug::PowerMethod< TAlgebra >::matrix_type

◆ vector_type

template<typename TAlgebra >
typedef TAlgebra::vector_type ug::PowerMethod< TAlgebra >::vector_type

◆ vector_value_type

template<typename TAlgebra >
typedef vector_type::value_type ug::PowerMethod< TAlgebra >::vector_value_type

Constructor & Destructor Documentation

◆ PowerMethod()

Member Function Documentation

◆ B_norm()

template<typename TAlgebra >
double ug::PowerMethod< TAlgebra >::B_norm ( vector_type x)
inlineprivate

◆ calculate_max_eigenvalue()

◆ calculate_min_eigenvalue()

◆ create_approximation_vector()

template<typename TAlgebra >
SmartPtr<vector_type> ug::PowerMethod< TAlgebra >::create_approximation_vector ( )
inlineprivate

◆ get_iterations()

template<typename TAlgebra >
size_t ug::PowerMethod< TAlgebra >::get_iterations ( )
inline

◆ get_max_eigenvalue()

template<typename TAlgebra >
double ug::PowerMethod< TAlgebra >::get_max_eigenvalue ( )
inline

◆ get_min_eigenvalue()

template<typename TAlgebra >
double ug::PowerMethod< TAlgebra >::get_min_eigenvalue ( )
inline

◆ normalize_approximations()

◆ print_eigenvector()

template<typename TAlgebra >
void ug::PowerMethod< TAlgebra >::print_eigenvector ( )
inline

◆ print_matrix_A()

template<typename TAlgebra >
void ug::PowerMethod< TAlgebra >::print_matrix_A ( )
inline

◆ print_matrix_B()

template<typename TAlgebra >
void ug::PowerMethod< TAlgebra >::print_matrix_B ( )
inline

◆ set_linear_operator_A()

◆ set_linear_operator_B()

template<typename TAlgebra >
void ug::PowerMethod< TAlgebra >::set_linear_operator_B ( SmartPtr< ILinearOperator< vector_type > >  loB)
inline

◆ set_max_iterations()

template<typename TAlgebra >
void ug::PowerMethod< TAlgebra >::set_max_iterations ( size_t  maxIterations)
inline

◆ set_precision()

template<typename TAlgebra >
void ug::PowerMethod< TAlgebra >::set_precision ( double  precision)
inline

◆ set_solver()

template<typename TAlgebra >
void ug::PowerMethod< TAlgebra >::set_solver ( SmartPtr< ILinearOperatorInverse< vector_type > >  solver)
inline

◆ set_start_vector()

template<typename TAlgebra >
void ug::PowerMethod< TAlgebra >::set_start_vector ( SmartPtr< vector_type vec)
inline

Member Data Documentation

◆ m_dMaxEigenvalue

◆ m_dMinEigenvalue

◆ m_dPrecision

◆ m_iteration

◆ m_maxIterations

◆ m_numDirichletRows

template<typename TAlgebra >
int ug::PowerMethod< TAlgebra >::m_numDirichletRows
private

◆ m_spEigenvector

◆ m_spEigenvectorOld

template<typename TAlgebra >
SmartPtr<vector_type> ug::PowerMethod< TAlgebra >::m_spEigenvectorOld
private

◆ m_spLinOpA

◆ m_spLinOpB

◆ m_spMatOpA

◆ m_spMatOpB

◆ m_spResidual

◆ m_spSolver

◆ m_vbDirichlet


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