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

The Anasazi::BlockKrylovSchurSolMgr provides a flexible solver manager over the BlockKrylovSchur eigensolver. More...

#include <AnasaziBlockKrylovSchurSolMgr.hpp>

Inheritance diagram for Anasazi::BlockKrylovSchurSolMgr< ScalarType, MV, OP >:
Anasazi::SolverManager< ScalarType, MV, OP >

Public Member Functions

Constructors/Destructor
 BlockKrylovSchurSolMgr (const Teuchos::RCP< Eigenproblem< ScalarType, MV, OP > > &problem, Teuchos::ParameterList &pl)
 Basic constructor for BlockKrylovSchurSolMgr. More...
 
virtual ~BlockKrylovSchurSolMgr ()
 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...
 
std::vector< Value< ScalarType > > getRitzValues () const
 Return the Ritz values from the most recent 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 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...
 

Detailed Description

template<class ScalarType, class MV, class OP>
class Anasazi::BlockKrylovSchurSolMgr< ScalarType, MV, OP >

The Anasazi::BlockKrylovSchurSolMgr provides a flexible solver manager over the BlockKrylovSchur eigensolver.

The solver manager provides to the solver a StatusTestCombo object constructed as follows:
   combo = globaltest OR debugtest
where

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

Author
Chris Baker, Ulrich Hetmaniuk, Rich Lehoucq, Heidi Thornquist
Examples:
BlockKrylovSchur/BlockKrylovSchurEpetraEx.cpp, BlockKrylovSchur/BlockKrylovSchurEpetraExGenAmesos.cpp, BlockKrylovSchur/BlockKrylovSchurEpetraExGenAztecOO.cpp, BlockKrylovSchur/BlockKrylovSchurEpetraExGenBelos.cpp, and BlockKrylovSchur/BlockKrylovSchurEpetraExSVD.cpp.

Definition at line 156 of file AnasaziBlockKrylovSchurSolMgr.hpp.

Constructor & Destructor Documentation

template<class ScalarType , class MV , class OP >
Anasazi::BlockKrylovSchurSolMgr< ScalarType, MV, OP >::BlockKrylovSchurSolMgr ( const Teuchos::RCP< Eigenproblem< ScalarType, MV, OP > > &  problem,
Teuchos::ParameterList pl 
)

Basic constructor for BlockKrylovSchurSolMgr.

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 specifying the desired eigenvalues: SM, LM, SR or LR. Default: "LM"
    • "Block Size" - an int specifying the block size to be used by the underlying block Krylov-Schur solver. Default: 1
    • "Num Blocks" - an int specifying the number of blocks allocated for the Krylov basis. Default: 3*nev
    • "Extra NEV Blocks" - an int specifying the number of extra blocks the solver should keep in addition to those required to compute the number of eigenvalues requested. Default: 0
    • "Maximum Restarts" - an int specifying the maximum number of restarts the underlying solver is allowed to perform. Default: 20
    • "Orthogonalization" - a string specifying the desired orthogonalization: DGKS and SVQB. Default: "SVQB"
    • "Verbosity" - a sum of MsgType specifying the verbosity. Default: Anasazi::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 parameters
    • "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

Definition at line 297 of file AnasaziBlockKrylovSchurSolMgr.hpp.

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

Destructor.

Definition at line 194 of file AnasaziBlockKrylovSchurSolMgr.hpp.

Member Function Documentation

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

Return the eigenvalue problem.

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

Definition at line 201 of file AnasaziBlockKrylovSchurSolMgr.hpp.

template<class ScalarType, class MV, class OP>
int Anasazi::BlockKrylovSchurSolMgr< 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 206 of file AnasaziBlockKrylovSchurSolMgr.hpp.

template<class ScalarType, class MV, class OP>
std::vector<Value<ScalarType> > Anasazi::BlockKrylovSchurSolMgr< ScalarType, MV, OP >::getRitzValues ( ) const
inline

Return the Ritz values from the most recent solve.

Definition at line 212 of file AnasaziBlockKrylovSchurSolMgr.hpp.

template<class ScalarType, class MV, class OP>
Teuchos::Array<Teuchos::RCP<Teuchos::Time> > Anasazi::BlockKrylovSchurSolMgr< 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

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

Definition at line 223 of file AnasaziBlockKrylovSchurSolMgr.hpp.

template<class ScalarType , class MV , class OP >
ReturnType Anasazi::BlockKrylovSchurSolMgr< 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 BlockKrylovSchur::iterate(), which will return either because a specially constructed status test evaluates to Passed or an exception is thrown.

A return from BlockKrylovSchur::iterate() signifies one of the following scenarios:

  • the maximum number of restarts has been exceeded. In this scenario, the solver manager will place
    all converged eigenpairs into the eigenproblem and return Unconverged.
  • 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 435 of file AnasaziBlockKrylovSchurSolMgr.hpp.

template<class ScalarType , class MV , class OP >
void Anasazi::BlockKrylovSchurSolMgr< ScalarType, MV, OP >::setGlobalStatusTest ( const Teuchos::RCP< StatusTest< ScalarType, MV, OP > > &  global)

Set the status test defining global convergence.

Definition at line 902 of file AnasaziBlockKrylovSchurSolMgr.hpp.

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

Get the status test defining global convergence.

Definition at line 910 of file AnasaziBlockKrylovSchurSolMgr.hpp.

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

Set the status test for debugging.

Definition at line 917 of file AnasaziBlockKrylovSchurSolMgr.hpp.

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

Get the status test for debugging.

Definition at line 925 of file AnasaziBlockKrylovSchurSolMgr.hpp.


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