Belos Package Browser (Single Doxygen Collection) Development

"Container" for the GMRES projected leastsquares problem. More...
#include <BelosProjectedLeastSquaresSolver.hpp>
Public Types  
typedef Scalar  scalar_type 
The type of the entries in the projected leastsquares problem.  
typedef Teuchos::ScalarTraits < Scalar >::magnitudeType  magnitude_type 
The type of the magnitude of scalar_type values.  
Public Member Functions  
ProjectedLeastSquaresProblem (const int maxNumIterations)  
Constructor.  
void  reset (const typename Teuchos::ScalarTraits< Scalar >::magnitudeType beta) 
Reset the projected leastsquares problem.  
void  reallocateAndReset (const typename Teuchos::ScalarTraits< Scalar >::magnitudeType beta, const int maxNumIterations) 
(Re)allocate and reset the projected leastsquares problem.  
Public Attributes  
Teuchos::SerialDenseMatrix < int, Scalar >  H 
The upper Hessenberg matrix from GMRES.  
Teuchos::SerialDenseMatrix < int, Scalar >  R 
Upper triangular factor from the QR factorization of H.  
Teuchos::SerialDenseMatrix < int, Scalar >  y 
Current solution of the projected leastsquares problem.  
Teuchos::SerialDenseMatrix < int, Scalar >  z 
Current righthand side of the projected leastsquares problem.  
Teuchos::Array< Scalar >  theCosines 
Array of cosines from the computed Givens rotations.  
Teuchos::Array< Scalar >  theSines 
Array of sines from the computed Givens rotations. 
"Container" for the GMRES projected leastsquares problem.
See the documentation of ProjectedLeastSquaresSolver
to learn how to use this class in a GMREStype iterative solver.
Definition at line 158 of file BelosProjectedLeastSquaresSolver.hpp.
Belos::details::ProjectedLeastSquaresProblem< Scalar >::scalar_type 
The type of the entries in the projected leastsquares problem.
Definition at line 162 of file BelosProjectedLeastSquaresSolver.hpp.
Belos::details::ProjectedLeastSquaresProblem< Scalar >::magnitude_type 
The type of the magnitude of scalar_type
values.
Definition at line 165 of file BelosProjectedLeastSquaresSolver.hpp.
Belos::details::ProjectedLeastSquaresProblem< Scalar >::ProjectedLeastSquaresProblem  (  const int  maxNumIterations  )  [inline] 
Constructor.
Reserve space for a projected leastsquares problem of dimension at most (maxNumIterations+1) by maxNumIterations. "Iterations" refers to GMRES iterations. We assume that after the first iteration (not counting the computation of the initial residual as an iteration), the projected leastsquares problem has dimension 2 by 1.
Definition at line 236 of file BelosProjectedLeastSquaresSolver.hpp.
void Belos::details::ProjectedLeastSquaresProblem< Scalar >::reset  (  const typename Teuchos::ScalarTraits< Scalar >::magnitudeType  beta  )  [inline] 
Reset the projected leastsquares problem.
"Reset" means that the righthand side of the projected leastsquares problem is restored to . The value is typically the norm of the initial or restarted residual vector.
This method does not reallocate or resize any of the matrices or vectors. Since this class keeps the original upper Hessenberg matrix, the application may choose to recompute its QR factorization up to the desired point and apply the resulting Givens rotations to the righthand size z resulting from this reset operation. Alternately, the application may simply overwrite the upper Hessenberg matrix's entries with new data.
beta  [in] The initial residual norm of the (nonprojected) linear system . 
Definition at line 264 of file BelosProjectedLeastSquaresSolver.hpp.
void Belos::details::ProjectedLeastSquaresProblem< Scalar >::reallocateAndReset  (  const typename Teuchos::ScalarTraits< Scalar >::magnitudeType  beta, 
const int  maxNumIterations  
)  [inline] 
(Re)allocate and reset the projected leastsquares problem.
"(Re)allocate" means to (re)size H, R, y, and z to their appropriate maximum dimensions, given the maximum number of iterations that GMRES may execute. "Reset" means to do what the reset()
method does. Reallocation happens first, then reset.
beta  [in] The initial residual norm of the (nonprojected) linear system . 
maxNumIterations  [in] The maximum number of iterations that GMRES may execute. 
Definition at line 291 of file BelosProjectedLeastSquaresSolver.hpp.
Teuchos::SerialDenseMatrix<int,Scalar> Belos::details::ProjectedLeastSquaresProblem< Scalar >::H 
The upper Hessenberg matrix from GMRES.
This matrix's number of rows is one more than its number of columns. The updating methods never modify H; they just copy out the relevant data into R. This allows GMRES implementations to implement features like backtracking (throwing away iterations).
Definition at line 174 of file BelosProjectedLeastSquaresSolver.hpp.
Teuchos::SerialDenseMatrix<int,Scalar> Belos::details::ProjectedLeastSquaresProblem< Scalar >::R 
Upper triangular factor from the QR factorization of H.
R is a matrix with the same dimensions as H. It is used for computing and storing the incrementally computed upper triangular factor from the QR factorization of H. R must have the same dimensions as H (the number of rows is one more than the number of columns).
H[0:k, 0:k1] (inclusive zerobased index ranges) is the upper Hessenberg matrix for the first k iterations of GMRES (where k = 0, 1, 2, ...).
Definition at line 187 of file BelosProjectedLeastSquaresSolver.hpp.
Teuchos::SerialDenseMatrix<int,Scalar> Belos::details::ProjectedLeastSquaresProblem< Scalar >::y 
Current solution of the projected leastsquares problem.
The vector (matrix with one column) y has the same number of rows as H. It is used to store the solution of the projected leastsquares problem at each step. The vector should have one more entry than necessary for the solution, because of the way we solve the leastsquares problem. (Most of the methods require copying the righthand side vector into y, and the righthand side has one more entry than the solution.)
Definition at line 199 of file BelosProjectedLeastSquaresSolver.hpp.
Teuchos::SerialDenseMatrix<int,Scalar> Belos::details::ProjectedLeastSquaresProblem< Scalar >::z 
Current righthand side of the projected leastsquares problem.
The vector (onecolumn matrix) z has the same number of rows as H. It stores the current righthand side of the projected leastsquares problem. The z vector may be updated either progressively (if a Givens rotation method is used) or all at once (if an LAPACK factorization method is used).
Definition at line 209 of file BelosProjectedLeastSquaresSolver.hpp.
Teuchos::Array<Scalar> Belos::details::ProjectedLeastSquaresProblem< Scalar >::theCosines 
Array of cosines from the computed Givens rotations.
This array is only filled in if a Givens rotation method is used for updating the leastsquares problem.
In the complexarithmetic case, it is possible to compute entirely realvalued cosines. However, we choose to represent them as the original scalar type, rather than the magnitude type.
Definition at line 220 of file BelosProjectedLeastSquaresSolver.hpp.
Teuchos::Array<Scalar> Belos::details::ProjectedLeastSquaresProblem< Scalar >::theSines 
Array of sines from the computed Givens rotations.
This array is only filled in if a Givens rotation method is used for updating the leastsquares problem.
Definition at line 226 of file BelosProjectedLeastSquaresSolver.hpp.