ergo
per::Perturbation< Treal, Tmatrix, Tvector > Class Template Reference

#include <Perturbation.h>

Public Member Functions

 Perturbation (std::vector< Tmatrix * > const &F, std::vector< Tmatrix * > &D, mat::Interval< Treal > const &gap, mat::Interval< Treal > const &allEigs, Treal const deltaMax, Treal const errorTol, mat::normType const norm, Tvector &vect)
 
void perturb ()
 
void checkIdempotencies (std::vector< Treal > &idemErrors)
 
template<typename TmatNoSymm>
void checkCommutators (std::vector< Treal > &commErrors, TmatNoSymm const &dummyMat)
 
void checkMaxSubspaceError (Treal &subsError)
 

Protected Member Functions

void dryRun ()
 Dry run to obtain some needed numbers.
 
void run ()
 

Protected Attributes

std::vector< Tmatrix * > const & F
 
std::vector< Tmatrix * > & X
 
mat::Interval< Treal > gap
 
mat::Interval< Treal > const & allEigs
 
Treal deltaMax
 
Treal errorTol
 
mat::normType const norm
 
Tvector & vect
 
int nIter
 
std::vector< Treal > threshVal
 
std::vector< Treal > sigma
 

Constructor & Destructor Documentation

◆ Perturbation()

template<typename Treal, typename Tmatrix, typename Tvector>
per::Perturbation< Treal, Tmatrix, Tvector >::Perturbation ( std::vector< Tmatrix * > const & F,
std::vector< Tmatrix * > & D,
mat::Interval< Treal > const & gap,
mat::Interval< Treal > const & allEigs,
Treal const deltaMax,
Treal const errorTol,
mat::normType const norm,
Tvector & vect )
Parameters
FVector with matrices (input).
DVector with matrices (output).
gapBand gap.
allEigsInterval containing all eigenvalues of X0 + delta*X1 + delta^2*X2 + ... for all delta in [0, deltaMax] for initial X.
deltaMaxLargest allowed delta.
errorTolError tolerance.
normNorm for truncation etc.
vectVector.

References allEigs, deltaMax, errorTol, F, gap, norm, vect, and X.

Member Function Documentation

◆ checkCommutators()

template<typename Treal, typename Tmatrix, typename Tvector>
template<typename TmatNoSymm>
void per::Perturbation< Treal, Tmatrix, Tvector >::checkCommutators ( std::vector< Treal > & commErrors,
TmatNoSymm const & dummyMat )

References F, and X.

Referenced by mainFun().

◆ checkIdempotencies()

template<typename Treal, typename Tmatrix, typename Tvector>
void per::Perturbation< Treal, Tmatrix, Tvector >::checkIdempotencies ( std::vector< Treal > & idemErrors)

References vect, and X.

Referenced by mainFun().

◆ checkMaxSubspaceError()

template<typename Treal, typename Tmatrix, typename Tvector>
void per::Perturbation< Treal, Tmatrix, Tvector >::checkMaxSubspaceError ( Treal & subsError)

References allEigs, deltaMax, errorTol, F, nIter, sigma, vect, and X.

Referenced by mainFun().

◆ dryRun()

template<typename Treal, typename Tmatrix, typename Tvector>
void per::Perturbation< Treal, Tmatrix, Tvector >::dryRun ( )
protected

Dry run to obtain some needed numbers.

After call to this function we know:

  • number of iterations (nIter),
  • threshold values (threshVal), and
  • polyunomials to choose (sigma = -1 | = 1)

If requested accuracy is too high or gap too small, an exception is thrown.

References mat::Interval< Treal >::empty(), errorTol, gap, mat::Interval< Treal >::length(), mat::Interval< Treal >::low(), mat::Interval< Treal >::midPoint(), nIter, sigma, template_blas_fabs(), threshVal, and mat::Interval< Treal >::upp().

Referenced by perturb().

◆ perturb()

template<typename Treal, typename Tmatrix, typename Tvector>
void per::Perturbation< Treal, Tmatrix, Tvector >::perturb ( )
inline

References dryRun(), and run().

Referenced by mainFun().

◆ run()

template<typename Treal, typename Tmatrix, typename Tvector>
void per::Perturbation< Treal, Tmatrix, Tvector >::run ( )
protected

References deltaMax, nIter, norm, sigma, threshVal, vect, and X.

Referenced by perturb().

Member Data Documentation

◆ allEigs

template<typename Treal, typename Tmatrix, typename Tvector>
mat::Interval<Treal> const& per::Perturbation< Treal, Tmatrix, Tvector >::allEigs
protected

◆ deltaMax

template<typename Treal, typename Tmatrix, typename Tvector>
Treal per::Perturbation< Treal, Tmatrix, Tvector >::deltaMax
protected

◆ errorTol

template<typename Treal, typename Tmatrix, typename Tvector>
Treal per::Perturbation< Treal, Tmatrix, Tvector >::errorTol
protected

◆ F

template<typename Treal, typename Tmatrix, typename Tvector>
std::vector<Tmatrix *> const& per::Perturbation< Treal, Tmatrix, Tvector >::F
protected

◆ gap

template<typename Treal, typename Tmatrix, typename Tvector>
mat::Interval<Treal> per::Perturbation< Treal, Tmatrix, Tvector >::gap
protected

Referenced by dryRun(), and Perturbation().

◆ nIter

template<typename Treal, typename Tmatrix, typename Tvector>
int per::Perturbation< Treal, Tmatrix, Tvector >::nIter
protected

Referenced by checkMaxSubspaceError(), dryRun(), and run().

◆ norm

template<typename Treal, typename Tmatrix, typename Tvector>
mat::normType const per::Perturbation< Treal, Tmatrix, Tvector >::norm
protected

Referenced by Perturbation(), and run().

◆ sigma

template<typename Treal, typename Tmatrix, typename Tvector>
std::vector<Treal> per::Perturbation< Treal, Tmatrix, Tvector >::sigma
protected

Referenced by checkMaxSubspaceError(), dryRun(), and run().

◆ threshVal

template<typename Treal, typename Tmatrix, typename Tvector>
std::vector<Treal> per::Perturbation< Treal, Tmatrix, Tvector >::threshVal
protected

Referenced by dryRun(), and run().

◆ vect

template<typename Treal, typename Tmatrix, typename Tvector>
Tvector& per::Perturbation< Treal, Tmatrix, Tvector >::vect
protected

◆ X

template<typename Treal, typename Tmatrix, typename Tvector>
std::vector<Tmatrix *>& per::Perturbation< Treal, Tmatrix, Tvector >::X
protected

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