ergo
LR::EigenSolver Class Reference

Iterative Eigenvalue solver, extending the generic LRSolver. More...

#include <slr.h>

Inheritance diagram for LR::EigenSolver:
LR::LRSolver

List of all members.

Public Member Functions

 EigenSolver (int nbast, int nocc, const ergo_real *fock_matrix, const ergo_real *overlap, int n)
virtual ~EigenSolver ()
virtual ergo_real getPreconditionerShift (int i) const
 returns the preconditioning shift.
virtual int getInitialGuess (VarVectorCollection &vecs)
 generate the starting guess for the HOMO-LUMO excitation by placing one in th the right position.
virtual bool getResidual (VarVectorCollection &residualv)
 get residual of the eigenvalue problem.
virtual void increaseSubspaceLimit (int newSize)
 expands above the default limit
ergo_real getFreq (int i) const
void computeMoments (OneElOperator &dipx, OneElOperator &dipy, OneElOperator &dipz)
ergo_real getTransitionMoment2 (int i) const

Private Attributes

ergo_realritzVals
 recent ritz values in the subspace.
ergo_realtransMoms2
 most recent SQUARED transition moments.
int nStates
 number of excited states to compute
int nConverged
 number of already converged eigenvalues
ergo_reallast_ev
 most recent eigenvectors in the reduced space

Detailed Description

Iterative Eigenvalue solver, extending the generic LRSolver.


Constructor & Destructor Documentation

LR::EigenSolver::EigenSolver ( int  nbast,
int  nocc,
const ergo_real fock_matrix,
const ergo_real overlap,
int  n 
) [inline]
virtual LR::EigenSolver::~EigenSolver ( ) [inline, virtual]

References last_ev, ritzVals, and transMoms2.


Member Function Documentation

ergo_real LR::EigenSolver::getFreq ( int  i) const [inline]

References ritzVals.

Referenced by es_getexc().

int LR::EigenSolver::getInitialGuess ( VarVectorCollection v) [virtual]

generate the starting guess for the HOMO-LUMO excitation by placing one in th the right position.

Do it the lazy way: creating VarVector directly risks inconsistiency when the internal representation of VarVector changes.

Implements LR::LRSolver.

References LR::LRSolver::nbast, LR::LRSolver::nocc, LR::VarVectorCollection::setSize(), nStates, LR::LRSolver::e2diag, and LR::VarVector::nvar.

virtual ergo_real LR::EigenSolver::getPreconditionerShift ( int  i) const [inline, virtual]

returns the preconditioning shift.

Proper preconditioning is vital for the quick convergence.

Implements LR::LRSolver.

References ritzVals, and nConverged.

bool LR::EigenSolver::getResidual ( VarVectorCollection residualv) [virtual]

get residual of the eigenvalue problem.

This is done in following steps: Solution in the subspace: [ Xsub, lambda ] = eig(eSub, Ssub); Pick first positive eigenvalue l1 = lambda(step+1); Pick corresponding eigenvector: Xsub = Xsub(:,step+1); Residual Vector: residualv = (Av-l1*Sv)*Xsub;

Implements LR::LRSolver.

References LR::LRSolver::subspaceSize, LR::LRSolver::eSub, LR::LRSolver::sSub, mat::ggev(), ritzVals, nStates, last_ev, LR::dot(), nConverged, LR::LRSolver::getAvMinusFreqSv(), LR::LRSolver::convThreshold, do_output(), LOG_CAT_INFO, LOG_AREA_LR, LR::VarVectorCollection::setSize(), and LOG_CAT_ERROR.

ergo_real LR::EigenSolver::getTransitionMoment2 ( int  i) const [inline]

References transMoms2.

Referenced by es_getexc().

void LR::EigenSolver::increaseSubspaceLimit ( int  newSize) [virtual]

expands above the default limit

Reimplemented from LR::LRSolver.

References LR::LRSolver::maxSubspaceSize, ritzVals, and transMoms2.

Referenced by es_getexc().


Member Data Documentation

most recent eigenvectors in the reduced space

Referenced by getResidual(), computeMoments(), and ~EigenSolver().

number of already converged eigenvalues

Referenced by getResidual(), and getPreconditionerShift().

int LR::EigenSolver::nStates [private]

number of excited states to compute

Referenced by getResidual(), getInitialGuess(), and computeMoments().

most recent SQUARED transition moments.

Referenced by increaseSubspaceLimit(), computeMoments(), ~EigenSolver(), and getTransitionMoment2().


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