Anasazi
Version of the Day
|
The BlockDavidsonSolMgr provides a powerful solver manager over the BlockDavidson eigensolver. More...
#include <AnasaziBlockDavidsonSolMgr.hpp>
Public Member Functions | |
Constructors/Destructor | |
BlockDavidsonSolMgr (const Teuchos::RCP< Eigenproblem< ScalarType, MV, OP > > &problem, Teuchos::ParameterList &pl) | |
Basic constructor for BlockDavidsonSolMgr. More... | |
virtual | ~BlockDavidsonSolMgr () |
Destructor. More... | |
Accessor methods | |
const Eigenproblem< ScalarType, MV, OP > & | getProblem () const |
Return the eigenvalue problem. More... | |
int | getNumIters () const |
Get the iteration count for the most recent call to solve() . More... | |
Teuchos::Array< Teuchos::RCP < Teuchos::Time > > | getTimers () const |
Return the timers for this object. More... | |
Solver application methods | |
ReturnType | solve () |
This method performs possibly repeated calls to the underlying eigensolver's iterate() routine until the problem has been solved (as decided by the solver manager) or the solver manager decides to quit. More... | |
void | setGlobalStatusTest (const Teuchos::RCP< StatusTest< ScalarType, MV, OP > > &global) |
Set the status test defining global convergence. More... | |
const Teuchos::RCP< StatusTest < ScalarType, MV, OP > > & | getGlobalStatusTest () const |
Get the status test defining global convergence. More... | |
void | setLockingStatusTest (const Teuchos::RCP< StatusTest< ScalarType, MV, OP > > &locking) |
Set the status test defining locking. More... | |
const Teuchos::RCP< StatusTest < ScalarType, MV, OP > > & | getLockingStatusTest () const |
Get the status test defining locking. More... | |
void | setDebugStatusTest (const Teuchos::RCP< StatusTest< ScalarType, MV, OP > > &debug) |
Set the status test for debugging. More... | |
const Teuchos::RCP< StatusTest < ScalarType, MV, OP > > & | getDebugStatusTest () const |
Get the status test for debugging. More... | |
Public Member Functions inherited from Anasazi::SolverManager< ScalarType, MV, OP > | |
SolverManager () | |
Empty constructor. More... | |
virtual | ~SolverManager () |
Destructor. More... | |
The BlockDavidsonSolMgr provides a powerful solver manager over the BlockDavidson eigensolver.
This solver manager implements a hard-locking mechanism, whereby eigenpairs designated to be locked are moved from the eigensolver and placed in auxilliary storage. The eigensolver is then restarted and continues to iterate, orthogonal to the locked eigenvectors.
The solver manager provides to the solver a StatusTestCombo object constructed as follows:
combo = globaltest OR lockingtest OR debugtest
where
globaltest
terminates computation when global convergence has been detected.globaltest
is a StatusTestResNorm object which tests the M-norms of the direct residuals relative to the Ritz values.lockingtest
halts BlockDavidson::iterate() in order to deflate converged eigenpairs for locking.lockingtest
is a StatusTestResNorm object.debugtest
allows a user to specify additional monitoring of the iteration, encapsulated in a StatusTest objectdebugtest
is ignored.Additionally, the solver manager will terminate solve() after a specified number of restarts.
Much of this behavior is controlled via parameters and options passed to the solver manager. For more information, see BlockDavidsonSolMgr().
Definition at line 121 of file AnasaziBlockDavidsonSolMgr.hpp.
Anasazi::BlockDavidsonSolMgr< ScalarType, MV, OP >::BlockDavidsonSolMgr | ( | const Teuchos::RCP< Eigenproblem< ScalarType, MV, OP > > & | problem, |
Teuchos::ParameterList & | pl | ||
) |
Basic constructor for BlockDavidsonSolMgr.
This constructor accepts the Eigenproblem to be solved in addition to a parameter list of options for the solver manager. These options include the following:
"Which"
- a string
specifying the desired eigenvalues: SM, LM, SR or LR. Default: "SR""Block Size"
- an int
specifying the block size to be used by the underlying block Davidson solver. Default: problem->getNEV()"Num Blocks"
- an int
specifying the number of blocks allocated for the Krylov basis. Default: 2"Maximum Restarts"
- an int
specifying the maximum number of restarts the underlying solver is allowed to perform. Default: 20"Verbosity"
- a sum of MsgType specifying the verbosity. Default: Errors"Output Stream"
- a reference-counted pointer to the formatted output stream where all solver output is sent. Default: Teuchos::getFancyOStream ( Teuchos::rcpFromRef (std::cout) )"Output Processor"
- an int
specifying the MPI processor that will print solver/timer details. Default: 0"Convergence Tolerance"
- a MagnitudeType
specifying the level that residual norms must reach to decide convergence. Default: machine precision."Relative Convergence Tolerance"
- a bool
specifying whether residuals norms should be scaled by their eigenvalues for the purposing of deciding convergence. Default: true"Convergence Norm"
- a string
specifying the norm for convergence testing: "2" or "M""Use Locking"
- a bool
specifying whether the algorithm should employ locking of converged eigenpairs. Default: false"Max Locked"
- an int
specifying the maximum number of eigenpairs to be locked. Default: problem->getNEV()"Locking Quorum"
- an int
specifying the number of eigenpairs that must meet the locking criteria before locking actually occurs. Default: 1"Locking Tolerance"
- a MagnitudeType
specifying the level that residual norms must reach to decide locking. Default: 0.1*convergence tolerance"Relative Locking Tolerance"
- a bool
specifying whether residuals norms should be scaled by their eigenvalues for the purposing of deciding locking. Default: true"Locking Norm"
- a string
specifying the norm for locking testing: "2" or "M" Definition at line 267 of file AnasaziBlockDavidsonSolMgr.hpp.
|
inlinevirtual |
Destructor.
Definition at line 164 of file AnasaziBlockDavidsonSolMgr.hpp.
|
inlinevirtual |
Return the eigenvalue problem.
Implements Anasazi::SolverManager< ScalarType, MV, OP >.
Definition at line 171 of file AnasaziBlockDavidsonSolMgr.hpp.
|
inlinevirtual |
Get the iteration count for the most recent call to solve()
.
Implements Anasazi::SolverManager< ScalarType, MV, OP >.
Definition at line 176 of file AnasaziBlockDavidsonSolMgr.hpp.
|
inlinevirtual |
Return the timers for this object.
The timers are ordered as follows:
Reimplemented from Anasazi::SolverManager< ScalarType, MV, OP >.
Definition at line 187 of file AnasaziBlockDavidsonSolMgr.hpp.
|
virtual |
This method performs possibly repeated calls to the underlying eigensolver's iterate() routine until the problem has been solved (as decided by the solver manager) or the solver manager decides to quit.
This method calls BlockDavidson::iterate(), which will return either because a specially constructed status test evaluates to Passed or an exception is thrown.
A return from BlockDavidson::iterate() signifies one of the following scenarios:
Implements Anasazi::SolverManager< ScalarType, MV, OP >.
Definition at line 427 of file AnasaziBlockDavidsonSolMgr.hpp.
void Anasazi::BlockDavidsonSolMgr< ScalarType, MV, OP >::setGlobalStatusTest | ( | const Teuchos::RCP< StatusTest< ScalarType, MV, OP > > & | global | ) |
Set the status test defining global convergence.
Definition at line 1266 of file AnasaziBlockDavidsonSolMgr.hpp.
const Teuchos::RCP< StatusTest< ScalarType, MV, OP > > & Anasazi::BlockDavidsonSolMgr< ScalarType, MV, OP >::getGlobalStatusTest | ( | ) | const |
Get the status test defining global convergence.
Definition at line 1274 of file AnasaziBlockDavidsonSolMgr.hpp.
void Anasazi::BlockDavidsonSolMgr< ScalarType, MV, OP >::setLockingStatusTest | ( | const Teuchos::RCP< StatusTest< ScalarType, MV, OP > > & | locking | ) |
Set the status test defining locking.
Definition at line 1296 of file AnasaziBlockDavidsonSolMgr.hpp.
const Teuchos::RCP< StatusTest< ScalarType, MV, OP > > & Anasazi::BlockDavidsonSolMgr< ScalarType, MV, OP >::getLockingStatusTest | ( | ) | const |
Get the status test defining locking.
Definition at line 1304 of file AnasaziBlockDavidsonSolMgr.hpp.
void Anasazi::BlockDavidsonSolMgr< ScalarType, MV, OP >::setDebugStatusTest | ( | const Teuchos::RCP< StatusTest< ScalarType, MV, OP > > & | debug | ) |
Set the status test for debugging.
Definition at line 1281 of file AnasaziBlockDavidsonSolMgr.hpp.
const Teuchos::RCP< StatusTest< ScalarType, MV, OP > > & Anasazi::BlockDavidsonSolMgr< ScalarType, MV, OP >::getDebugStatusTest | ( | ) | const |
Get the status test for debugging.
Definition at line 1289 of file AnasaziBlockDavidsonSolMgr.hpp.