Anasazi  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
List of all members
Anasazi::Experimental::TraceMinBaseSolMgr< ScalarType, MV, OP > Class Template Referenceabstract

The Anasazi::TraceMinBaseSolMgr provides an abstract base class for the TraceMin series of solver managers. More...

#include <AnasaziTraceMinBaseSolMgr.hpp>

Inheritance diagram for Anasazi::Experimental::TraceMinBaseSolMgr< ScalarType, MV, OP >:
Anasazi::SolverManager< ScalarType, MV, OP > Anasazi::Experimental::TraceMinDavidsonSolMgr< ScalarType, MV, OP > Anasazi::Experimental::TraceMinSolMgr< ScalarType, MV, OP >

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

Detailed Description

template<class ScalarType, class MV, class OP>
class Anasazi::Experimental::TraceMinBaseSolMgr< ScalarType, MV, OP >

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

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

Author
Alicia Klinvex

Definition at line 111 of file AnasaziTraceMinBaseSolMgr.hpp.

Constructor & Destructor Documentation

template<class ScalarType , class MV , class OP >
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:

  • Solver parameters
    • "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.
    • Ritz shift parameters
      • "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 $X^TKX$ 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 parameters (if using default convergence test; see setGlobalStatusTest())
    • "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"
  • Locking parameters (if using default locking test; see setLockingStatusTest())
    • "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 319 of file AnasaziTraceMinBaseSolMgr.hpp.

template<class ScalarType , class MV , class OP >
virtual Anasazi::Experimental::TraceMinBaseSolMgr< ScalarType, MV, OP >::~TraceMinBaseSolMgr ( )
inlinevirtual

Destructor.

Definition at line 174 of file AnasaziTraceMinBaseSolMgr.hpp.

Member Function Documentation

template<class ScalarType , class MV , class OP >
const Eigenproblem<ScalarType,MV,OP>& Anasazi::Experimental::TraceMinBaseSolMgr< ScalarType, MV, OP >::getProblem ( ) const
inlinevirtual

Return the eigenvalue problem.

Implements Anasazi::SolverManager< ScalarType, MV, OP >.

Definition at line 181 of file AnasaziTraceMinBaseSolMgr.hpp.

template<class ScalarType , class MV , class OP >
int Anasazi::Experimental::TraceMinBaseSolMgr< ScalarType, MV, OP >::getNumIters ( ) const
inlinevirtual

Get the iteration count for the most recent call to solve().

Implements Anasazi::SolverManager< ScalarType, MV, OP >.

Definition at line 186 of file AnasaziTraceMinBaseSolMgr.hpp.

template<class ScalarType , class MV , class OP >
Teuchos::Array<RCP<Teuchos::Time> > Anasazi::Experimental::TraceMinBaseSolMgr< ScalarType, MV, OP >::getTimers ( ) const
inlinevirtual

Return the timers for this object.

The timers are ordered as follows:

  • time spent in solve() routine
  • time spent restarting
  • time spent locking converged eigenvectors

Reimplemented from Anasazi::SolverManager< ScalarType, MV, OP >.

Definition at line 197 of file AnasaziTraceMinBaseSolMgr.hpp.

template<class ScalarType , class MV , class OP >
ReturnType Anasazi::Experimental::TraceMinBaseSolMgr< ScalarType, MV, OP >::solve ( )
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:

  • the maximum number of restarts/iterations has been exceeded. In this scenario, the solver manager will place
    all converged eigenpairs into the eigenproblem and return Unconverged.
  • the locking conditions have been met. In this scenario, some of the current eigenpairs will be removed
    from the eigensolver and placed into auxiliary storage. The eigensolver will be restarted with the remaining part of the Krylov subspace
    and some random information to replace the removed subspace.
  • the subspace is full, and we need to remove some vectors. The eigensolver will be restarted with the most significant part of the Krylov subspace.
  • global convergence has been met. In this case, the most significant NEV eigenpairs in the solver and locked storage
    have met the convergence criterion. (Here, NEV refers to the number of eigenpairs requested by the Eigenproblem.)
    In this scenario, the solver manager will return Converged.
Returns
ReturnType specifying:
  • Converged: the eigenproblem was solved to the specification required by the solver manager.
  • Unconverged: the eigenproblem was not solved to the specification desired by the solver manager.

Implements Anasazi::SolverManager< ScalarType, MV, OP >.

Definition at line 573 of file AnasaziTraceMinBaseSolMgr.hpp.

template<class ScalarType , class MV , class OP >
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 1118 of file AnasaziTraceMinBaseSolMgr.hpp.

template<class ScalarType , class MV , class OP >
const RCP< StatusTest< ScalarType, MV, OP > > & Anasazi::Experimental::TraceMinBaseSolMgr< ScalarType, MV, OP >::getGlobalStatusTest ( ) const

Get the status test defining global convergence.

Definition at line 1126 of file AnasaziTraceMinBaseSolMgr.hpp.

template<class ScalarType , class MV , class OP >
void Anasazi::Experimental::TraceMinBaseSolMgr< ScalarType, MV, OP >::setLockingStatusTest ( const RCP< StatusTest< ScalarType, MV, OP > > &  locking)

Set the status test defining locking.

Definition at line 1148 of file AnasaziTraceMinBaseSolMgr.hpp.

template<class ScalarType , class MV , class OP >
const RCP< StatusTest< ScalarType, MV, OP > > & Anasazi::Experimental::TraceMinBaseSolMgr< ScalarType, MV, OP >::getLockingStatusTest ( ) const

Get the status test defining locking.

Definition at line 1156 of file AnasaziTraceMinBaseSolMgr.hpp.

template<class ScalarType , class MV , class OP >
void Anasazi::Experimental::TraceMinBaseSolMgr< ScalarType, MV, OP >::setDebugStatusTest ( const RCP< StatusTest< ScalarType, MV, OP > > &  debug)

Set the status test for debugging.

Definition at line 1133 of file AnasaziTraceMinBaseSolMgr.hpp.

template<class ScalarType , class MV , class OP >
const RCP< StatusTest< ScalarType, MV, OP > > & Anasazi::Experimental::TraceMinBaseSolMgr< ScalarType, MV, OP >::getDebugStatusTest ( ) const

Get the status test for debugging.

Definition at line 1141 of file AnasaziTraceMinBaseSolMgr.hpp.


The documentation for this class was generated from the following file: