LOCA::AnasaziOperator::ShiftInvert Class Reference

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

#include <LOCA_AnasaziOperator_ShiftInvert.H>

Inheritance diagram for LOCA::AnasaziOperator::ShiftInvert:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ShiftInvert (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.
virtual ~ShiftInvert ()
 Destructor.
virtual const string & label () const
 Return name of this operator.
virtual void apply (const NOX::Abstract::MultiVector &input, NOX::Abstract::MultiVector &output) const
 Apply the operator.
virtual void transformEigenvalue (double &ev_r, double &ev_i) const
 Transform eigenvalue.
virtual
NOX::Abstract::Group::ReturnType 
rayleighQuotient (const NOX::Abstract::Vector &evec_r, const NOX::Abstract::Vector &evec_i, double &rq_r, double &rq_i) const
 Compute Rayleigh quotient.

Protected Attributes

Teuchos::RCP< LOCA::GlobalDataglobalData
 Global data.
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.

Definition at line 90 of file LOCA_AnasaziOperator_ShiftInvert.H.


Constructor & Destructor Documentation

LOCA::AnasaziOperator::ShiftInvert::ShiftInvert ( 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.

Argument grp must be of type LOCA::TimeDependent::AbstractGroup. See class description for a list of eigenParams.

Definition at line 47 of file LOCA_AnasaziOperator_ShiftInvert.C.

References eigenParams, and shift.

LOCA::AnasaziOperator::ShiftInvert::~ShiftInvert (  )  [virtual]

Destructor.

Definition at line 65 of file LOCA_AnasaziOperator_ShiftInvert.C.


Member Function Documentation

const string & LOCA::AnasaziOperator::ShiftInvert::label (  )  const [virtual]

Return name of this operator.

Implements LOCA::AnasaziOperator::AbstractStrategy.

Definition at line 70 of file LOCA_AnasaziOperator_ShiftInvert.C.

References myLabel.

void LOCA::AnasaziOperator::ShiftInvert::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.

Definition at line 76 of file LOCA_AnasaziOperator_ShiftInvert.C.

References NOX::Abstract::MultiVector::clone(), globalData, grp, NOX::Abstract::MultiVector::numVectors(), NOX::Abstract::Group::Ok, NOX::ShapeCopy, shift, solverParams, and tmp_r.

void LOCA::AnasaziOperator::ShiftInvert::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.

Definition at line 121 of file LOCA_AnasaziOperator_ShiftInvert.C.

References shift.

NOX::Abstract::Group::ReturnType LOCA::AnasaziOperator::ShiftInvert::rayleighQuotient ( const NOX::Abstract::Vector evec_r,
const NOX::Abstract::Vector evec_i,
double &  rq_r,
double &  rq_i 
) const [virtual]

Compute Rayleigh quotient.

Computes the Rayleigh quotient $z^T J z / z^T M z$ for the eigenvector $z$.

Implements LOCA::AnasaziOperator::AbstractStrategy.

Definition at line 131 of file LOCA_AnasaziOperator_ShiftInvert.C.

References NOX::Abstract::Vector::createMultiVector(), globalData, grp, NOX::Abstract::Vector::innerProduct(), NOX::Abstract::Group::Ok, NOX::ShapeCopy, tmp_i, and tmp_r.


Member Data Documentation

Global data.

Definition at line 150 of file LOCA_AnasaziOperator_ShiftInvert.H.

Referenced by apply(), and rayleighQuotient().

Name of this operator.

Definition at line 153 of file LOCA_AnasaziOperator_ShiftInvert.H.

Referenced by label().

Teuchos::RCP<Teuchos::ParameterList> LOCA::AnasaziOperator::ShiftInvert::eigenParams [protected]

Stores parameters relating to the operator.

Definition at line 156 of file LOCA_AnasaziOperator_ShiftInvert.H.

Referenced by ShiftInvert().

Teuchos::RCP<Teuchos::ParameterList> LOCA::AnasaziOperator::ShiftInvert::solverParams [protected]

Stores linear solver parameters.

Definition at line 159 of file LOCA_AnasaziOperator_ShiftInvert.H.

Referenced by apply().

Stores group representing Jacobian and Mass matrix.

Definition at line 162 of file LOCA_AnasaziOperator_ShiftInvert.H.

Referenced by apply(), and rayleighQuotient().

Stores a temporary vector for computing Rayleigh quotients.

Definition at line 165 of file LOCA_AnasaziOperator_ShiftInvert.H.

Referenced by apply(), and rayleighQuotient().

Stores a temporary vector for computing Rayleigh quotients.

Definition at line 168 of file LOCA_AnasaziOperator_ShiftInvert.H.

Referenced by rayleighQuotient().

Stores shift value.

Definition at line 171 of file LOCA_AnasaziOperator_ShiftInvert.H.

Referenced by apply(), ShiftInvert(), and transformEigenvalue().


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