|
Belos Version of the Day
|
Newton-basis Akx implementation using abstract operators. More...
#include <BelosNewtonOpAkx.hpp>

Public Types | |
| typedef Teuchos::ScalarTraits < Scalar >::magnitudeType | magnitude_type |
Public Member Functions | |
| NewtonOpAkx (const Teuchos::RCP< const OP > &A, const Teuchos::RCP< const OP > &M_left, const Teuchos::RCP< const OP > &M_right, const bool modified) | |
| void | computeBasis (const MV &q_last, MV &V_cur, const int s) |
| Compute matrix powers kernel with first vector q_last. | |
| void | computeFlexibleBasis (const MV &q_last, MV &Z_cur, MV &V_cur, const int s) |
| Compute flexible matrix powers kernel. | |
| mults | push_back (curMult) |
| mults | push_back (curMult) |
| if (B_.is_null()||(B_->numRows()!=s+1||B_->numCols()!=s)||shiftsChanged_) B_ | |
| void | updateBasis (const Teuchos::ArrayView< const magnitude_type > &realParts, const Teuchos::ArrayView< const magnitude_type > &imagParts, const Teuchos::ArrayView< const int > &multiplicities, const int numValues) |
| Improve the basis by updating eigenvalue information. | |
Public Attributes | |
| numShifts = 2*curMult | |
| ArrayView< const magnitude_type > | imagParts = imagParts_.view (0, numUniqueShifts) |
| return | B_ |
Newton-basis Akx implementation using abstract operators.
Definition at line 61 of file BelosNewtonOpAkx.hpp.
| typedef Teuchos::ScalarTraits<Scalar>::magnitudeType Belos::NewtonOpAkx< Scalar, MV, OP >::magnitude_type |
Reimplemented from Belos::Akx< Scalar, MV >.
Definition at line 63 of file BelosNewtonOpAkx.hpp.
| Belos::NewtonOpAkx< Scalar, MV, OP >::NewtonOpAkx | ( | const Teuchos::RCP< const OP > & | A, |
| const Teuchos::RCP< const OP > & | M_left, | ||
| const Teuchos::RCP< const OP > & | M_right, | ||
| const bool | modified | ||
| ) | [inline] |
Definition at line 65 of file BelosNewtonOpAkx.hpp.
| void Belos::NewtonOpAkx< Scalar, MV, OP >::computeBasis | ( | const MV & | q_last, |
| MV & | V_cur, | ||
| const int | s | ||
| ) | [inline, virtual] |
Compute matrix powers kernel with first vector q_last.
Fill in the first s columns of V_cur with the results of the matrix powers kernel (not including the first vector). Any remaining columns of V_cur will not be modified.
| q_last | [in] First vector of the matrix powers kernel. |
| V_cur | [out] The first s columns will be filled in with the results of the matrix powers kernel. |
| s | [in] Number of vectors to compute. s >= 0. If s == 0, no vectors will be computed. |
Implements Belos::Akx< Scalar, MV >.
Definition at line 72 of file BelosNewtonOpAkx.hpp.
| void Belos::NewtonOpAkx< Scalar, MV, OP >::computeFlexibleBasis | ( | const MV & | q_last, |
| MV & | Z_cur, | ||
| MV & | V_cur, | ||
| const int | s | ||
| ) | [inline, virtual] |
Compute flexible matrix powers kernel.
For Flexible GMRES only. Given the first vector q = q_last: Fill in the first s columns of V_cur with a candidate basis for the span of the vectors
, and fill in the first s columns of Z_cur with a candidate basis for the span of the vectors
. "Candidate basis" means that the vectors will be linearly independent in exact arithmetic, as long as the corresponding Krylov subspace has at least that dimension. Any remaining columns of V_cur or Z_cur will not be modified.
We call V_cur the "right basis" because the preconditioner is applied on the right side of the operator, and Z_cur the "left basis" because the preconditioner is applied to the left side. If the preconditioner is the identity matrix (a "trivial preconditioner"), then the first s-1 columns of the left basis coincide with the last s-1 columns of the right basis.
| q_last | [in] First vector of the matrix powers kernel. |
| Z_cur | [out] The first s columns will be filled in with the right basis. |
| V_cur | [out] The first s columns will be filled in with the left basis. |
| s | [in] Number of vectors to compute. s >= 0. If s == 0, no vectors will be computed. |
Implements Belos::Akx< Scalar, MV >.
Definition at line 141 of file BelosNewtonOpAkx.hpp.
| mults Belos::NewtonOpAkx< Scalar, MV, OP >::push_back | ( | curMult | ) |
| mults Belos::NewtonOpAkx< Scalar, MV, OP >::push_back | ( | curMult | ) |
| Belos::NewtonOpAkx< Scalar, MV, OP >::if | ( | B_.is_null()||(B_->numRows()!=s+1||B_->numCols()!=s)|| | shiftsChanged_ | ) |
| void Belos::NewtonOpAkx< Scalar, MV, OP >::updateBasis | ( | const Teuchos::ArrayView< const magnitude_type > & | realParts, |
| const Teuchos::ArrayView< const magnitude_type > & | imagParts, | ||
| const Teuchos::ArrayView< const int > & | multiplicities, | ||
| const int | numValues | ||
| ) | [inline, virtual] |
Improve the basis by updating eigenvalue information.
Some matrix powers kernel implementations may benefit (in terms of numerical stability) from (improvements to) approximations to the eigenvalues of the operator. Many Krylov subspace methods (both for linear systems and for eigenvalue problems) naturally produce such approximations, which may improve as the iteration progresses.
Use the given numValues eigenvalue approximations possibly to improve the numerical properties (e.g., condition number) of the matrix powers kernel basis. This call assumes that eigenvalues may be complex. Real parts are stored in the first array, and their corresponding imaginary parts in the second array.
| realParts | [in] Real parts of the eigenvalue approximations. realParts[k] + i*imagParts[k] is the k-th approximate eigenvalue, of multiplicity multiplicities[k]. Only the first numValues entries are read. |
| imagParts | [in] Imaginary parts of the eigenvalue approximations. realParts[k] + i*imagParts[k] is the k-th approximate eigenvalue, of multiplicity multiplicities[k]. If no eigenvalues are complex, all of the entries of imagParts must be zero. Only the first numValues entries are read. |
| multiplicities | [in] Multiplicity of the k-th eigenvalue approximation. Only the first numValues entries are read. |
| numValues | [in] The number of eigenvalue approximations, not counting multiplicities. |
Reimplemented from Belos::Akx< Scalar, MV >.
Definition at line 290 of file BelosNewtonOpAkx.hpp.
| Belos::NewtonOpAkx< Scalar, MV, OP >::numShifts = 2*curMult |
Definition at line 260 of file BelosNewtonOpAkx.hpp.
| ArrayView<const magnitude_type> Belos::NewtonOpAkx< Scalar, MV, OP >::imagParts = imagParts_.view (0, numUniqueShifts) |
Definition at line 277 of file BelosNewtonOpAkx.hpp.
| return Belos::NewtonOpAkx< Scalar, MV, OP >::B_ |
Definition at line 285 of file BelosNewtonOpAkx.hpp.
1.7.4