LR::SetOfEqSolver Class Reference

Iterative Set Of Linear Equations solver, extending the generic LRSolver. More...

#include <slr.h>

Inheritance diagram for LR::SetOfEqSolver:

LR::LRSolver List of all members.

Public Member Functions

 SetOfEqSolver (int nbast, int nocc, const ergo_real *fock_matrix, const ergo_real *s, ergo_real freq)
 Creates the set-of-equations solver.
void setRHS (OneElOperator &op)
 initializes the rhs field
virtual ~SetOfEqSolver ()
virtual ergo_real getPreconditionerShift (int) const
 returns the preconditioning shift.
virtual int getInitialGuess (VarVectorCollection &vecs)
 returns the initial guess for the linear set of equations.
virtual bool getResidual (VarVectorCollection &residualv)
 get the residual of the set of linear equations.
virtual void increaseSubspaceLimit (int newSize)
 expands above the default limit
ergo_real getPolarisability (OneElOperator &oper)
 computes polarizability by contracting the response vector with specified operator

Protected Member Functions

virtual void addToSpace (VarVectorCollection &vecs, E2Evaluator &e2)
 extends the subspace with v and its transformed vector Av.
ergo_real multiplyXtimesVec (const VarVector &rhs)
 multiplies current solution by some vector.

Protected Attributes

ergo_realrhsSub
 RHS vector projected onto subspace.
ergo_real xTimesRHS

Private Attributes

ergo_real frequency
 frequency for which the SOE is to be solved.
VarVector rhs
 RHS of the SOE.

Detailed Description

Iterative Set Of Linear Equations solver, extending the generic LRSolver.


Constructor & Destructor Documentation

LR::SetOfEqSolver::SetOfEqSolver ( int  nbast,
int  nocc,
const ergo_real fock_matrix,
const ergo_real s,
ergo_real  freq 
) [inline]

Creates the set-of-equations solver.

The KS and overlap matrix may be deleted immediately after the object creation.

virtual LR::SetOfEqSolver::~SetOfEqSolver (  )  [inline, virtual]


Member Function Documentation

void LR::SetOfEqSolver::addToSpace ( VarVectorCollection vecs,
E2Evaluator e2 
) [protected, virtual]

extends the subspace with v and its transformed vector Av.

The eSub and sSub projected matrices are modified as well. We do not store explicitely the swapped vectors (y x), only the (x y) combination.

Reimplemented from LR::LRSolver.

int LR::SetOfEqSolver::getInitialGuess ( VarVectorCollection guess  )  [virtual]

returns the initial guess for the linear set of equations.

The explicit value is obtained from the diagonal assumption for the E[2] operator and is: (E[2]- freq*S[2])*g = Y -> g = Y./(E[2]-freq*S[2])

Implements LR::LRSolver.

ergo_real LR::SetOfEqSolver::getPolarisability ( OneElOperator oper  ) 

computes polarizability by contracting the response vector with specified operator

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

returns the preconditioning shift.

Proper preconditioning is vital for the quick convergence.

Implements LR::LRSolver.

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

get the residual of the set of linear equations.

This is done in two steps: Solution in the subspace: Xsub = (eSub-freq*Ssub)\Ysub; Residual vector is: residualv= (Av-freq*Sv)*Xsub - Y;

Implements LR::LRSolver.

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

expands above the default limit

Reimplemented from LR::LRSolver.

ergo_real LR::SetOfEqSolver::multiplyXtimesVec ( const VarVector rhs  )  [protected]

multiplies current solution by some vector.

If such contractions are to be done several times, perhaps a single vector solution should be created and only then contracted with rhs vector.

void LR::SetOfEqSolver::setRHS ( OneElOperator op  ) 

initializes the rhs field


Member Data Documentation

ergo_real LR::SetOfEqSolver::frequency [private]

frequency for which the SOE is to be solved.

VarVector LR::SetOfEqSolver::rhs [private]

RHS of the SOE.

ergo_real* LR::SetOfEqSolver::rhsSub [protected]

RHS vector projected onto subspace.

ergo_real LR::SetOfEqSolver::xTimesRHS [protected]


The documentation for this class was generated from the following files:
Generated on Mon Sep 17 14:30:42 2012 for ergo by  doxygen 1.4.7