Anasazi
Version of the Day
|
The Anasazi::TraceMinBaseSolMgr provides an abstract base class for the TraceMin series of solver managers. More...
#include <AnasaziTraceMinBaseSolMgr.hpp>
Public Member Functions | |
Constructors/Destructor | |
TraceMinBaseSolMgr (const RCP< Eigenproblem< ScalarType, MV, OP > > &problem, Teuchos::ParameterList &pl) | |
Basic constructor for TraceMinBaseSolMgr. More... | |
virtual | ~TraceMinBaseSolMgr () |
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< 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 RCP< StatusTest< ScalarType, MV, OP > > &global) |
Set the status test defining global convergence. More... | |
const RCP< StatusTest < ScalarType, MV, OP > > & | getGlobalStatusTest () const |
Get the status test defining global convergence. More... | |
void | setLockingStatusTest (const RCP< StatusTest< ScalarType, MV, OP > > &locking) |
Set the status test defining locking. More... | |
const RCP< StatusTest < ScalarType, MV, OP > > & | getLockingStatusTest () const |
Get the status test defining locking. More... | |
void | setDebugStatusTest (const RCP< StatusTest< ScalarType, MV, OP > > &debug) |
Set the status test for debugging. More... | |
const 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 Anasazi::TraceMinBaseSolMgr provides an abstract base class for the TraceMin series of solver managers.
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 2-norms of the direct residuals relative to the Ritz values.lockingtest
halts TraceMinBase::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 or iterations.
Much of this behavior is controlled via parameters and options passed to the solver manager. For more information, see TraceMinBaseSolMgr().
Definition at line 79 of file AnasaziTraceMinBaseSolMgr.hpp.
Anasazi::Experimental::TraceMinBaseSolMgr< ScalarType, MV, OP >::TraceMinBaseSolMgr | ( | const RCP< Eigenproblem< ScalarType, MV, OP > > & | problem, |
Teuchos::ParameterList & | pl | ||
) |
Basic constructor for TraceMinBaseSolMgr.
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
that specifies whether we want the largest eigenvalues "LM" or the smallest "SM". Default: "SM""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"Maximum Restarts"
- a int
specifying the maximum number of restarts the underlying solver is allowed to perform. Default: 20"Saddle Solver Type"
- a string
specifying how to solve the saddle point problem arising at each iteration. Options are "Projected Krylov", "Schur Complement", and "Block Diagonal Preconditioned Minres". Default: "Projected Krylov""Projected Krylov"
: Uses projected-minres to solve the problem."Schur Complement"
: Explicitly forms the (inexact) Schur complement using minres."Block Diagonal Preconditioned Minres"
: Uses a block preconditioner on the entire saddle point problem. For more information, please see "Overview of Anasazi and its newest eigensolver, TraceMin" on the main Anasazi page. We recommend using "Projected Krylov" in the absence of preconditioning. If you want to use a preconditioner, "Block Diagonal Preconditioned Minres" is recommended. "Schur Complement" mainly exists for special use cases."When To Shift"
- a string
specifying when Ritz shifts should be performed. Options are "Never", "After Trace Levels", and "Always". Default: "Always""Never"
: Do not perform Ritz shifts. This option produces guaranteed convergence but converges linearly. Not recommended."After Trace Levels"
: Do not perform Ritz shifts until the trace of has stagnated (i.e. the relative change in trace has become small). The MagnitudeType
specifying how small the relative change in trace must become may be provided via the parameter "Trace Threshold"
, whose default value is 0.02."Always"
: Always attempt to use Ritz shifts."How To Choose Shift"
- a string
specifying how to choose the Ritz shifts (assuming Ritz shifts are being used). Options are "Largest Converged", "Adjusted Ritz Values", and "Ritz Values". Default: "Adjusted Ritz Values""Largest Converged"
: Ritz shifts are chosen to be the largest converged eigenvalue. Until an eigenvalue converges, the Ritz shifts are all 0."Adjusted Ritz Values"
: Ritz shifts are chosen based on the Ritz values and their associated residuals in such a way as to guarantee global convergence. This method is described in "The trace minimization method for the symmetric generalized eigenvalue problem.""Ritz Values"
: Ritz shifts are chosen to equal the Ritz values. This does NOT guarantee global convergence."Use Multiple Shifts"
- a bool
specifying whether to use one or many Ritz shifts (assuming shifting is enabled). Default: true"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". Default: "2""Use Locking"
- a bool
specifying whether the algorithm should employ locking of converged eigenpairs. Default: true"Max Locked"
- a int
specifying the maximum number of eigenpairs to be locked. Default: problem->getNEV()"Locking Quorum"
- a 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". Default: "2"Anasazi's trace minimization solvers are still in development, and we plan to add additional features in the future, including the ability to perform spectral transformations.
Definition at line 287 of file AnasaziTraceMinBaseSolMgr.hpp.
|
inlinevirtual |
Destructor.
Definition at line 142 of file AnasaziTraceMinBaseSolMgr.hpp.
|
inlinevirtual |
Return the eigenvalue problem.
Implements Anasazi::SolverManager< ScalarType, MV, OP >.
Definition at line 149 of file AnasaziTraceMinBaseSolMgr.hpp.
|
inlinevirtual |
Get the iteration count for the most recent call to solve()
.
Implements Anasazi::SolverManager< ScalarType, MV, OP >.
Definition at line 154 of file AnasaziTraceMinBaseSolMgr.hpp.
|
inlinevirtual |
Return the timers for this object.
The timers are ordered as follows:
Reimplemented from Anasazi::SolverManager< ScalarType, MV, OP >.
Definition at line 165 of file AnasaziTraceMinBaseSolMgr.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 TraceMinBase::iterate(), which will return either because a specially constructed status test evaluates to Passed or an exception is thrown.
A return from TraceMinBase::iterate() signifies one of the following scenarios:
Implements Anasazi::SolverManager< ScalarType, MV, OP >.
Definition at line 541 of file AnasaziTraceMinBaseSolMgr.hpp.
void Anasazi::Experimental::TraceMinBaseSolMgr< ScalarType, MV, OP >::setGlobalStatusTest | ( | const RCP< StatusTest< ScalarType, MV, OP > > & | global | ) |
Set the status test defining global convergence.
Definition at line 1086 of file AnasaziTraceMinBaseSolMgr.hpp.
const RCP< StatusTest< ScalarType, MV, OP > > & Anasazi::Experimental::TraceMinBaseSolMgr< ScalarType, MV, OP >::getGlobalStatusTest | ( | ) | const |
Get the status test defining global convergence.
Definition at line 1094 of file AnasaziTraceMinBaseSolMgr.hpp.
void Anasazi::Experimental::TraceMinBaseSolMgr< ScalarType, MV, OP >::setLockingStatusTest | ( | const RCP< StatusTest< ScalarType, MV, OP > > & | locking | ) |
Set the status test defining locking.
Definition at line 1116 of file AnasaziTraceMinBaseSolMgr.hpp.
const RCP< StatusTest< ScalarType, MV, OP > > & Anasazi::Experimental::TraceMinBaseSolMgr< ScalarType, MV, OP >::getLockingStatusTest | ( | ) | const |
Get the status test defining locking.
Definition at line 1124 of file AnasaziTraceMinBaseSolMgr.hpp.
void Anasazi::Experimental::TraceMinBaseSolMgr< ScalarType, MV, OP >::setDebugStatusTest | ( | const RCP< StatusTest< ScalarType, MV, OP > > & | debug | ) |
Set the status test for debugging.
Definition at line 1101 of file AnasaziTraceMinBaseSolMgr.hpp.
const RCP< StatusTest< ScalarType, MV, OP > > & Anasazi::Experimental::TraceMinBaseSolMgr< ScalarType, MV, OP >::getDebugStatusTest | ( | ) | const |
Get the status test for debugging.
Definition at line 1109 of file AnasaziTraceMinBaseSolMgr.hpp.