Thyra::EpetraLinearOp Class Reference
[Epetra to Thyra Operator/Vector Adapter Code]

Concrete LinearOpBase adapter subclass for Epetra_Operator object. More...

#include <Thyra_EpetraLinearOp.hpp>

Inheritance diagram for Thyra::EpetraLinearOp:

[legend]
List of all members.

Public types

typedef RTOp_value_type Scalar
 

Constructors / initializers / accessors

 EpetraLinearOp ()
 Construct to uninitialized.
 EpetraLinearOp (const Teuchos::RefCountPtr< Epetra_Operator > &op, ETransp opTrans=NOTRANS, EApplyEpetraOpAs applyAs=EPETRA_OP_APPLY_APPLY, EAdjointEpetraOp adjointSupport=EPETRA_OP_ADJOINT_SUPPORTED, const Teuchos::RefCountPtr< const MPIVectorSpaceBase< Scalar > > &mpiRange=Teuchos::null, const Teuchos::RefCountPtr< const MPIVectorSpaceBase< Scalar > > &mpiDomain=Teuchos::null)
 Calls initialize().
void initialize (const Teuchos::RefCountPtr< Epetra_Operator > &op, ETransp opTrans=NOTRANS, EApplyEpetraOpAs applyAs=EPETRA_OP_APPLY_APPLY, EAdjointEpetraOp adjointSupport=EPETRA_OP_ADJOINT_SUPPORTED, const Teuchos::RefCountPtr< const MPIVectorSpaceBase< Scalar > > &mpiRange=Teuchos::null, const Teuchos::RefCountPtr< const MPIVectorSpaceBase< Scalar > > &mpiDomain=Teuchos::null)
 Initialize.
void uninitialize (Teuchos::RefCountPtr< Epetra_Operator > *op=NULL, ETransp *opTrans=NULL, EApplyEpetraOpAs *applyAs=NULL, EAdjointEpetraOp *adjointSupport=NULL, Teuchos::RefCountPtr< const MPIVectorSpaceBase< Scalar > > *mpiRange=NULL, Teuchos::RefCountPtr< const MPIVectorSpaceBase< Scalar > > *mpiDomain=NULL)
 Set to uninitialized and optionally return the current state.
Teuchos::RefCountPtr< const
MPIVectorSpaceBase< Scalar > > 
mpiRange () const
 Return a smart pointer to the MPIVectorSpaceBase object for the range.
Teuchos::RefCountPtr< const
MPIVectorSpaceBase< Scalar > > 
mpiDomain () const
 Return a smart pointer to the MPIVectorSpaceBase object for the domain.
Teuchos::RefCountPtr< Epetra_Operatorepetra_op ()
 
Teuchos::RefCountPtr< const
Epetra_Operator
epetra_op () const
 

Overridden from EpetraLinearOpBase

void getEpetraOpView (Teuchos::RefCountPtr< Epetra_Operator > *epetraOp, ETransp *epetraOpTransp, EApplyEpetraOpAs *epetraOpApplyAs, EAdjointEpetraOp *epetraOpAdjointSupport)
 
void getEpetraOpView (Teuchos::RefCountPtr< const Epetra_Operator > *epetraOp, ETransp *epetraOpTransp, EApplyEpetraOpAs *epetraOpApplyAs, EAdjointEpetraOp *epetraOpAdjointSupport) const
 

Overridden from SingleScalarLinearOpBase

bool opSupported (ETransp M_trans) const
 

Overridden from EuclideanLinearOpBase

Teuchos::RefCountPtr< const
ScalarProdVectorSpaceBase<
Scalar > > 
rangeScalarProdVecSpc () const
 Returns this->mpiRange().
Teuchos::RefCountPtr< const
ScalarProdVectorSpaceBase<
Scalar > > 
domainScalarProdVecSpc () const
 Returns this->mpiDomain().
void euclideanApply (const ETransp M_trans, const MultiVectorBase< Scalar > &X, MultiVectorBase< Scalar > *Y, const Scalar alpha, const Scalar beta) const
 

Overridden from LinearOpBase

Teuchos::RefCountPtr< const
LinearOpBase< Scalar > > 
clone () const
 

Allocators for domain and range spaces

virtual Teuchos::RefCountPtr<
const MPIVectorSpaceBase<
Scalar > > 
allocateDomain (const Teuchos::RefCountPtr< Epetra_Operator > &op, ETransp op_trans) const
 Allocate the domain space of the operator.
virtual Teuchos::RefCountPtr<
const MPIVectorSpaceBase<
Scalar > > 
allocateRange (const Teuchos::RefCountPtr< Epetra_Operator > &op, ETransp op_trans) const
 Allocate the range space of the operator.

Detailed Description

Concrete LinearOpBase adapter subclass for Epetra_Operator object.

This subclass can be used to represent the non-transposed operator or transposed operator defined by an Epetra_Operator object. This class can implement apply() using either Epetra_Operator::Apply() or Epetra_Operator::ApplyInverse(). In addition, the user can specify whether adjoints are supported or not.

Examples:

