#include <AnasaziBlockDavidson.hpp>
Inheritance diagram for Anasazi::BlockDavidson< ScalarType, MV, OP >:

Public Member Functions | |
Constructor/Destructor | |
| BlockDavidson (const Teuchos::RefCountPtr< Eigenproblem< ScalarType, MV, OP > > &problem, const Teuchos::RefCountPtr< SortManager< ScalarType, MV, OP > > &sorter, const Teuchos::RefCountPtr< OutputManager< ScalarType > > &printer, const Teuchos::RefCountPtr< StatusTest< ScalarType, MV, OP > > &tester, const Teuchos::RefCountPtr< MatOrthoManager< ScalarType, MV, OP > > &ortho, Teuchos::ParameterList ¶ms) | |
| BlockDavidson constructor with eigenproblem, solver utilities, and parameter list of solver options. | |
| virtual | ~BlockDavidson () |
| Anasazi::BlockDavidson destructor. | |
Solver methods | |
| void | iterate () |
| This method performs BlockDavidson iterations until the status test indicates the need to stop or an error occurs (in which case, an appropriate exception is thrown). | |
| void | initialize (BlockDavidsonState< ScalarType, MV > state) |
| Initialize the solver to an iterate, optionally providing the current basis and projected problem matrix, the current Ritz vectors and values, and the current residual. | |
| void | initialize () |
| Initialize the solver with the initial vectors from the eigenproblem or random data. | |
| bool | isInitialized () |
| Indicates whether the solver has been initialized or not. | |
| BlockDavidsonState< ScalarType, MV > | getState () const |
| Get access to the current state of the eigensolver. | |
Status methods | |
| int | getNumIters () const |
| Get the current iteration count. | |
| void | resetNumIters () |
| Reset the iteration count. | |
| Teuchos::RefCountPtr< const MV > | getRitzVectors () |
| Get access to the current Ritz vectors. | |
| std::vector< Value< ScalarType > > | getRitzValues () |
| Get the Ritz values for the previous iteration. | |
| std::vector< int > | getRitzIndex () |
| Get the index used for extracting individual Ritz vectors from getRitzVectors(). | |
| std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > | getResNorms () |
| Get the current residual norms, computing the norms if they are not up-to-date with the current residual vectors. | |
| std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > | getRes2Norms () |
| Get the current residual 2-norms, computing the norms if they are not up-to-date with the current residual vectors. | |
| std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > | getRitzRes2Norms () |
| Get the 2-norms of the Ritz residuals. | |
| int | getCurSubspaceDim () const |
| Get the dimension of the search subspace used to generate the current eigenvectors and eigenvalues. | |
| int | getMaxSubspaceDim () const |
| Get the maximum dimension allocated for the search subspace. For BlockDavidson, this always returns numBlocks*blockSize. | |
Accessor routines from Eigensolver | |
| const Eigenproblem< ScalarType, MV, OP > & | getProblem () const |
| Get a constant reference to the eigenvalue problem. | |
| void | setBlockSize (int blockSize) |
| Set the blocksize. | |
| int | getBlockSize () const |
| Get the blocksize used by the iterative solver. | |
| void | setAuxVecs (const Teuchos::Array< Teuchos::RefCountPtr< const MV > > &auxvecs) |
| Set the auxiliary vectors for the solver. | |
| Teuchos::Array< Teuchos::RefCountPtr< const MV > > | getAuxVecs () const |
| Get the auxiliary vectors for the solver. | |
BlockDavidson-specific accessor routines | |
| void | setSize (int blockSize, int numBlocks) |
| Set the blocksize and number of blocks to be used by the iterative solver in solving this eigenproblem. | |
Output methods | |
| void | currentStatus (ostream &os) |
| This method requests that the solver print out its current status to the given output stream. | |
Definition at line 146 of file AnasaziBlockDavidson.hpp.
|
||||||||||||||||||||||||||||||||
|
BlockDavidson constructor with eigenproblem, solver utilities, and parameter list of solver options. This constructor takes pointers required by the eigensolver, in addition to a parameter list of options for the eigensolver. These options include the following:
Definition at line 543 of file AnasaziBlockDavidson.hpp. |
|
|||||||||
|
Anasazi::BlockDavidson destructor.
Definition at line 167 of file AnasaziBlockDavidson.hpp. |
|
|||||||||
|
This method performs BlockDavidson iterations until the status test indicates the need to stop or an error occurs (in which case, an appropriate exception is thrown). iterate() will first determine whether the solver is uninitialized; if not, it will call initialize(). After initialization, the solver performs block Davidson iterations until the status test evaluates as Passed, at which point the method returns to the caller. The block Davidson iteration proceeds as follows:
The status test is queried at the beginning of the iteration. Possible exceptions thrown include std::invalid_argument or one of the BlockDavidson-specific exceptions. Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 1056 of file AnasaziBlockDavidson.hpp. |
|
||||||||||
|
Initialize the solver to an iterate, optionally providing the current basis and projected problem matrix, the current Ritz vectors and values, and the current residual. The BlockDavidson eigensolver contains a certain amount of state, including the current Krylov basis, the current eigenvectors, the current residual, etc. (see getState()) initialize() gives the user the opportunity to manually set these, although this must be done with caution, as the validity of the user input will not be checked.
Definition at line 739 of file AnasaziBlockDavidson.hpp. |
|
|||||||||
|
Initialize the solver with the initial vectors from the eigenproblem or random data.
Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 1046 of file AnasaziBlockDavidson.hpp. |
|
|||||||||
|
Indicates whether the solver has been initialized or not.
Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 242 of file AnasaziBlockDavidson.hpp. |
|
|||||||||
|
Get access to the current state of the eigensolver.
The data is only valid if isInitialized() == The data for the preconditioned residual is only meaningful in the scenario that the solver throws a ::BlockDavidsonRitzFailure exception during iterate().
Definition at line 255 of file AnasaziBlockDavidson.hpp. |
|
|||||||||
|
Get the current iteration count.
Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 281 of file AnasaziBlockDavidson.hpp. |
|
|||||||||
|
Reset the iteration count.
Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 284 of file AnasaziBlockDavidson.hpp. |
|
|||||||||
|
Get access to the current Ritz vectors.
Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 293 of file AnasaziBlockDavidson.hpp. |
|
|||||||||
|
Get the Ritz values for the previous iteration.
Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 300 of file AnasaziBlockDavidson.hpp. |
|
|||||||||
|
Get the index used for extracting individual Ritz vectors from getRitzVectors(). Because BlockDavidson is a Hermitian solver, all Ritz values are real and all Ritz vectors can be represented in a single column of a multivector. Therefore, getRitzIndex() is not needed when using the output from getRitzVectors().
Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 316 of file AnasaziBlockDavidson.hpp. |
|
|||||||||
|
Get the current residual norms, computing the norms if they are not up-to-date with the current residual vectors.
Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 1311 of file AnasaziBlockDavidson.hpp. |
|
|||||||||
|
Get the current residual 2-norms, computing the norms if they are not up-to-date with the current residual vectors.
Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 1325 of file AnasaziBlockDavidson.hpp. |
|
|||||||||
|
Get the 2-norms of the Ritz residuals.
Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 342 of file AnasaziBlockDavidson.hpp. |
|
|||||||||
|
Get the dimension of the search subspace used to generate the current eigenvectors and eigenvalues.
Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 354 of file AnasaziBlockDavidson.hpp. |
|
|||||||||
|
Get the maximum dimension allocated for the search subspace. For BlockDavidson, this always returns numBlocks*blockSize.
Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 360 of file AnasaziBlockDavidson.hpp. |
|
|||||||||
|
Get a constant reference to the eigenvalue problem.
Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 370 of file AnasaziBlockDavidson.hpp. |
|
||||||||||
|
Set the blocksize. This method is required to support the interface provided by Eigensolver. However, the preferred method of setting the allocated size for the BlockDavidson eigensolver is setSize(). In fact, setBlockSize() simply calls setSize(), maintaining the current number of blocks. The block size determines the number of Ritz vectors and values that are computed on each iteration, thereby determining the increase in the Krylov subspace at each iteration. Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 618 of file AnasaziBlockDavidson.hpp. |
|
|||||||||
|
Get the blocksize used by the iterative solver.
Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 384 of file AnasaziBlockDavidson.hpp. |
|
||||||||||
|
Set the auxiliary vectors for the solver. Because the current basis V cannot be assumed orthogonal to the new auxiliary vectors, a call to setAuxVecs() will reset the solver to the uninitialized state. This happens only in the case where the new auxiliary vectors have a combined dimension of greater than zero. In order to preserve the current state, the user will need to extract it from the solver using getState(), orthogonalize it against the new auxiliary vectors, and reinitialize using initialize(). Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 701 of file AnasaziBlockDavidson.hpp. |
|
|||||||||
|
Get the auxiliary vectors for the solver.
Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 401 of file AnasaziBlockDavidson.hpp. |
|
||||||||||||||||
|
Set the blocksize and number of blocks to be used by the iterative solver in solving this eigenproblem. Changing either the block size or the number of blocks will reset the solver to an uninitialized state. The requested block size must be strictly positive; the number of blocks must be greater than one. Invalid arguments will result in a std::invalid_argument exception. Definition at line 627 of file AnasaziBlockDavidson.hpp. |
|
||||||||||
|
This method requests that the solver print out its current status to the given output stream.
Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 1481 of file AnasaziBlockDavidson.hpp. |
1.3.9.1