#include <AnasaziLOBPCG.hpp>
Inheritance diagram for Anasazi::LOBPCG< ScalarType, MV, OP >:

Public Member Functions | |
Constructor/Destructor | |
| LOBPCG (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) | |
| LOBPCG constructor with eigenproblem, solver utilities, and parameter list of solver options. | |
| virtual | ~LOBPCG () |
| LOBPCG destructor | |
Solver methods | |
| void | iterate () |
| This method performs LOBPCG iterations until the status test indicates the need to stop or an error occurs (in which case, an exception is thrown). | |
| void | initialize (LOBPCGState< ScalarType, MV > newstate) |
| Initialize the solver to an iterate, optionally providing the Ritz values, residual, and search direction. | |
| 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. | |
| LOBPCGState< ScalarType, MV > | getState () const |
| Get 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 the Ritz vectors from the previous iteration. | |
| std::vector< Value< ScalarType > > | getRitzValues () |
| Get the Ritz values from the previous iteration. | |
| std::vector< int > | getRitzIndex () |
| Get the index used for extracting Ritz vectors from getRitzVectors(). | |
| std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > | getResNorms () |
| Get the current residual norms. | |
| std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > | getRes2Norms () |
| Get the current residual 2-norms. | |
| 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 LOBPCG, this always returns 3*getBlockSize(), the dimension of the subspace colspan([X H P]). | |
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 to be used by the iterative solver in solving this eigenproblem. | |
| int | getBlockSize () const |
| Get the blocksize to be used by the iterative solver in solving this eigenproblem. | |
| 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 current auxiliary vectors. | |
LOBPCG-specific accessor routines | |
| void | setFullOrtho (bool fullOrtho) |
| Instruct the LOBPCG iteration to use full orthogonality. | |
| bool | getFullOrtho () const |
| Determine if the LOBPCG iteration is using full orthogonality. | |
| bool | hasP () |
| Indicates whether the search direction given by getState() is valid. | |
Output methods | |
| void | currentStatus (ostream &os) |
| This method requests that the solver print out its current status to screen. | |
This implementation is a modification of the one found in A. Knyazev, "Toward the optimal preconditioned eigensolver: Locally optimal block preconditioner conjugate gradient method", SIAM J. Sci. Comput., vol 23, n 2, pp. 517-541.
The modification consists of the orthogonalization steps recommended in U. Hetmaniuk and R. Lehoucq, "Basis Selection in LOBPCG", Journal of Computational Physics.
These modifcation are referred to as full orthogonalization, and consist of also conducting the local optimization using an orthonormal basis.
Definition at line 196 of file AnasaziLOBPCG.hpp.
|
||||||||||||||||||||||||||||||||
|
LOBPCG 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 616 of file AnasaziLOBPCG.hpp. |
|
|||||||||
|
LOBPCG destructor
Definition at line 218 of file AnasaziLOBPCG.hpp. |
|
|||||||||
|
This method performs LOBPCG iterations until the status test indicates the need to stop or an error occurs (in which case, an exception is thrown). iterate() will first determine whether the solver is initialized; if not, it will call initialize() using default arguments. After initialization, the solver performs LOBPCG iterations until the status test evaluates as Passed, at which point the method returns to the caller. The LOBPCG iteration proceeds as follows:
The status test is queried at the beginning of the iteration. Possible exceptions thrown include std::logic_error, std::invalid_argument or one of the LOBPCG-specific exceptions. Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 1154 of file AnasaziLOBPCG.hpp. |
|
||||||||||
|
Initialize the solver to an iterate, optionally providing the Ritz values, residual, and search direction. The LOBPCG eigensolver contains a certain amount of state relating to the current iterate, including the current residual, the current search direction, and the images of these spaces under the operators. initialize() gives the user the opportunity to manually set these, although this must be done with caution, abiding by the rules given below. All notions of orthogonality and orthonormality are derived from the inner product specified by the orthogonalization manager.
Definition at line 873 of file AnasaziLOBPCG.hpp. |
|
|||||||||
|
Initialize the solver with the initial vectors from the eigenproblem or random data.
Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 1126 of file AnasaziLOBPCG.hpp. |
|
|||||||||
|
Indicates whether the solver has been initialized or not.
Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 302 of file AnasaziLOBPCG.hpp. |
|
|||||||||
|
Get the current state of the eigensolver.
The data is only valid if isInitialized() ==
Definition at line 314 of file AnasaziLOBPCG.hpp. |
|
|||||||||
|
Get the current iteration count.
Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 343 of file AnasaziLOBPCG.hpp. |
|
|||||||||
|
Reset the iteration count.
Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 346 of file AnasaziLOBPCG.hpp. |
|
|||||||||
|
Get the Ritz vectors from the previous iteration.
Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 355 of file AnasaziLOBPCG.hpp. |
|
|||||||||
|
Get the Ritz values from the previous iteration.
Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 362 of file AnasaziLOBPCG.hpp. |
|
|||||||||
|
Get the index used for extracting 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 378 of file AnasaziLOBPCG.hpp. |
|
|||||||||
|
Get the current residual norms.
Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 1757 of file AnasaziLOBPCG.hpp. |
|
|||||||||
|
Get the current residual 2-norms.
Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 1771 of file AnasaziLOBPCG.hpp. |
|
|||||||||
|
Get the 2-norms of the Ritz residuals.
Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 406 of file AnasaziLOBPCG.hpp. |
|
|||||||||
|
Get the dimension of the search subspace used to generate the current eigenvectors and eigenvalues. LOBPCG employs a sequential subspace iteration, maintaining a fixed-rank basis, as opposed to an expanding subspace mechanism employed by Krylov-subspace solvers like BlockKrylovSchur and BlockDavidson.
Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 421 of file AnasaziLOBPCG.hpp. |
|
|||||||||
|
Get the maximum dimension allocated for the search subspace. For LOBPCG, this always returns 3*getBlockSize(), the dimension of the subspace colspan([X H P]).
Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 429 of file AnasaziLOBPCG.hpp. |
|
|||||||||
|
Get a constant reference to the eigenvalue problem.
Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 438 of file AnasaziLOBPCG.hpp. |
|
||||||||||
|
Set the blocksize to be used by the iterative solver in solving this eigenproblem. If the block size is reduced, then the new iterate (and residual and search direction) are chosen as the subset of the current iterate preferred by the sort manager. Otherwise, the solver state is set to uninitialized. Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 692 of file AnasaziLOBPCG.hpp. |
|
|||||||||
|
Get the blocksize to be used by the iterative solver in solving this eigenproblem.
Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 453 of file AnasaziLOBPCG.hpp. |
|
||||||||||
|
Set the auxiliary vectors for the solver. Because the current iterate X and search direction P cannot be assumed orthogonal to the new auxiliary vectors, a call to setAuxVecs() with a non-empty argument will reset the solver to the uninitialized state. 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 manually reinitialize the solver using initialize(). Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 828 of file AnasaziLOBPCG.hpp. |
|
|||||||||
|
Get the current auxiliary vectors.
Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 470 of file AnasaziLOBPCG.hpp. |
|
||||||||||
|
Instruct the LOBPCG iteration to use full orthogonality.
If the getFullOrtho() == Definition at line 1136 of file AnasaziLOBPCG.hpp. |
|
|||||||||
|
Determine if the LOBPCG iteration is using full orthogonality.
Definition at line 485 of file AnasaziLOBPCG.hpp. |
|
|||||||||
|
Indicates whether the search direction given by getState() is valid.
Definition at line 488 of file AnasaziLOBPCG.hpp. |
|
||||||||||
|
This method requests that the solver print out its current status to screen.
Implements Anasazi::Eigensolver< ScalarType, MV, OP >. Definition at line 1912 of file AnasaziLOBPCG.hpp. |
1.3.9.1