Stratimikos Version of the Day
Public Member Functions | Static Public Member Functions
Thyra::TsqrAdaptor< Scalar > Class Template Reference

Stub adaptor from Thyra::MultiVectorBase to TSQR. More...

#include <Thyra_TsqrAdaptor.hpp>

List of all members.

Public Member Functions

 TsqrAdaptor (const MV &mv, const Teuchos::RCP< const Teuchos::ParameterList > &plist)
 Constructor.
void factorExplicit (MV &A, MV &Q, dense_matrix_type &R)
 Compute QR factorization [Q,R] = qr(A,0)
int revealRank (MV &Q, dense_matrix_type &R, const magnitude_type &tol)
 Rank-revealing decomposition.

Static Public Member Functions

static Teuchos::RCP< const
Teuchos::ParameterList
getDefaultParameters ()
 Default parameters.

Detailed Description

template<class Scalar>
class Thyra::TsqrAdaptor< Scalar >

Stub adaptor from Thyra::MultiVectorBase to TSQR.

TSQR (Tall Skinny QR factorization) is an orthogonalization kernel that is as accurate as Householder QR, yet requires only $2 \log P$ messages between $P$ MPI processes, independently of the number of columns in the multivector.

TSQR works independently of the particular multivector implementation, and interfaces to the latter via an adaptor class. Thyra::TsqrAdaptor is the adaptor class for Thyra::MultiVectorBase. It templates on the MultiVector (MV) type so that it can pick up that class' typedefs. In particular, TSQR chooses its intranode implementation based on the Kokkos Node type of the multivector.

Warning:
This is a stub adaptor that just placates the compiler and does nothing.

Definition at line 65 of file Thyra_TsqrAdaptor.hpp.


Constructor & Destructor Documentation

template<class Scalar >
Thyra::TsqrAdaptor< Scalar >::TsqrAdaptor ( const MV mv,
const Teuchos::RCP< const Teuchos::ParameterList > &  plist 
) [inline]

Constructor.

Parameters:
mv[in] Multivector object, used only to access the underlying communicator object (in this case, Teuchos::Comm<int>, accessed via the Tpetra::Map belonging to the multivector). All multivector objects with which this Adaptor works must use the same map and communicator.
plist[in] List of parameters for configuring TSQR. The specific parameter keys that are read depend on the TSQR implementation. "cacheBlockSize" (cache block size per core, in bytes) tends to be defined for all of the non-GPU implementations. For details, check the specific NodeTsqrFactory implementation.

Definition at line 104 of file Thyra_TsqrAdaptor.hpp.


Member Function Documentation

template<class Scalar >
static Teuchos::RCP<const Teuchos::ParameterList> Thyra::TsqrAdaptor< Scalar >::getDefaultParameters ( ) [inline, static]

Default parameters.

Return default parameters for the TSQR variant used by Epetra.

Warning:
This method may not be reentrant. It should only be called by one thread at a time. We do not protect it from calls by more than one thread at a time.
This method is a stub for now.

Definition at line 85 of file Thyra_TsqrAdaptor.hpp.

template<class Scalar >
void Thyra::TsqrAdaptor< Scalar >::factorExplicit ( MV A,
MV Q,
dense_matrix_type R 
) [inline]

Compute QR factorization [Q,R] = qr(A,0)

Definition at line 113 of file Thyra_TsqrAdaptor.hpp.

template<class Scalar >
int Thyra::TsqrAdaptor< Scalar >::revealRank ( MV Q,
dense_matrix_type R,
const magnitude_type &  tol 
) [inline]

Rank-revealing decomposition.

Using the R factor and explicit Q factor from factorExplicit(), compute the singular value decomposition (SVD) of R ( $R = U \Sigma V^*$). If R is full rank (with respect to the given relative tolerance tol), don't change Q or R. Otherwise, compute $Q := Q \cdot U$ and $R := \Sigma V^*$ in place (the latter may be no longer upper triangular).

Parameters:
Q[in/out] On input: explicit Q factor computed by factorExplicit(). (Must be an orthogonal resp. unitary matrix.) On output: If R is of full numerical rank with respect to the tolerance tol, Q is unmodified. Otherwise, Q is updated so that the first rank columns of Q are a basis for the column space of A (the original matrix whose QR factorization was computed by factorExplicit()). The remaining columns of Q are a basis for the null space of A.
R[in/out] On input: ncols by ncols upper triangular matrix with leading dimension ldr >= ncols. On output: if input is full rank, R is unchanged on output. Otherwise, if $R = U \Sigma V^*$ is the SVD of R, on output R is overwritten with $ V^*$. This is also an ncols by ncols matrix, but may not necessarily be upper triangular.
tol[in] Relative tolerance for computing the numerical rank of the matrix R.
Returns:
Rank $r$ of R: $ 0 \leq r \leq ncols$.

Definition at line 152 of file Thyra_TsqrAdaptor.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends