Stokhos Package Browser (Single Doxygen Collection)
Version of the Day
|
#include <Teuchos_SerialQRDenseSolver_MP_Vector.hpp>
Inherits CompObject, and Object.
Public Types | |
typedef Sacado::MP::Vector< Storage > | ScalarType |
typedef ScalarTraits< ScalarType >::magnitudeType | MagnitudeType |
Protected Types | |
typedef ScalarType::value_type | BaseScalarType |
typedef SerialQRDenseSolver< OrdinalType, BaseScalarType > | BaseQRType |
typedef SerialDenseMatrix< OrdinalType, BaseScalarType > | BaseMatrixType |
typedef SerialDenseMatrix< OrdinalType, ScalarType > | MatrixType |
Protected Member Functions | |
void | resetMatrix () |
void | resetVectors () |
RCP< BaseMatrixType > | createBaseMatrix (const RCP< MatrixType > &mat) const |
RCP< MatrixType > | createMatrix (const RCP< BaseMatrixType > &base_mat) const |
Protected Attributes | |
BaseQRType | base_QR_ |
OrdinalType | M_ |
OrdinalType | N_ |
OrdinalType | SacadoSize_ |
RCP< MatrixType > | Matrix_ |
RCP< MatrixType > | LHS_ |
RCP< MatrixType > | RHS_ |
RCP< MatrixType > | Factor_ |
RCP< MatrixType > | FactorQ_ |
RCP< MatrixType > | FactorR_ |
RCP< BaseMatrixType > | Base_Matrix_ |
RCP< BaseMatrixType > | Base_LHS_ |
RCP< BaseMatrixType > | Base_RHS_ |
RCP< BaseMatrixType > | Base_Factor_ |
RCP< BaseMatrixType > | Base_FactorQ_ |
RCP< BaseMatrixType > | Base_FactorR_ |
Private Member Functions | |
SerialQRDenseSolver (const SerialQRDenseSolver &Source) | |
SerialQRDenseSolver & | operator= (const SerialQRDenseSolver &Source) |
Constructor/Destructor Methods | |
SerialQRDenseSolver () | |
Default constructor; matrix should be set using setMatrix(), LHS and RHS set with setVectors(). More... | |
virtual | ~SerialQRDenseSolver () |
SerialQRDenseSolver destructor. More... | |
Set Methods | |
int | setMatrix (const RCP< SerialDenseMatrix< OrdinalType, ScalarType > > &A) |
Sets the pointers for coefficient matrix. More... | |
int | setVectors (const RCP< SerialDenseMatrix< OrdinalType, ScalarType > > &X, const RCP< SerialDenseMatrix< OrdinalType, ScalarType > > &B) |
Sets the pointers for left and right hand side vector(s). More... | |
Strategy Modifying Methods | |
void | factorWithEquilibration (bool flag) |
Causes equilibration to be called just before the matrix factorization as part of the call to factor . More... | |
void | solveWithTranspose (bool flag) |
If flag is true, causes all subsequent function calls to work with the adjoint of this matrix, otherwise not. More... | |
void | solveWithTransposeFlag (Teuchos::ETransp trans) |
All subsequent function calls will work with the transpose-type set by this method (Teuchos::NO_TRANS or Teuchos::CONJ_TRANS). More... | |
Factor/Solve/Invert Methods | |
int | factor () |
Computes the in-place QR factorization of the matrix using the LAPACK routine _GETRF or the Eigen class HouseholderQR. More... | |
int | solve () |
Computes the solution X to AX = B for the this matrix and the B provided to SetVectors().. More... | |
int | computeEquilibrateScaling () |
Determines if this matrix should be scaled. More... | |
int | equilibrateMatrix () |
Equilibrates the this matrix. More... | |
int | equilibrateRHS () |
Equilibrates the current RHS. More... | |
int | unequilibrateLHS () |
Unscales the solution vectors if equilibration was used to solve the system. More... | |
int | formQ () |
Explicitly forms the unitary matrix Q. More... | |
int | formR () |
Explicitly forms the upper triangular matrix R. More... | |
int | multiplyQ (ETransp transq, SerialDenseMatrix< OrdinalType, ScalarType > &C) |
Left multiply the input matrix by the unitary matrix Q or its adjoint. More... | |
int | solveR (ETransp transr, SerialDenseMatrix< OrdinalType, ScalarType > &C) |
Solve input matrix on the left with the upper triangular matrix R or its adjoint. More... | |
Query methods | |
bool | transpose () |
Returns true if adjoint of this matrix has and will be used. More... | |
bool | factored () |
Returns true if matrix is factored (factor available via getFactoredMatrix()). More... | |
bool | equilibratedA () |
Returns true if factor is equilibrated (factor available via getFactoredMatrix()). More... | |
bool | equilibratedB () |
Returns true if RHS is equilibrated (RHS available via getRHS()). More... | |
bool | shouldEquilibrate () |
Returns true if the LAPACK general rules for equilibration suggest you should equilibrate the system. More... | |
bool | solved () |
Returns true if the current set of vectors has been solved. More... | |
bool | formedQ () |
Returns true if Q has been formed explicitly. More... | |
bool | formedR () |
Returns true if R has been formed explicitly. More... | |
Data Accessor methods | |
RCP< SerialDenseMatrix< OrdinalType, ScalarType > > | getMatrix () const |
Returns pointer to current matrix. More... | |
RCP< SerialDenseMatrix< OrdinalType, ScalarType > > | getFactoredMatrix () const |
Returns pointer to factored matrix (assuming factorization has been performed). More... | |
RCP< SerialDenseMatrix< OrdinalType, ScalarType > > | getQ () const |
Returns pointer to Q (assuming factorization has been performed). More... | |
RCP< SerialDenseMatrix< OrdinalType, ScalarType > > | getR () const |
Returns pointer to R (assuming factorization has been performed). More... | |
RCP< SerialDenseMatrix< OrdinalType, ScalarType > > | getLHS () const |
Returns pointer to current LHS. More... | |
RCP< SerialDenseMatrix< OrdinalType, ScalarType > > | getRHS () const |
Returns pointer to current RHS. More... | |
OrdinalType | numRows () const |
Returns row dimension of system. More... | |
OrdinalType | numCols () const |
Returns column dimension of system. More... | |
std::vector< ScalarType > | tau () const |
Returns pointer to pivot vector (if factorization has been computed), zero otherwise. More... | |
MagnitudeType | ANORM () const |
Returns the absolute value of the largest element of this matrix (returns -1 if not yet computed). More... | |
I/O methods | |
void | Print (std::ostream &os) const |
Print service methods; defines behavior of ostream << operator. More... | |
Definition at line 60 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
typedef Sacado::MP::Vector<Storage> Teuchos::SerialQRDenseSolver< OrdinalType, Sacado::MP::Vector< Storage > >::ScalarType |
Definition at line 67 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
typedef ScalarTraits<ScalarType>::magnitudeType Teuchos::SerialQRDenseSolver< OrdinalType, Sacado::MP::Vector< Storage > >::MagnitudeType |
Definition at line 68 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
protected |
Definition at line 257 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
protected |
Definition at line 258 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
protected |
Definition at line 259 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
protected |
Definition at line 260 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
Teuchos::SerialQRDenseSolver< OrdinalType, Sacado::MP::Vector< Storage > >::SerialQRDenseSolver | ( | ) |
Default constructor; matrix should be set using setMatrix(), LHS and RHS set with setVectors().
Definition at line 348 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
inlinevirtual |
SerialQRDenseSolver destructor.
Definition at line 76 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
private |
int Teuchos::SerialQRDenseSolver< OrdinalType, Sacado::MP::Vector< Storage > >::setMatrix | ( | const RCP< SerialDenseMatrix< OrdinalType, ScalarType > > & | A | ) |
Sets the pointers for coefficient matrix.
Row dimension of A must be greater than or equal to the column dimension of A.
Definition at line 418 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
int Teuchos::SerialQRDenseSolver< OrdinalType, Sacado::MP::Vector< Storage > >::setVectors | ( | const RCP< SerialDenseMatrix< OrdinalType, ScalarType > > & | X, |
const RCP< SerialDenseMatrix< OrdinalType, ScalarType > > & | B | ||
) |
Sets the pointers for left and right hand side vector(s).
Row dimension of X must match column dimension of matrix A, row dimension of B must match row dimension of A.
Definition at line 444 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
inline |
Causes equilibration to be called just before the matrix factorization as part of the call to factor
.
Definition at line 101 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
inline |
If flag
is true, causes all subsequent function calls to work with the adjoint of this matrix, otherwise not.
Definition at line 106 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
inline |
All subsequent function calls will work with the transpose-type set by this method (Teuchos::NO_TRANS
or Teuchos::CONJ_TRANS).
Definition at line 111 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
inline |
Computes the in-place QR factorization of the matrix using the LAPACK routine _GETRF or the Eigen class HouseholderQR.
Definition at line 124 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
inline |
Computes the solution X to AX = B for the this matrix and the B provided to SetVectors()..
Definition at line 130 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
inline |
Determines if this matrix should be scaled.
Definition at line 136 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
inline |
Equilibrates the this matrix.
Definition at line 145 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
inline |
Equilibrates the current RHS.
Definition at line 152 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
inline |
Unscales the solution vectors if equilibration was used to solve the system.
Definition at line 159 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
int Teuchos::SerialQRDenseSolver< OrdinalType, Sacado::MP::Vector< Storage > >::formQ | ( | ) |
Explicitly forms the unitary matrix Q.
Definition at line 476 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
int Teuchos::SerialQRDenseSolver< OrdinalType, Sacado::MP::Vector< Storage > >::formR | ( | ) |
Explicitly forms the upper triangular matrix R.
Definition at line 486 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
int Teuchos::SerialQRDenseSolver< OrdinalType, Sacado::MP::Vector< Storage > >::multiplyQ | ( | ETransp | transq, |
SerialDenseMatrix< OrdinalType, ScalarType > & | C | ||
) |
Left multiply the input matrix by the unitary matrix Q or its adjoint.
Definition at line 497 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
int Teuchos::SerialQRDenseSolver< OrdinalType, Sacado::MP::Vector< Storage > >::solveR | ( | ETransp | transr, |
SerialDenseMatrix< OrdinalType, ScalarType > & | C | ||
) |
Solve input matrix on the left with the upper triangular matrix R or its adjoint.
Definition at line 506 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
inline |
Returns true if adjoint of this matrix has and will be used.
Definition at line 190 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
inline |
Returns true if matrix is factored (factor available via getFactoredMatrix()).
Definition at line 193 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
inline |
Returns true if factor is equilibrated (factor available via getFactoredMatrix()).
Definition at line 196 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
inline |
Returns true if RHS is equilibrated (RHS available via getRHS()).
Definition at line 199 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
inline |
Returns true if the LAPACK general rules for equilibration suggest you should equilibrate the system.
Definition at line 202 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
inline |
Returns true if the current set of vectors has been solved.
Definition at line 205 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
inline |
Returns true if Q has been formed explicitly.
Definition at line 208 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
inline |
Returns true if R has been formed explicitly.
Definition at line 211 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
inline |
Returns pointer to current matrix.
Definition at line 219 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
inline |
Returns pointer to factored matrix (assuming factorization has been performed).
Definition at line 222 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
inline |
Returns pointer to Q (assuming factorization has been performed).
Definition at line 225 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
inline |
Returns pointer to R (assuming factorization has been performed).
Definition at line 228 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
inline |
Returns pointer to current LHS.
Definition at line 231 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
inline |
Returns pointer to current RHS.
Definition at line 234 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
inline |
Returns row dimension of system.
Definition at line 237 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
inline |
Returns column dimension of system.
Definition at line 240 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
inline |
Returns pointer to pivot vector (if factorization has been computed), zero otherwise.
Definition at line 243 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
inline |
Returns the absolute value of the largest element of this matrix (returns -1 if not yet computed).
Definition at line 246 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
void Teuchos::SerialQRDenseSolver< OrdinalType, Sacado::MP::Vector< Storage > >::Print | ( | std::ostream & | os | ) | const |
Print service methods; defines behavior of ostream << operator.
Definition at line 515 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
protected |
Definition at line 370 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
protected |
Definition at line 361 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
protected |
Definition at line 381 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
protected |
Definition at line 400 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
private |
|
protected |
Definition at line 266 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
protected |
Definition at line 268 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
protected |
Definition at line 269 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
protected |
Definition at line 270 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
protected |
Definition at line 272 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
protected |
Definition at line 273 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
protected |
Definition at line 274 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
protected |
Definition at line 275 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
protected |
Definition at line 276 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
protected |
Definition at line 277 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
protected |
Definition at line 279 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
protected |
Definition at line 280 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
protected |
Definition at line 281 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
protected |
Definition at line 282 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
protected |
Definition at line 283 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.
|
protected |
Definition at line 284 of file Teuchos_SerialQRDenseSolver_MP_Vector.hpp.