Thyra::EpetraOperatorWrapper Class Reference

Implements the Epetra_Operator interface with a Thyra LinearOperator. This enables the use of absrtact Thyra operators in AztecOO as preconditioners and operators, without being rendered into concrete Epetra matrices. More...

#include <Thyra_EpetraOperatorWrapper.hpp>

Inheritance diagram for Thyra::EpetraOperatorWrapper:

[legend]
List of all members.

Public Member Functions

 EpetraOperatorWrapper (const ConstLinearOperator< double > &thyraOp)
virtual ~EpetraOperatorWrapper ()
int SetUseTranspose (bool UseTranspose)
 If set true, transpose of this operator will be applied.
int Apply (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
 Returns the result of a Epetra_Operator applied to a Epetra_MultiVector X in Y.
int ApplyInverse (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
 Returns the result of a Epetra_Operator inverse applied to an Epetra_MultiVector X in Y.
double NormInf () const
 Returns the infinity norm of the global matrix.
const char * Label () const
 Returns a character string describing the operator.
bool UseTranspose () const
 Returns the current UseTranspose setting.
bool HasNormInf () const
 Returns true if the this object can provide an approximate Inf-norm, false otherwise.
const Epetra_CommComm () const
 Returns a pointer to the Epetra_Comm communicator associated with this operator.
const Epetra_MapOperatorDomainMap () const
 Returns the Epetra_Map object associated with the domain of this operator.
const Epetra_MapOperatorRangeMap () const
 Returns the Epetra_Map object associated with the range of this operator.
void copyEpetraIntoThyra (const Epetra_MultiVector &x, Vector< double > thyraVec) const
void copyThyraIntoEpetra (const ConstVector< double > &thyraVec, Epetra_MultiVector &v) const

Private Member Functions

RefCountPtr< Epetra_MapthyraVSToEpetraMap (const VectorSpace< double > &vs, const RefCountPtr< Epetra_Comm > &comm) const
RefCountPtr< Epetra_CommgetEpetraComm (const ConstLinearOperator< double > &thyraOp) const

Private Attributes

bool useTranspose_
ConstLinearOperator< double > thyraOp_
VectorSpace< double > domain_
VectorSpace< double > range_
RefCountPtr< Epetra_Commcomm_
RefCountPtr< Epetra_MapdomainMap_
RefCountPtr< Epetra_MaprangeMap_
std::string label_

Detailed Description

Implements the Epetra_Operator interface with a Thyra LinearOperator. This enables the use of absrtact Thyra operators in AztecOO as preconditioners and operators, without being rendered into concrete Epetra matrices.

Definition at line 61 of file Thyra_EpetraOperatorWrapper.hpp.


Constructor & Destructor Documentation

EpetraOperatorWrapper::EpetraOperatorWrapper const ConstLinearOperator< double > &  thyraOp  ) 
 

Definition at line 46 of file Thyra_EpetraOperatorWrapper.cpp.

virtual Thyra::EpetraOperatorWrapper::~EpetraOperatorWrapper  )  [inline, virtual]
 

Definition at line 68 of file Thyra_EpetraOperatorWrapper.hpp.


Member Function Documentation

int Thyra::EpetraOperatorWrapper::SetUseTranspose bool  UseTranspose  )  [inline, virtual]
 

If set true, transpose of this operator will be applied.

This flag allows the transpose of the given operator to be used implicitly. Setting this flag affects only the Apply() and ApplyInverse() methods. If the implementation of this interface does not support transpose use, this method should return a value of -1.

Parameters:
In UseTranspose -If true, multiply by the transpose of operator, otherwise just use operator.
Returns:
Integer error code, set to 0 if successful. Set to -1 if this implementation does not support transpose.

Implements Epetra_Operator.

Definition at line 71 of file Thyra_EpetraOperatorWrapper.hpp.

int EpetraOperatorWrapper::Apply const Epetra_MultiVector X,
Epetra_MultiVector Y
const [virtual]
 

Returns the result of a Epetra_Operator applied to a Epetra_MultiVector X in Y.

Parameters:
In X - A Epetra_MultiVector of dimension NumVectors to multiply with matrix.
Out Y -A Epetra_MultiVector of dimension NumVectors containing result.
Returns:
Integer error code, set to 0 if successful.

Implements Epetra_Operator.

Definition at line 226 of file Thyra_EpetraOperatorWrapper.cpp.

int EpetraOperatorWrapper::ApplyInverse const Epetra_MultiVector X,
Epetra_MultiVector Y
const [virtual]
 

Returns the result of a Epetra_Operator inverse applied to an Epetra_MultiVector X in Y.

Parameters:
In X - A Epetra_MultiVector of dimension NumVectors to solve for.
Out Y -A Epetra_MultiVector of dimension NumVectors containing result.
Returns:
Integer error code, set to 0 if successful.
Warning:
In order to work with AztecOO, any implementation of this method must support the case where X and Y are the same object.

Implements Epetra_Operator.

Definition at line 274 of file Thyra_EpetraOperatorWrapper.cpp.

double EpetraOperatorWrapper::NormInf  )  const [virtual]
 

Returns the infinity norm of the global matrix.

Implements Epetra_Operator.

Definition at line 57 of file Thyra_EpetraOperatorWrapper.cpp.

const char* Thyra::EpetraOperatorWrapper::Label  )  const [inline, virtual]
 

Returns a character string describing the operator.

Implements Epetra_Operator.

Definition at line 83 of file Thyra_EpetraOperatorWrapper.hpp.

bool Thyra::EpetraOperatorWrapper::UseTranspose  )  const [inline, virtual]
 

Returns the current UseTranspose setting.

Implements Epetra_Operator.

Definition at line 86 of file Thyra_EpetraOperatorWrapper.hpp.

bool Thyra::EpetraOperatorWrapper::HasNormInf  )  const [inline, virtual]
 

Returns true if the this object can provide an approximate Inf-norm, false otherwise.

Implements Epetra_Operator.

Definition at line 89 of file Thyra_EpetraOperatorWrapper.hpp.

const Epetra_Comm& Thyra::EpetraOperatorWrapper::Comm  )  const [inline, virtual]
 

Returns a pointer to the Epetra_Comm communicator associated with this operator.

Implements Epetra_Operator.

Definition at line 92 of file Thyra_EpetraOperatorWrapper.hpp.

const Epetra_Map& Thyra::EpetraOperatorWrapper::OperatorDomainMap  )  const [inline, virtual]
 

Returns the Epetra_Map object associated with the domain of this operator.

Implements Epetra_Operator.

Definition at line 95 of file Thyra_EpetraOperatorWrapper.hpp.

const Epetra_Map& Thyra::EpetraOperatorWrapper::OperatorRangeMap  )  const [inline, virtual]
 

Returns the Epetra_Map object associated with the range of this operator.

Implements Epetra_Operator.

Definition at line 98 of file Thyra_EpetraOperatorWrapper.hpp.

void EpetraOperatorWrapper::copyEpetraIntoThyra const Epetra_MultiVector x,
Vector< double >  thyraVec
const
 

get a non-const pointer to the data in the thyra vector

Definition at line 111 of file Thyra_EpetraOperatorWrapper.cpp.

void EpetraOperatorWrapper::copyThyraIntoEpetra const ConstVector< double > &  thyraVec,
Epetra_MultiVector v
const
 

get a const pointer to the data in the thyra vector

Definition at line 167 of file Thyra_EpetraOperatorWrapper.cpp.

RefCountPtr< Epetra_Map > EpetraOperatorWrapper::thyraVSToEpetraMap const VectorSpace< double > &  vs,
const RefCountPtr< Epetra_Comm > &  comm
const [private]
 

Definition at line 66 of file Thyra_EpetraOperatorWrapper.cpp.

RefCountPtr< Epetra_Comm > EpetraOperatorWrapper::getEpetraComm const ConstLinearOperator< double > &  thyraOp  )  const [private]
 

Definition at line 283 of file Thyra_EpetraOperatorWrapper.cpp.


Member Data Documentation

bool Thyra::EpetraOperatorWrapper::useTranspose_ [private]
 

Definition at line 118 of file Thyra_EpetraOperatorWrapper.hpp.

ConstLinearOperator<double> Thyra::EpetraOperatorWrapper::thyraOp_ [private]
 

Definition at line 119 of file Thyra_EpetraOperatorWrapper.hpp.

VectorSpace<double> Thyra::EpetraOperatorWrapper::domain_ [private]
 

Definition at line 120 of file Thyra_EpetraOperatorWrapper.hpp.

VectorSpace<double> Thyra::EpetraOperatorWrapper::range_ [private]
 

Definition at line 121 of file Thyra_EpetraOperatorWrapper.hpp.

RefCountPtr<Epetra_Comm> Thyra::EpetraOperatorWrapper::comm_ [private]
 

Definition at line 122 of file Thyra_EpetraOperatorWrapper.hpp.

RefCountPtr<Epetra_Map> Thyra::EpetraOperatorWrapper::domainMap_ [private]
 

Definition at line 123 of file Thyra_EpetraOperatorWrapper.hpp.

RefCountPtr<Epetra_Map> Thyra::EpetraOperatorWrapper::rangeMap_ [private]
 

Definition at line 124 of file Thyra_EpetraOperatorWrapper.hpp.

std::string Thyra::EpetraOperatorWrapper::label_ [private]
 

Definition at line 126 of file Thyra_EpetraOperatorWrapper.hpp.


The documentation for this class was generated from the following files:
Generated on Thu Sep 18 12:38:08 2008 for Epetra Package Browser (Single Doxygen Collection) by doxygen 1.3.9.1