NOX  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
LOCA::BorderedSolver::HouseholderQR Class Reference

A convenience class to compute the QR factorization of a an extended multi-vector. More...

#include <LOCA_BorderedSolver_HouseholderQR.H>

Collaboration diagram for LOCA::BorderedSolver::HouseholderQR:
Collaboration graph
[legend]

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::GlobalDataglobalData
 Global data object.
 
Teuchos::BLAS< int, double > dblas
 BLAS Wrappers.
 

Detailed Description

A convenience class to compute the QR factorization of a an extended multi-vector.

This class computes the QR factorization

\[ Q^T \begin{bmatrix} op(C) \\ B \end{bmatrix} = \begin{bmatrix} R \\ 0 \end{bmatrix} \]

where $C$ is an $m\times m$ matrix, $B$ is an $n\times m$ matrix, $Q$ is an $n+m\times n+m$ matrix, $R$ is an $m\times m$ matrix, and $op()$ represents either the identity operation or the transpose. The matrix $C$ is represented by a NOX::Abstract::MultiVector::DenseMatrix while $B$ is a NOX::Abstract::MultiVector. Given $B$ and $C$, this class computes $Q$ and $R$ with $R$ returned as NOX::Abstract::MultiVector::DenseMatrix. The operator $Q$ 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: $Q = I + Y^T T Y$ (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).

Constructor & Destructor Documentation

LOCA::BorderedSolver::HouseholderQR::HouseholderQR ( const Teuchos::RCP< LOCA::GlobalData > &  global_data)

Constructor.

Parameters
global_data[in] Global data object

Member Function Documentation

void LOCA::BorderedSolver::HouseholderQR::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 
)
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 
)

The documentation for this class was generated from the following files: