sisi4s
Loading...
Searching...
No Matches
sisi4s::EigenSystemDavidson< H, P, V > Class Template Referenceabstract

#include <EigenSystemDavidson.hpp>

Inheritance diagram for sisi4s::EigenSystemDavidson< H, P, V >:
Collaboration diagram for sisi4s::EigenSystemDavidson< H, P, V >:

Public Types

typedef V::FieldType F
 

Public Member Functions

 EigenSystemDavidson (H *h_, const int eigenVectorsCount_, P *p_, const double toleranceVectors, const double toleranceEnergy, const unsigned int maxBasisSize_, const unsigned int maxIterations_, const unsigned int minIterations_)
 ...
 
virtual void run ()=0
 
const std::vector< complex > & getEigenValues () const
 
const std::vector< V > & getRightEigenVectors () const
 
const std::vector< V > & getLeftEigenVectors () const
 
void refreshOnMaxBasisSize (const bool value)
 Controls if the Davidson algorithm should make a refreshment of the basis whenever the maximal basis size has been attained.
 
bool refreshOnMaxBasisSize ()
 Check wether or not the basis should be refreshed whenever the maximal basis size has been reached.
 

Protected Attributes

H * h
 
int eigenVectorsCount
 
P * p
 
struct { 
 
   double   energy 
 
   double   vectors 
 
tolerance 
 
unsigned int maxBasisSize = 1000
 
unsigned int maxIterations = 1000
 
unsigned int minIterations = 1
 
std::vector< int > refreshIterations = std::vector<int>{{}}
 
bool refreshOnMaxBasisSizeValue = false
 
std::vector< complexeigenValues
 
std::vector< V > rightEigenVectors
 
std::vector< V > leftEigenVectors
 

Member Typedef Documentation

◆ F

template<typename H , typename P , typename V >
typedef V::FieldType sisi4s::EigenSystemDavidson< H, P, V >::F

Constructor & Destructor Documentation

◆ EigenSystemDavidson()

template<typename H , typename P , typename V >
sisi4s::EigenSystemDavidson< H, P, V >::EigenSystemDavidson ( H *  h_,
const int  eigenVectorsCount_,
P *  p_,
const double  toleranceVectors,
const double  toleranceEnergy,
const unsigned int  maxBasisSize_,
const unsigned int  maxIterations_,
const unsigned int  minIterations_ 
)
inline

...

Parameters
[in]hobject representing the matrix whose eigen system is sought offering the following method: V right_apply(V &v); Also, if the dual version of the Davidson algorithm is to be used h should offer the leftApply method V leftApply(V &v); returning the action of h on v standing right of h.
[in]eigenVectorsCountthe number of eigenvalues and vectors to be computed.
[in]pobject representing the preconditioner offering the following method: std::vector<V> getInitialBasis(int eigenVectorsCount); returning an initial guess the basis consisting of eigenVectorsCount vectors. V getCorrection(const complex eigenValue, V &residuum); computing the estimated correction for the k-th eigenvector given its eigenvalue and the residuum of the current k-th estimated eigenvector.
[in]tolerancethe targeted relative tolerance to be met by all residua.
[in]maxBasisSizethe maximum allowed number of vectors representing eigenvectors.
[in]dualVersionIf the dual version of the algorithm is to be used. The dual version of the algorithm calculates both the right and left eigenvectors of the h object. If the dual version is not to be used then only the right eigenvectors are to be calculated.
[in]refreshIterationsThis vector of integers represents the iterations where the refreshment should be done. Refreshment meaning that the trial Davidson basis should be thrown away and only keep the current approximations to the eigenvectors.

Member Function Documentation

◆ getEigenValues()

template<typename H , typename P , typename V >
const std::vector< complex > & sisi4s::EigenSystemDavidson< H, P, V >::getEigenValues ( ) const
inline
Here is the caller graph for this function:

◆ getLeftEigenVectors()

template<typename H , typename P , typename V >
const std::vector< V > & sisi4s::EigenSystemDavidson< H, P, V >::getLeftEigenVectors ( ) const
inline

◆ getRightEigenVectors()

template<typename H , typename P , typename V >
const std::vector< V > & sisi4s::EigenSystemDavidson< H, P, V >::getRightEigenVectors ( ) const
inline
Here is the caller graph for this function:

◆ refreshOnMaxBasisSize() [1/2]

template<typename H , typename P , typename V >
bool sisi4s::EigenSystemDavidson< H, P, V >::refreshOnMaxBasisSize ( )
inline

Check wether or not the basis should be refreshed whenever the maximal basis size has been reached.

◆ refreshOnMaxBasisSize() [2/2]

template<typename H , typename P , typename V >
void sisi4s::EigenSystemDavidson< H, P, V >::refreshOnMaxBasisSize ( const bool  value)
inline

Controls if the Davidson algorithm should make a refreshment of the basis whenever the maximal basis size has been attained.

Parameters
[in]valueIf value is true, it will be refreshed, otherwise not.
Here is the caller graph for this function:

◆ run()

template<typename H , typename P , typename V >
virtual void sisi4s::EigenSystemDavidson< H, P, V >::run ( )
pure virtual

Member Data Documentation

◆ eigenValues

template<typename H , typename P , typename V >
std::vector<complex> sisi4s::EigenSystemDavidson< H, P, V >::eigenValues
protected

◆ eigenVectorsCount

template<typename H , typename P , typename V >
int sisi4s::EigenSystemDavidson< H, P, V >::eigenVectorsCount
protected

◆ energy

template<typename H , typename P , typename V >
double sisi4s::EigenSystemDavidson< H, P, V >::energy

◆ h

template<typename H , typename P , typename V >
H* sisi4s::EigenSystemDavidson< H, P, V >::h
protected

◆ leftEigenVectors

template<typename H , typename P , typename V >
std::vector<V> sisi4s::EigenSystemDavidson< H, P, V >::leftEigenVectors
protected

◆ maxBasisSize

template<typename H , typename P , typename V >
unsigned int sisi4s::EigenSystemDavidson< H, P, V >::maxBasisSize = 1000
protected

◆ maxIterations

template<typename H , typename P , typename V >
unsigned int sisi4s::EigenSystemDavidson< H, P, V >::maxIterations = 1000
protected

◆ minIterations

template<typename H , typename P , typename V >
unsigned int sisi4s::EigenSystemDavidson< H, P, V >::minIterations = 1
protected

◆ p

template<typename H , typename P , typename V >
P* sisi4s::EigenSystemDavidson< H, P, V >::p
protected

◆ refreshIterations

template<typename H , typename P , typename V >
std::vector<int> sisi4s::EigenSystemDavidson< H, P, V >::refreshIterations = std::vector<int>{{}}
protected

◆ refreshOnMaxBasisSizeValue

template<typename H , typename P , typename V >
bool sisi4s::EigenSystemDavidson< H, P, V >::refreshOnMaxBasisSizeValue = false
protected

◆ rightEigenVectors

template<typename H , typename P , typename V >
std::vector<V> sisi4s::EigenSystemDavidson< H, P, V >::rightEigenVectors
protected

◆ [struct]

const struct { ... } sisi4s::EigenSystemDavidson< H, P, V >::tolerance

◆ vectors

template<typename H , typename P , typename V >
double sisi4s::EigenSystemDavidson< H, P, V >::vectors

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