createTridiagEpetraLinearOp.cpp, and test_epetra_adapters.cpp.

Definition at line 49 of file Thyra_EpetraLinearOp.hpp.


Member Typedef Documentation

typedef RTOp_value_type Thyra::EpetraLinearOp::Scalar
 

Definition at line 59 of file Thyra_EpetraLinearOp.hpp.


Constructor & Destructor Documentation

Thyra::EpetraLinearOp::EpetraLinearOp  ) 
 

Construct to uninitialized.

See the postconditions for uninitialize()

Definition at line 43 of file Thyra_EpetraLinearOp.cpp.

Thyra::EpetraLinearOp::EpetraLinearOp const Teuchos::RefCountPtr< Epetra_Operator > &  op,
ETransp  opTrans = NOTRANS,
EApplyEpetraOpAs  applyAs = EPETRA_OP_APPLY_APPLY,
EAdjointEpetraOp  adjointSupport = EPETRA_OP_ADJOINT_SUPPORTED,
const Teuchos::RefCountPtr< const MPIVectorSpaceBase< Scalar > > &  mpiRange = Teuchos::null,
const Teuchos::RefCountPtr< const MPIVectorSpaceBase< Scalar > > &  mpiDomain = Teuchos::null
 

Calls initialize().

Definition at line 46 of file Thyra_EpetraLinearOp.cpp.


Member Function Documentation

void Thyra::EpetraLinearOp::initialize const Teuchos::RefCountPtr< Epetra_Operator > &  op,
ETransp  opTrans = NOTRANS,
EApplyEpetraOpAs  applyAs = EPETRA_OP_APPLY_APPLY,
EAdjointEpetraOp  adjointSupport = EPETRA_OP_ADJOINT_SUPPORTED,
const Teuchos::RefCountPtr< const MPIVectorSpaceBase< Scalar > > &  mpiRange = Teuchos::null,
const Teuchos::RefCountPtr< const MPIVectorSpaceBase< Scalar > > &  mpiDomain = Teuchos::null
 

Initialize.

Parameters:
op [in] The Epetra_Operator this *this will wrap.
opTrans [in] If opTrans==NOTRANS then op will be viewed as op and if opTrans==TRANS then op will be viewed as its transpose op' for the behavior of apply().
applyAs [in] If applyAs==APPLY_APPLY then op->Apply() will be used and if applyAs==APPLY_APPLY_INVERSE then op->ApplyInverse() is used instead.
adjointSupport [in] Determines if it is to be assumed that adjoints are supported on the underlying Epetra_Operator object op. If adjointSupport==EPETRA_OP_ADJOINT_SUPPORTED then this->opSupported(TRANS) will return true. If adjointSupport==EPETRA_OP_ADJOINT_UNSUPPORTED then this->opSupported(TRANS) will return false.
mpiRange [in] Smart pointer to the range space for the Epetra_Operator. The default value is Teuchos::null in which case *this will allocate a new MPIVectorSpace given range map from op. A client may only bother to specify this space if one wants to override the defintion of the scalar product.
mpiDomain [in] Smart pointer to the domain space for the Epetra_Operator. The default value is Teuchos::null in which case *this will allocate a new MPIVectorSpaceStd given map from op. A client may only bother to specify this space if one wants to override the defintion of the scalar product.
Preconditions:
  • op.get() != NULL (throw std::invalid_argument)

Postconditions:

  • [mpiRange.get() != NULL] this->mpiRange().get() == mpiRange.get()
  • [mpiDomain.get() != NULL] this->mpiDomain().get() == mpiDomain.get()
  • [mpiRange.get() == NULL] this->mpiRange().get() != NULL
  • [mpiDomain.get() == NULL] this->mpiDomain().get() != NULL
  • this->opSupported(NOTRANS) == true
  • this->opSupported(TRNAS) == adjointSupport==EPETRA_OP_ADJOINT_SUPPORTED

Definition at line 58 of file Thyra_EpetraLinearOp.cpp.

void Thyra::EpetraLinearOp::uninitialize Teuchos::RefCountPtr< Epetra_Operator > *  op = NULL,
ETransp opTrans = NULL,
EApplyEpetraOpAs applyAs = NULL,
EAdjointEpetraOp adjointSupport = NULL,
Teuchos::RefCountPtr< const MPIVectorSpaceBase< Scalar > > *  mpiRange = NULL,
Teuchos::RefCountPtr< const MPIVectorSpaceBase< Scalar > > *  mpiDomain = NULL
 

Set to uninitialized and optionally return the current state.

Postconditions:

Definition at line 79 of file Thyra_EpetraLinearOp.cpp.

Teuchos::RefCountPtr< const MPIVectorSpaceBase< EpetraLinearOp::Scalar > > Thyra::EpetraLinearOp::mpiRange  )  const
 

Return a smart pointer to the MPIVectorSpaceBase object for the range.

Postconditions:

  • [this->range().get() != NULL] return.get() != NULL
  • [this->range().get() == NULL] return.get() == NULL

Definition at line 106 of file Thyra_EpetraLinearOp.cpp.

