NOX
Development
|
A convenience class to compute the QR factorization of a an extended multi-vector. More...
#include <LOCA_BorderedSolver_HouseholderQR.H>
Public Member Functions | |
HouseholderQR (const Teuchos::RCP< LOCA::GlobalData > &global_data) | |
Constructor. More... | |
virtual | ~HouseholderQR () |
Destructor. | |
void | computeQR (const NOX::Abstract::MultiVector::DenseMatrix &C, const NOX::Abstract::MultiVector &B, bool use_c_transpose, NOX::Abstract::MultiVector::DenseMatrix &Y1, NOX::Abstract::MultiVector &Y2, NOX::Abstract::MultiVector::DenseMatrix &T, NOX::Abstract::MultiVector::DenseMatrix &R) |
Compute QR factorization as described above. More... | |
void | applyCompactWY (const NOX::Abstract::MultiVector::DenseMatrix &Y1, const NOX::Abstract::MultiVector &Y2, const NOX::Abstract::MultiVector::DenseMatrix &T, NOX::Abstract::MultiVector::DenseMatrix &X1, NOX::Abstract::MultiVector &X2, bool isZeroX1, bool isZeroX2, bool useTranspose) const |
Applies the operator Q as described above overwriting x and y . If either of x or y are zero on input, set the corresponding isZeroX or isZeroY flags. Set\ useTranspose to true to instead apply the transpose of Q. | |
void | applyCompactWY (const NOX::Abstract::MultiVector::DenseMatrix &Y1, const NOX::Abstract::MultiVector &Y2, const NOX::Abstract::MultiVector::DenseMatrix &T, const NOX::Abstract::MultiVector::DenseMatrix *input1, const NOX::Abstract::MultiVector *input2, NOX::Abstract::MultiVector::DenseMatrix &result1, NOX::Abstract::MultiVector &result2, bool useTranspose) const |
Another version of applyCompactWY() that does not overwrite its inputs. If either input is zero, set the corresponding pointer to NULL. | |
Protected Member Functions | |
void | computeHouseholderVector (int col, const NOX::Abstract::MultiVector::DenseMatrix &A1, const NOX::Abstract::MultiVector &A2, NOX::Abstract::MultiVector::DenseMatrix &V1, NOX::Abstract::MultiVector &V2, double &beta) |
Computes the Householder vector V1 , V2 for column col of A1 and A2 , starting at row col of A1. More... | |
void | applyHouseholderVector (const NOX::Abstract::MultiVector::DenseMatrix &V1, const NOX::Abstract::MultiVector &V2, double beta, NOX::Abstract::MultiVector::DenseMatrix &A1, NOX::Abstract::MultiVector &A2) |
Applies the Householder vector V1 , V2 to the matrix sub-block represented by A1 and A2. | |
Protected Attributes | |
Teuchos::RCP< LOCA::GlobalData > | globalData |
Global data object. | |
Teuchos::BLAS< int, double > | dblas |
BLAS Wrappers. | |
A convenience class to compute the QR factorization of a an extended multi-vector.
This class computes the QR factorization
where is an matrix, is an matrix, is an matrix, is an matrix, and represents either the identity operation or the transpose. The matrix is represented by a NOX::Abstract::MultiVector::DenseMatrix while is a NOX::Abstract::MultiVector. Given and , this class computes and with returned as NOX::Abstract::MultiVector::DenseMatrix. The operator is generated using the standard Householder QR algorithm (Algorithm 5.2.1, G. Golub and C. Van Loan, "Matrix Computations," 3rd Edition, Johns Hopkins, Baltimore, 1996) and is stored using the compact WY representation: (see R. Schreiver and C. Van Loan, "A Storage-Efficient WY Represntation for Products of Householder Transformations," SIAM J. Sci. Stat. Comput., Vol. 10, No. 1, pp. 53-57, January 1989).
LOCA::BorderedSolver::HouseholderQR::HouseholderQR | ( | const Teuchos::RCP< LOCA::GlobalData > & | global_data | ) |
Constructor.
global_data | [in] Global data object |
|
protected |
Computes the Householder vector V1
, V2
for column col
of A1
and A2
, starting at row col
of A1.
The algorithm implemented here is essentially algorithm 5.1.1 of Golub and Van Loan.
References Teuchos::SerialDenseMatrix< OrdinalType, ScalarType >::numRows(), and NOX::Abstract::MultiVector::scale().
void LOCA::BorderedSolver::HouseholderQR::computeQR | ( | const NOX::Abstract::MultiVector::DenseMatrix & | C, |
const NOX::Abstract::MultiVector & | B, | ||
bool | use_c_transpose, | ||
NOX::Abstract::MultiVector::DenseMatrix & | Y1, | ||
NOX::Abstract::MultiVector & | Y2, | ||
NOX::Abstract::MultiVector::DenseMatrix & | T, | ||
NOX::Abstract::MultiVector::DenseMatrix & | R | ||
) |
Compute QR factorization as described above.
Set use_c_transpose
to true if the transpose of is required.
References Teuchos::SerialDenseMatrix< OrdinalType, ScalarType >::assign(), NOX::Abstract::MultiVector::clone(), Teuchos::SerialDenseMatrix< OrdinalType, ScalarType >::multiply(), NOX::Abstract::MultiVector::multiply(), Teuchos::NO_TRANS, Teuchos::NON_UNIT_DIAG, NOX::Abstract::MultiVector::numVectors(), Teuchos::SerialDenseMatrix< OrdinalType, ScalarType >::putScalar(), Teuchos::rcp(), NOX::Abstract::MultiVector::subView(), Teuchos::TRANS, Teuchos::UPPER_TRI, Teuchos::SerialDenseMatrix< OrdinalType, ScalarType >::values(), and Teuchos::View.