Anasazi Eigensolver Framework


class  Anasazi::BlockDavidson< ScalarType, MV, OP >
 This class implements the block Davidson method, an iterative method for solving symmetric eigenvalue problems. More...
class  Anasazi::BlockDavidsonSolMgr< ScalarType, MV, OP >
 The Anasazi::BlockDavidsonSolMgr provides a powerful and fully-featured solver manager over the BlockDavidson eigensolver. More...
class  Anasazi::BlockKrylovSchur< ScalarType, MV, OP >
 This class implements the block Krylov-Schur iteration, for solving eigenvalue problems. More...
class  Anasazi::BlockKrylovSchurSolMgr< ScalarType, MV, OP >
 The Anasazi::BlockKrylovSchurSolMgr provides a powerful and fully-featured solver manager over the BlockKrylovSchur eigensolver. More...
class  Anasazi::LOBPCG< ScalarType, MV, OP >
 This class implements the Locally-Optimal Block Preconditioned Conjugate Gradient (LOBPCG) method for solving Hermitian eigenvalue problems. More...
class  Anasazi::LOBPCGSolMgr< ScalarType, MV, OP >
 The Anasazi::LOBPCGSolMgr provides a powerful and fully-featured solver manager over the LOBPCG eigensolver. More...
class  Anasazi::SimpleLOBPCGSolMgr< ScalarType, MV, OP >
 The Anasazi::SimpleLOBPCGSolMgr provides a simple solver manager over the LOBPCG eigensolver. More...

Detailed Description

Anasazi is a collection of iterative eigensolvers. In shepherding such a collection, the question arises: when are differences between two algorithmic implementations great enough that they are classified as two different eigensolver iterations instead of different parameterizations. To illustrate this dilemna, consider the block Davidson iteration. The essence of the algorithm can be distilled as follows: a preconditioner is applied to the current residual vectors, and the resulting vectors are used to expand a subspace over which the next eigenvector approximations (and their residuals) are computed. However, a plethora of decisions abound in implementing this simple iteration: the size of the computed basis, if and how the method is restarted, the convergence criterion for the algorithm, and the use of deflation (locking) mechanisms, etc.

Many of these decision are separate from the actual eigensolver iteration. Extracting the essential nature of an eigensolver iteration results in a simpler piece of code to develop, debug and maintain. The Anasazi iterative eigensolver framework encourages this by providing three distinct entities to fulfill the roles needed by an eigensolver: Anasazi::Eigensolver, Anasazi::StatusTest and Anasazi::SolverManager:

Returning to the block Davidson example, let's examine how these different pieces come into play. The Anasazi::BlockDavidson class contains both the state and mechanism of the block Davidson eigensolver iteration. The state consists of the current subspace basis, the eigenbasis, the residual vectors, and other support data. The eigenvalue iteration is described above, and is contained inside the Anasazi::BlockDavidson::iterate() method. On a call to Anasazi::BlockDavidson::iterate(), the solver iterates until one of two things happens: either the basis becomes full or the Anasazi::StatusTest given to the solver indicates that the iteration is completed. This is summarized in the following code snip

    void Anasazi::BlockDavidson::iterate() 
        while ( statustest.checkStatus(this) != Anasazi::Passed && getCurSubspaceDim() < getMaxSubspaceDim() ) {
            // perform block Davidson iterations

The Anasazi::StatusTest::checkStatus() routine takes an Anasazi::Eigensolver object as an argument. For a status test to examine the status of an arbitrary eigensolver, we must have some abstract interface defining the status of the eigensolver. This is provided by the Anasazi::Eigensolver class, the class from which all eigensolver in Anasazi derive. The following are some example of the status method provbided by Anasazi::Eigensolver for use by Anasazi::StatusTest objects:

    // Get the current residual norms
    std::vector<MagnitudeType> getResNorms();

    // Get the Ritz values from the previous iteration.
    std::vector<Value<ScalarType> > getRitzValues();

    // Get the current iteration count.
    int getNumIters() const;

Then a user wishing to limit the number of eigensolver iterations passes a Anasazi::StatusTestMaxIters object to the eigensolver. For example, a user wishing to halt iterate() when the residual norms satisfied a certain tolerance would pass a Anasazi::StatusTestResNorm object to the eigensolver. Arbitrary combinations of status tests can be created using a Anasazi::StatusTestCombo class, so that the stopping criterion can now be affected without modifying the eigensolver code.

Recalling again the block Davidson example, we know that after filling the allocated basis in the iterate() routine, the eigensolver must be restarted with a new subspace. A user wishing to perform a particular type of restarting needs access to the entire state of the eigensolver and must be able to set this state. Each of the Anasazi eigensolvers provides getState() and initialize() methods for getting and setting the internal state of the eigensolver. In the case of Anasazi::BlockDavidson, this method can be used to access the current Krylov basis, which can be used for performing a restart. The user will produce a new state for the eigensolver and pass it back to the eigensolver via the Anasazi::BlockDavidson::initialize() method. In this way, the user has ultimate flexibility in dictating the behavior of the algorithm, aside from the essential iteration provided by the eigensolver.

However, the code for performing restarting and locking and similar features is tedious. Furthermore, much research has been conducted into robust and efficient methods for performing these opertions. The Anasazi::SolverManager exists as a way to encapsulate this funcionality in an accessible package, suitable for use in other codes. The goal of a solver manager is to perform all of the communication with a particular eigensolver, providing advanced functionality, on behalf of the user. Algorithmic parameters of a particular solver manager are set via a Teuchos::ParameterList. The only other input provided to the solver manager is the Anasazi::Eigenproblem to be solved. Consider the following example:

        // create an eigenproblem
        Teuchos::RefCountPtr<Anasazi::Eigenproblem<ScalarType,MV,OP> > prob = ...

        // create a parameter list for the Anasazi::BlockDavidsonSolMgr solver manager
        Teuchos::ParameterList pl;
        pl.set("Block Size",5);
        pl.set("Num Blocks",10);
        pl.set("Maximum Restarts",20);

        // create a Block Davidson solver manager
        Anasazi::BlockDavidsonSolMgr manager(prob,pl);

        // solve the eigenproblem
        Anasazi::ReturnType ret = manager.solve();

        // retrieve the answer 
        Anasazi::Eigensolution sltn = prob->getSolution();

The Anasazi::BlockDavidsonSolMgr solver manager is responsible for creating an Anasazi::BlockDavidson eigensolver, initializing it, creating status tests controlling the solver, implementing restarting and locking mechanisms, and putting the computed eigenpairs into the eigenproblem.

The division between eigensolver and solver manager enables the following functionality in Anasazi:

Generated on Thu Sep 18 12:31:38 2008 for Anasazi by doxygen