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

Anasazi operator for computing generalized eigenvalues using shift-invert. More...

#include <LOCA_AnasaziOperator_ShiftInvert2Matrix.H>

Inheritance diagram for LOCA::AnasaziOperator::ShiftInvert2Matrix:
Inheritance graph
[legend]
Collaboration diagram for LOCA::AnasaziOperator::ShiftInvert2Matrix:
Collaboration graph
[legend]

Public Member Functions

 ShiftInvert2Matrix (const Teuchos::RCP< LOCA::GlobalData > &global_data, const Teuchos::RCP< LOCA::Parameter::SublistParser > &topParams, const Teuchos::RCP< Teuchos::ParameterList > &eigenParams, const Teuchos::RCP< Teuchos::ParameterList > &solverParams, const Teuchos::RCP< LOCA::TimeDependent::AbstractGroup > &grp)
 Constructor. More...
 
virtual ~ShiftInvert2Matrix ()
 Destructor.
 
virtual const std::string & label () const
 Return name of this operator.
 
virtual void apply (const NOX::Abstract::MultiVector &input, NOX::Abstract::MultiVector &output) const
 Apply the operator. More...
 
virtual void beginPostProcessing ()
 Begin PostProcessing of eigenvalues. More...
 
virtual void transformEigenvalue (double &ev_r, double &ev_i) const
 Transform eigenvalue. More...
 
virtual
NOX::Abstract::Group::ReturnType 
rayleighQuotient (NOX::Abstract::Vector &evec_r, NOX::Abstract::Vector &evec_i, double &rq_r, double &rq_i) const
 Compute Rayleigh quotient. More...
 
- Public Member Functions inherited from LOCA::AnasaziOperator::AbstractStrategy
 AbstractStrategy ()
 Constructor.
 
virtual ~AbstractStrategy ()
 Destructor.
 
virtual void preProcessSeedVector (NOX::Abstract::MultiVector &)
 Give strategy an opportunit to massage the random seed vector.
 

Protected Attributes

Teuchos::RCP< LOCA::GlobalDataglobalData
 Global data.
 
std::string myLabel
 Name of this operator.
 
Teuchos::RCP
< Teuchos::ParameterList
eigenParams
 Stores parameters relating to the operator.
 
Teuchos::RCP
< Teuchos::ParameterList
solverParams
 Stores linear solver parameters.
 
Teuchos::RCP
< LOCA::TimeDependent::AbstractGroup
grp
 Stores group representing Jacobian and Mass matrix.
 
Teuchos::RCP
< NOX::Abstract::MultiVector
tmp_r
 Stores a temporary vector for computing Rayleigh quotients.
 
Teuchos::RCP
< NOX::Abstract::MultiVector
tmp_i
 Stores a temporary vector for computing Rayleigh quotients.
 
double shift
 Stores shift value.
 

Detailed Description

Anasazi operator for computing generalized eigenvalues using shift-invert.

This class implements the LOCA::AnasaziOperator::AbstractStrategy interface for computing generalized eigenvalues $\lambda$ and eigenvectors $z$ of the system

\[ J z = \lambda M z *\]

where $J$ is the Jacobian matrix and $M$ is the mass matrix. The right-most eigenvalues are computed using shift-invert, i.e. solving

\[ (J - \omega M) z = \lambda M z \]

where $\omega$ is a real scalar. The resulting eigenvalue is $\lambda + \omega$.

The parameters used by this class supplied in the constructor are:

Also the grp argument to the constructor must be a child of LOCA::TimeDependent::AbstractGroup for the shift-invert operations.

Constructor & Destructor Documentation

LOCA::AnasaziOperator::ShiftInvert2Matrix::ShiftInvert2Matrix ( const Teuchos::RCP< LOCA::GlobalData > &  global_data,
const Teuchos::RCP< LOCA::Parameter::SublistParser > &  topParams,
const Teuchos::RCP< Teuchos::ParameterList > &  eigenParams,
const Teuchos::RCP< Teuchos::ParameterList > &  solverParams,
const Teuchos::RCP< LOCA::TimeDependent::AbstractGroup > &  grp 
)

Member Function Documentation

void LOCA::AnasaziOperator::ShiftInvert2Matrix::apply ( const NOX::Abstract::MultiVector input,
NOX::Abstract::MultiVector output 
) const
virtual

Apply the operator.

Applies the inverse of the shifted operator, i.e., solves

\[ (J-\omega I)z = M r \]

for $z$, where $r = \mbox{input}$ and $z = \mbox{output}$.

Implements LOCA::AnasaziOperator::AbstractStrategy.

References NOX::Abstract::MultiVector::clone(), NOX::Abstract::MultiVector::numVectors(), NOX::Abstract::Group::Ok, and NOX::ShapeCopy.

void LOCA::AnasaziOperator::ShiftInvert2Matrix::beginPostProcessing ( )
virtual

Begin PostProcessing of eigenvalues.

Compute Jacobian and mass matrix once, for use in subsequent repeated calls to rayleighQuotient

Reimplemented from LOCA::AnasaziOperator::AbstractStrategy.

NOX::Abstract::Group::ReturnType LOCA::AnasaziOperator::ShiftInvert2Matrix::rayleighQuotient ( NOX::Abstract::Vector evec_r,
NOX::Abstract::Vector evec_i,
double &  rq_r,
double &  rq_i 
) const
virtual
void LOCA::AnasaziOperator::ShiftInvert2Matrix::transformEigenvalue ( double &  ev_r,
double &  ev_i 
) const
virtual

Transform eigenvalue.

Transforms the given eigenvalue to the eigenvalue of the Jacobian-mass matrix system by shifting and inverting it.

Implements LOCA::AnasaziOperator::AbstractStrategy.


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