#include <LOCA_AnasaziOperator_AbstractStrategy.H>
Public Member Functions | |
AbstractStrategy () | |
Constructor. | |
virtual | ~AbstractStrategy () |
Destructor. | |
virtual const string & | label () const =0 |
Return name of this operator. | |
virtual void | apply (const NOX::Abstract::MultiVector &input, NOX::Abstract::MultiVector &output) const =0 |
Apply the operator to input with the result in output . | |
virtual void | preProcessSeedVector (NOX::Abstract::MultiVector &ivec) |
Give strategy an opportunit to massage the random seed vector. | |
virtual void | transformEigenvalue (double &ev_r, double &ev_i) const =0 |
Transform eigenvalue in place. | |
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 =0 |
Compute Rayleigh quotient. | |
Private Member Functions | |
AbstractStrategy (const AbstractStrategy &) | |
Private to prohibit copying. | |
AbstractStrategy & | operator= (const AbstractStrategy &) |
Private to prohibit copying. |
AbstractStrategy defines an abstract interface for anasazi operators. It is used by LOCA::Eigensolver::AnasaziStrategy to compute different kinds of eigenvalues of the steady-state solution after each continuation step.
The interface currently defines several pure virtual methods, apply(), to apply the operator, transformEigenvalues() to transform the computed eigenvalues back to eigenvalues of untransformed state, rayleighQuotient to compute the rayleighQuotient for the operator, and label() to return the name of the operator. Derived classes should implement these method for a particular operator. Constructors for derived classes should be of the form:
class Derived : public AbstractStrategy { public: Derived( 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<NOX::Abstract::Group>& grp); ... };
where global_data
is the LOCA global data object, topParams
is the parsed top-level parameter list, eigenParams
is a parameter list of eigensolver parameters, solverParams
is a parameter list of linear solver parameters, and grp
is the group representing the Jacobian and mass matrices.
This class and its children follow the Strategy pattern as defined in Erich Gamma, et al. "Design Patterns: Elements of Reusable Object-Oriented Software." Addison Wesley, Boston, MA, 1995.
Definition at line 90 of file LOCA_AnasaziOperator_AbstractStrategy.H.
LOCA::AnasaziOperator::AbstractStrategy::AbstractStrategy | ( | ) | [inline] |
virtual LOCA::AnasaziOperator::AbstractStrategy::~AbstractStrategy | ( | ) | [inline, virtual] |
LOCA::AnasaziOperator::AbstractStrategy::AbstractStrategy | ( | const AbstractStrategy & | ) | [private] |
Private to prohibit copying.
virtual const string& LOCA::AnasaziOperator::AbstractStrategy::label | ( | ) | const [pure virtual] |
Return name of this operator.
Implemented in LOCA::AnasaziOperator::Cayley, LOCA::AnasaziOperator::JacobianInverse, LOCA::AnasaziOperator::ShiftInvert, and LOCA::Epetra::AnasaziOperator::Floquet.
virtual void LOCA::AnasaziOperator::AbstractStrategy::apply | ( | const NOX::Abstract::MultiVector & | input, | |
NOX::Abstract::MultiVector & | output | |||
) | const [pure virtual] |
Apply the operator to input
with the result in output
.
Implemented in LOCA::AnasaziOperator::Cayley, LOCA::AnasaziOperator::JacobianInverse, LOCA::AnasaziOperator::ShiftInvert, and LOCA::Epetra::AnasaziOperator::Floquet.
Referenced by Anasazi::OperatorTraits< double, NOX::Abstract::MultiVector, LOCA::AnasaziOperator::AbstractStrategy >::Apply().
virtual void LOCA::AnasaziOperator::AbstractStrategy::preProcessSeedVector | ( | NOX::Abstract::MultiVector & | ivec | ) | [inline, virtual] |
Give strategy an opportunit to massage the random seed vector.
Reimplemented in LOCA::AnasaziOperator::Cayley.
Definition at line 116 of file LOCA_AnasaziOperator_AbstractStrategy.H.
virtual void LOCA::AnasaziOperator::AbstractStrategy::transformEigenvalue | ( | double & | ev_r, | |
double & | ev_i | |||
) | const [pure virtual] |
Transform eigenvalue in place.
Implemented in LOCA::AnasaziOperator::Cayley, LOCA::AnasaziOperator::JacobianInverse, LOCA::AnasaziOperator::ShiftInvert, and LOCA::Epetra::AnasaziOperator::Floquet.
virtual NOX::Abstract::Group::ReturnType LOCA::AnasaziOperator::AbstractStrategy::rayleighQuotient | ( | const NOX::Abstract::Vector & | evec_r, | |
const NOX::Abstract::Vector & | evec_i, | |||
double & | rq_r, | |||
double & | rq_i | |||
) | const [pure virtual] |
Compute Rayleigh quotient.
Implemented in LOCA::AnasaziOperator::Cayley, LOCA::AnasaziOperator::JacobianInverse, LOCA::AnasaziOperator::ShiftInvert, and LOCA::Epetra::AnasaziOperator::Floquet.
AbstractStrategy& LOCA::AnasaziOperator::AbstractStrategy::operator= | ( | const AbstractStrategy & | ) | [private] |
Private to prohibit copying.