Anasazi::ModalSolverUtils< ScalarType, MV, OP > Class Template Reference

Anasazi's templated, static class providing utilities for the modal solvers. More...

#include <AnasaziModalSolverUtils.hpp>

List of all members.

Public Member Functions

Constructor/Destructor
 ModalSolverUtils (const Teuchos::RefCountPtr< OutputManager< ScalarType > > &om)
 Basic constructor.
virtual ~ModalSolverUtils ()
 Destructor.
Sorting Methods
int sortScalars (int n, ScalarType *y, int *perm=0) const
 Sort the vector of eigenvalues y, optionally returning the permutation vector perm.
int sortScalars_Vectors (int n, ScalarType *lambda, MV *Q, std::vector< MagnitudeType > *resids=0) const
 Sort the vector of eigenvalues lambda, and optionally the corresponding multi-vector Q and residual vector resids.
void permuteVectors (const int n, const std::vector< int > &perm, MV &Q, std::vector< MagnitudeType > *resids=0) const
 Permute the vectors in a multivector according to the permutation vector perm, and optionally the residual vector resids.
void permuteVectors (const std::vector< int > &perm, Teuchos::SerialDenseMatrix< int, ScalarType > &Q) const
 Permute the columns of a Teuchos::SerialDenseMatrix according to the permutation vector perm.
Eigensolver Projection Methods
int massOrthonormalize (MV &X, MV &MX, const OP *M, const MV &Q, int howMany, int orthoType=0, ScalarType kappa=1.5625) const
 Mass orthogonalize X with-respect-to the orthogonalization parameter orthoType.
int directSolver (int size, const Teuchos::SerialDenseMatrix< int, ScalarType > &KK, const Teuchos::SerialDenseMatrix< int, ScalarType > *MM, Teuchos::SerialDenseMatrix< int, ScalarType > *EV, std::vector< MagnitudeType > *theta, int *nev, int esType=0) const
 Routine for computing the first NEV generalized eigenpairs of the symmetric pencil (KK, MM).
Sanity Checking Methods
MagnitudeType errorOrthogonality (const MV *X, const MV *R, const OP *M=0) const
 Return the maximum value of $R_i^T M X_j / || MR_i || || X_j ||$.
MagnitudeType errorOrthonormality (const MV *X, const OP *M=0) const
 Return the maximum coefficient of the matrix $X^T M X - I$.
MagnitudeType errorEquality (const MV *X, const MV *MX, const OP *M=0) const
 Return the maximum coefficient of the matrix $M * X - MX$ scaled by the maximum coefficient of MX.


Detailed Description

template<class ScalarType, class MV, class OP>
class Anasazi::ModalSolverUtils< ScalarType, MV, OP >

Anasazi's templated, static class providing utilities for the modal solvers.

This class provides concrete, templated implementations of utilities necessary for the modal solvers (Davidson, LOBPCG, ...). These utilities include sorting, orthogonalization, projecting/solving local eigensystems, and sanity checking. These are internal utilties, so the user should not alter this class.

Author:
Ulrich Hetmaniuk, Rich Lehoucq, and Heidi Thornquist

Definition at line 61 of file AnasaziModalSolverUtils.hpp.


Constructor & Destructor Documentation

template<class ScalarType, class MV, class OP>
Anasazi::ModalSolverUtils< ScalarType, MV, OP >::ModalSolverUtils const Teuchos::RefCountPtr< OutputManager< ScalarType > > &  om  ) 
 

Basic constructor.

Parameters:
om [in] OutputManager to handle output from the utilities.

Definition at line 201 of file AnasaziModalSolverUtils.hpp.

template<class ScalarType, class MV, class OP>
virtual Anasazi::ModalSolverUtils< ScalarType, MV, OP >::~ModalSolverUtils  )  [inline, virtual]
 

Destructor.

Definition at line 76 of file AnasaziModalSolverUtils.hpp.


Member Function Documentation

template<class ScalarType, class MV, class OP>
int Anasazi::ModalSolverUtils< ScalarType, MV, OP >::sortScalars int  n,
ScalarType *  y,
int *  perm = 0
const
 

Sort the vector of eigenvalues y, optionally returning the permutation vector perm.

Definition at line 212 of file AnasaziModalSolverUtils.hpp.

template<class ScalarType, class MV, class OP>
int Anasazi::ModalSolverUtils< ScalarType, MV, OP >::sortScalars_Vectors int  n,
ScalarType *  lambda,
MV *  Q,
std::vector< MagnitudeType > *  resids = 0
const
 

Sort the vector of eigenvalues lambda, and optionally the corresponding multi-vector Q and residual vector resids.

Definition at line 263 of file AnasaziModalSolverUtils.hpp.

template<class ScalarType, class MV, class OP>
void Anasazi::ModalSolverUtils< ScalarType, MV, OP >::permuteVectors const int  n,
const std::vector< int > &  perm,
MV &  Q,
std::vector< MagnitudeType > *  resids = 0
const
 

Permute the vectors in a multivector according to the permutation vector perm, and optionally the residual vector resids.

Definition at line 338 of file AnasaziModalSolverUtils.hpp.

