#include <LOCA_AnasaziOperator_Cayley.H>
Public Member Functions | |
Cayley (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 | ~Cayley () |
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 | preProcessSeedVector (NOX::Abstract::MultiVector &ivec) |
PreProcess the random seed vector. | |
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::GlobalData > | globalData |
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 | sigma |
Stores Cayley pole ![]() | |
double | mu |
Stores Cayley zero ![]() |
This class implements the LOCA::AnasaziOperator::AbstractStrategy interface for computing generalized eigenvalues and eigenvectors
of the system
where is the Jacobian matrix and
is the mass matrix. The eigenvalues are computed using a Cayley transformation, i.e. solving
where is the Cayley pole and
is the Cayley zero.
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 91 of file LOCA_AnasaziOperator_Cayley.H.
LOCA::AnasaziOperator::Cayley::Cayley | ( | 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_Cayley.C.
References eigenParams, mu, and sigma.
LOCA::AnasaziOperator::Cayley::~Cayley | ( | ) | [virtual] |
const string & LOCA::AnasaziOperator::Cayley::label | ( | ) | const [virtual] |
Return name of this operator.
Implements LOCA::AnasaziOperator::AbstractStrategy.
Definition at line 72 of file LOCA_AnasaziOperator_Cayley.C.
References myLabel.
void LOCA::AnasaziOperator::Cayley::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
for , where
and
.
Implements LOCA::AnasaziOperator::AbstractStrategy.
Definition at line 78 of file LOCA_AnasaziOperator_Cayley.C.
References NOX::Abstract::MultiVector::clone(), globalData, grp, mu, NOX::Abstract::MultiVector::numVectors(), NOX::Abstract::Group::Ok, NOX::ShapeCopy, sigma, solverParams, and tmp_r.
void LOCA::AnasaziOperator::Cayley::preProcessSeedVector | ( | NOX::Abstract::MultiVector & | ivec | ) | [virtual] |
PreProcess the random seed vector.
Performs one backward Euler iteration on the random initial seed vector, to satisfy contraints
Reimplemented from LOCA::AnasaziOperator::AbstractStrategy.
Definition at line 123 of file LOCA_AnasaziOperator_Cayley.C.
References NOX::Abstract::MultiVector::clone(), globalData, grp, NOX::Abstract::MultiVector::numVectors(), NOX::Abstract::Group::Ok, NOX::ShapeCopy, sigma, solverParams, and tmp_r.
void LOCA::AnasaziOperator::Cayley::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 168 of file LOCA_AnasaziOperator_Cayley.C.
NOX::Abstract::Group::ReturnType LOCA::AnasaziOperator::Cayley::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 for the eigenvector
.
Implements LOCA::AnasaziOperator::AbstractStrategy.
Definition at line 178 of file LOCA_AnasaziOperator_Cayley.C.
References NOX::Abstract::Vector::createMultiVector(), globalData, grp, NOX::Abstract::Vector::innerProduct(), NOX::Abstract::Group::Ok, NOX::ShapeCopy, tmp_i, and tmp_r.
Teuchos::RCP<LOCA::GlobalData> LOCA::AnasaziOperator::Cayley::globalData [protected] |
Global data.
Definition at line 160 of file LOCA_AnasaziOperator_Cayley.H.
Referenced by apply(), preProcessSeedVector(), and rayleighQuotient().
string LOCA::AnasaziOperator::Cayley::myLabel [protected] |
Name of this operator.
Definition at line 163 of file LOCA_AnasaziOperator_Cayley.H.
Referenced by label().
Teuchos::RCP<Teuchos::ParameterList> LOCA::AnasaziOperator::Cayley::eigenParams [protected] |
Stores parameters relating to the operator.
Definition at line 166 of file LOCA_AnasaziOperator_Cayley.H.
Referenced by Cayley().
Teuchos::RCP<Teuchos::ParameterList> LOCA::AnasaziOperator::Cayley::solverParams [protected] |
Stores linear solver parameters.
Definition at line 169 of file LOCA_AnasaziOperator_Cayley.H.
Referenced by apply(), and preProcessSeedVector().
Teuchos::RCP<LOCA::TimeDependent::AbstractGroup> LOCA::AnasaziOperator::Cayley::grp [protected] |
Stores group representing Jacobian and Mass matrix.
Definition at line 172 of file LOCA_AnasaziOperator_Cayley.H.
Referenced by apply(), preProcessSeedVector(), and rayleighQuotient().
Teuchos::RCP<NOX::Abstract::MultiVector> LOCA::AnasaziOperator::Cayley::tmp_r [mutable, protected] |
Stores a temporary vector for computing Rayleigh quotients.
Definition at line 175 of file LOCA_AnasaziOperator_Cayley.H.
Referenced by apply(), preProcessSeedVector(), and rayleighQuotient().
Teuchos::RCP<NOX::Abstract::MultiVector> LOCA::AnasaziOperator::Cayley::tmp_i [mutable, protected] |
Stores a temporary vector for computing Rayleigh quotients.
Definition at line 178 of file LOCA_AnasaziOperator_Cayley.H.
Referenced by rayleighQuotient().
double LOCA::AnasaziOperator::Cayley::sigma [protected] |
Stores Cayley pole .
Definition at line 181 of file LOCA_AnasaziOperator_Cayley.H.
Referenced by apply(), Cayley(), preProcessSeedVector(), and transformEigenvalue().
double LOCA::AnasaziOperator::Cayley::mu [protected] |
Stores Cayley zero .
Definition at line 184 of file LOCA_AnasaziOperator_Cayley.H.
Referenced by apply(), Cayley(), and transformEigenvalue().