## Classes | |

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... |

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:

- Anasazi::Eigensolver implements the minimal features associated with an eigenvalue iteration.

The iteration state is private member data of the solver, and the eigensolver iteration occurs inside the Anasazi::Eigensolver::iterate() method. - Anasazi::StatusTest determines when an eigensolver iteration is to be terminated.

Inside the Anasazi::Eigensolver::iterate() routine, the eigensolver queries the StatusTest for terminating the iteratios and so return from the iterate() method. - Anasazi::SolverManager provides a simplified iterface to a particular eigensolver.

A solver manager implements specific features that are independent of the eigensolver iteration, such as locking and restarting. Multiple solver managers providing varying features and techniques can exploit the same eigensolver.

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:

- the partitioning of responsibility among the classes, resulting in simpler code and easier development, debugging, reuse and maintenance.
- stratified levels of interaction: either custom, powerful low-level interaction with the eigensolver or convenient and simple interaction with a robust and flexible solver manager.
- the flexibility to choose many implementation details through the choice of

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