template<class ScalarType, class MV, class OP>
void Anasazi::ModalSolverUtils< ScalarType, MV, OP >::permuteVectors const std::vector< int > &  perm,
Teuchos::SerialDenseMatrix< int, ScalarType > &  Q
const
 

Permute the columns of a Teuchos::SerialDenseMatrix according to the permutation vector perm.

Definition at line 402 of file AnasaziModalSolverUtils.hpp.

template<class ScalarType, class MV, class OP>
int Anasazi::ModalSolverUtils< ScalarType, MV, OP >::massOrthonormalize MV &  X,
MV &  MX,
const OP *  M,
const MV &  Q,
int  howMany,
int  orthoType = 0,
ScalarType  kappa = 1.5625
const
 

Mass orthogonalize X with-respect-to the orthogonalization parameter orthoType.

Parameters:
X [in/out] Multi-vector being orthogonalized/orthonormalized.
MX [in/out] Image of the multi-vector X by the mass matrix M, not referenced if MX==0.
M [in] Pointer to the mass matrix, not referenced if M==0.
Q [in] Vectors to orthogonalize against, not referenced if orthoType == 2.
howMany [in] Number of vectors X to orthogonalize.
orthoType [in] Orthogonalization type
  • orthoType = 0 (default) > Performs both operations
  • orthoType = 1 > Performs $Q^TMX = 0$
  • orthoType = 2 > Performs $X^TMX = I$
kappa [in] Coefficient determining when to perform a second Gram-Schmidt step Default value = 1.5625 = (1.25)^2 (as suggested in Parlett's book)
Returns:
Integer info on the status of the computation
  • info = 0 >> Success
  • info > 0 >> Indicate how many vectors have been tried to avoid rank deficiency for X
  • info =-1 >> Failure: X has zero columns, #col of X > #rows of X, #col of [Q X] > #rows of X, or no good random vectors could be found

Definition at line 428 of file AnasaziModalSolverUtils.hpp.

template<class ScalarType, class MV, class OP>
int Anasazi::ModalSolverUtils< ScalarType, MV, OP >::directSolver int  size,
const Teuchos::SerialDenseMatrix< int, ScalarType > &  KK,
const Teuchos::SerialDenseMatrix< int, ScalarType > *  MM,
Teuchos::SerialDenseMatrix< int, ScalarType > *  EV,
std::vector< MagnitudeType > *  theta,
int *  nev,
int  esType = 0
const
 

Routine for computing the first NEV generalized eigenpairs of the symmetric pencil (KK, MM).

Parameters:
size [in] Dimension of the eigenproblem (KK, MM)
KK [in] Symmetric "stiffness" matrix
MM [in] Symmetric Positive "mass" matrix
EV [in] Dense matrix to store the nev eigenvectors
theta [in] Array to store the eigenvalues (Size = nev )
nev [in/out] Number of the smallest eigenvalues requested (in) / computed (out)
esType [in] Flag to select the algorithm
  • esType = 0 (default) Uses LAPACK routine (Cholesky factorization of MM) with deflation of MM to get orthonormality of eigenvectors ($S^TMMS = I$)
  • esType = 1 Uses LAPACK routine (Cholesky factorization of MM) (no check of orthonormality)
  • esType = 10 Uses LAPACK routine for simple eigenproblem on KK (MM is not referenced in this case)
Note:
The code accesses only the upper triangular part of KK and MM.
Returns:
Integer info on the status of the computation Return the integer info on the status of the computation
  • info = 0 >> Success
  • info = - 20 >> Failure in LAPACK routine

Definition at line 724 of file AnasaziModalSolverUtils.hpp.

template<class ScalarType, class MV, class OP>
Teuchos::ScalarTraits< ScalarType >::magnitudeType Anasazi::ModalSolverUtils< ScalarType, MV, OP >::errorOrthogonality const MV *  X,
const MV *  R,
const OP *  M = 0
const
 

Return the maximum value of $R_i^T M X_j / || MR_i || || X_j ||$.

Note:
When M is not specified, the identity is used.

Definition at line 979 of file AnasaziModalSolverUtils.hpp.

template<class ScalarType, class MV, class OP>
Teuchos::ScalarTraits< ScalarType >::magnitudeType Anasazi::ModalSolverUtils< ScalarType, MV, OP >::errorOrthonormality const MV *  X,
const OP *  M = 0
const
 

Return the maximum coefficient of the matrix $X^T M X - I$.

Note:
When M is not specified, the identity is used.

Definition at line 1021 of file AnasaziModalSolverUtils.hpp.

template<class ScalarType, class MV, class OP>
Teuchos::ScalarTraits< ScalarType >::magnitudeType Anasazi::ModalSolverUtils< ScalarType, MV, OP >::errorEquality const MV *  X,
const MV *  MX,
const OP *  M = 0
const
 

Return the maximum coefficient of the matrix $M * X - MX$ scaled by the maximum coefficient of MX.

Note:
When M is not specified, the identity is used.

Definition at line 1067 of file AnasaziModalSolverUtils.hpp.


The documentation for this class was generated from the following file:
Generated on Thu Sep 18 12:31:39 2008 for Anasazi by doxygen 1.3.9.1