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>

List of all members.

Public Member Functions

 HouseholderQR (const Teuchos::RCP< LOCA::GlobalData > &global_data)
 Constructor.
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.
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.
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.

Private Member Functions

 HouseholderQR (const HouseholderQR &)
 Private to prohibit copying.
HouseholderQRoperator= (const HouseholderQR &)
 Private to prohibit copying.


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).

Definition at line 92 of file LOCA_BorderedSolver_HouseholderQR.H.


Constructor & Destructor Documentation

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

Constructor.

Parameters:
global_data [in] Global data object

Definition at line 46 of file LOCA_BorderedSolver_HouseholderQR.C.

LOCA::BorderedSolver::HouseholderQR::~HouseholderQR (  )  [virtual]

Destructor.

Definition at line 53 of file LOCA_BorderedSolver_HouseholderQR.C.

LOCA::BorderedSolver::HouseholderQR::HouseholderQR ( const HouseholderQR  )  [private]

Private to prohibit copying.


Member Function Documentation

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 
)

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

Definition at line 230 of file LOCA_BorderedSolver_HouseholderQR.C.

References dblas, NOX::Abstract::MultiVector::init(), NOX::Abstract::MultiVector::multiply(), NOX::Abstract::MultiVector::numVectors(), and NOX::Abstract::MultiVector::update().

Referenced by applyCompactWY(), LOCA::BorderedSolver::EpetraHouseholder::solve(), and LOCA::BorderedSolver::EpetraHouseholder::solveTranspose().

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

Definition at line 287 of file LOCA_BorderedSolver_HouseholderQR.C.

References applyCompactWY().

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.

Definition at line 169 of file LOCA_BorderedSolver_HouseholderQR.C.

References NOX::Abstract::MultiVector::scale().

Referenced by computeQR().

void LOCA::BorderedSolver::HouseholderQR::applyHouseholderVector ( const NOX::Abstract::MultiVector::DenseMatrix V1,
const NOX::Abstract::MultiVector V2,
double  beta,
NOX::Abstract::MultiVector::DenseMatrix A1,
NOX::Abstract::MultiVector A2 
) [protected]

Applies the Householder vector V1, V2 to the matrix sub-block represented by A1 and A2.

Definition at line 206 of file LOCA_BorderedSolver_HouseholderQR.C.

References NOX::Abstract::MultiVector::multiply(), NOX::Abstract::MultiVector::numVectors(), and NOX::Abstract::MultiVector::update().

Referenced by computeQR().

HouseholderQR& LOCA::BorderedSolver::HouseholderQR::operator= ( const HouseholderQR  )  [private]

Private to prohibit copying.


Member Data Documentation

Global data object.

Definition at line 187 of file LOCA_BorderedSolver_HouseholderQR.H.

Teuchos::BLAS<int,double> LOCA::BorderedSolver::HouseholderQR::dblas [protected]

BLAS Wrappers.

Definition at line 190 of file LOCA_BorderedSolver_HouseholderQR.H.

Referenced by applyCompactWY(), and computeQR().


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

Generated on Wed Oct 21 14:28:28 2009 for Nonlinear Solver Project by  doxygen 1.5.9