Teuchos::RefCountPtr< const MPIVectorSpaceBase< EpetraLinearOp::Scalar > > Thyra::EpetraLinearOp::mpiDomain  )  const
 

Return a smart pointer to the MPIVectorSpaceBase object for the domain.

Postconditions:

  • [this->domain().get() != NULL] return.get() != NULL
  • [this->domain().get() == NULL] return.get() == NULL

Definition at line 112 of file Thyra_EpetraLinearOp.cpp.

Teuchos::RefCountPtr< Epetra_Operator > Thyra::EpetraLinearOp::epetra_op  ) 
 

Definition at line 118 of file Thyra_EpetraLinearOp.cpp.

Teuchos::RefCountPtr< const Epetra_Operator > Thyra::EpetraLinearOp::epetra_op  )  const
 

Definition at line 124 of file Thyra_EpetraLinearOp.cpp.

void Thyra::EpetraLinearOp::getEpetraOpView Teuchos::RefCountPtr< Epetra_Operator > *  epetraOp,
ETransp epetraOpTransp,
EApplyEpetraOpAs epetraOpApplyAs,
EAdjointEpetraOp epetraOpAdjointSupport
[virtual]
 

Implements Thyra::EpetraLinearOpBase.

Definition at line 131 of file Thyra_EpetraLinearOp.cpp.

void Thyra::EpetraLinearOp::getEpetraOpView Teuchos::RefCountPtr< const Epetra_Operator > *  epetraOp,
ETransp epetraOpTransp,
EApplyEpetraOpAs epetraOpApplyAs,
EAdjointEpetraOp epetraOpAdjointSupport
const [virtual]
 

Implements Thyra::EpetraLinearOpBase.

Definition at line 150 of file Thyra_EpetraLinearOp.cpp.

bool Thyra::EpetraLinearOp::opSupported ETransp  M_trans  )  const [virtual]
 

Implements Thyra::SingleScalarEuclideanLinearOpBase< RTOp_value_type >.

Definition at line 171 of file Thyra_EpetraLinearOp.cpp.

Teuchos::RefCountPtr< const ScalarProdVectorSpaceBase< EpetraLinearOp::Scalar > > Thyra::EpetraLinearOp::rangeScalarProdVecSpc  )  const [virtual]
 

Returns this->mpiRange().

Implements Thyra::EuclideanLinearOpBase< RTOp_value_type >.

Definition at line 179 of file Thyra_EpetraLinearOp.cpp.

Teuchos::RefCountPtr< const ScalarProdVectorSpaceBase< EpetraLinearOp::Scalar > > Thyra::EpetraLinearOp::domainScalarProdVecSpc  )  const [virtual]
 

Returns this->mpiDomain().

Implements Thyra::EuclideanLinearOpBase< RTOp_value_type >.

Definition at line 185 of file Thyra_EpetraLinearOp.cpp.

void Thyra::EpetraLinearOp::euclideanApply const ETransp  M_trans,
const MultiVectorBase< Scalar > &  X,
MultiVectorBase< Scalar > *  Y,
const Scalar  alpha,
const Scalar  beta
const
 

Definition at line 190 of file Thyra_EpetraLinearOp.cpp.

Teuchos::RefCountPtr< const LinearOpBase< EpetraLinearOp::Scalar > > Thyra::EpetraLinearOp::clone  )  const
 

Definition at line 280 of file Thyra_EpetraLinearOp.cpp.

Teuchos::RefCountPtr< const MPIVectorSpaceBase< EpetraLinearOp::Scalar > > Thyra::EpetraLinearOp::allocateDomain const Teuchos::RefCountPtr< Epetra_Operator > &  op,
ETransp  op_trans
const [protected, virtual]
 

Allocate the domain space of the operator.

Purpose: In TSFExtended, both EpetraLinearOp and EpetraVectorSpace are extended from the Thyra versions by inheritance, and the TSFExtended operator subclasses expect to work with an extended vector space subclass. Thus, it is necessary for the base operator class to never directly allocate vector space objects, and allocation is delegated to a virtual allocator function.

Definition at line 292 of file Thyra_EpetraLinearOp.cpp.

Teuchos::RefCountPtr< const MPIVectorSpaceBase< EpetraLinearOp::Scalar > > Thyra::EpetraLinearOp::allocateRange const Teuchos::RefCountPtr< Epetra_Operator > &  op,
ETransp  op_trans
const [protected, virtual]
 

Allocate the range space of the operator.

Purpose: In TSFExtended, both EpetraLinearOp and EpetraVectorSpace are extended from the Thyra versions by inheritance, and the TSFExtended operator subclasses expect to work with an extended vector space subclass. Thus, it is necessary for the base operator class to never directly allocate vector space objects, and allocation is delegated to a virtual allocator function.

Definition at line 302 of file Thyra_EpetraLinearOp.cpp.


The documentation for this class was generated from the following files:
Generated on Thu Sep 18 12:40:21 2008 for Epetra to Thyra Adapter Software by doxygen 1.3.9.1