Thyra Version of the Day
Thyra::EpetraOperatorViewExtractorBase Class Reference

Strategy interface for extracting an Epetra_Operator view out of a Thyra::LinearOpBase<double> object. More...

#include <Thyra_EpetraOperatorViewExtractorBase.hpp>

Inheritance diagram for Thyra::EpetraOperatorViewExtractorBase:
Inheritance graph
[legend]

List of all members.

Pure virtual functions that must be overridden in subclasses.

virtual bool isCompatible (const LinearOpBase< double > &fwdOp) const =0
 Check that a LinearOpBase object is compatible with *this factory object.
virtual void getNonconstEpetraOpView (const RCP< LinearOpBase< double > > &fwdOp, const Ptr< RCP< Epetra_Operator > > &epetraOp, const Ptr< EOpTransp > &epetraOpTransp, const Ptr< EApplyEpetraOpAs > &epetraOpApplyAs, const Ptr< EAdjointEpetraOp > &epetraOpAdjointSupport, const Ptr< double > &epetraOpScalar) const =0
 Gat a smart pointer to a non-const Epetra_Operator view of a Thyra::LinearOpBase object and how the object is applied to implement the forward linear operator.
virtual void getEpetraOpView (const RCP< const LinearOpBase< double > > &fwdOp, const Ptr< RCP< const Epetra_Operator > > &epetraOp, const Ptr< EOpTransp > &epetraOpTransp, const Ptr< EApplyEpetraOpAs > &epetraOpApplyAs, const Ptr< EAdjointEpetraOp > &epetraOpAdjointSupport, const Ptr< double > &epetraOpScalar) const =0
 Gat a smart pointer to a const Epetra_Operator view of a Thyra::LinearOpBase object and how the object is applied to implement the forward linear operator.

Detailed Description

Strategy interface for extracting an Epetra_Operator view out of a Thyra::LinearOpBase<double> object.

ToDo: Finish documentation!

Definition at line 45 of file Thyra_EpetraOperatorViewExtractorBase.hpp.


Member Function Documentation

virtual bool Thyra::EpetraOperatorViewExtractorBase::isCompatible ( const LinearOpBase< double > &  fwdOp) const [pure virtual]

Check that a LinearOpBase object is compatible with *this factory object.

Implemented in Thyra::EpetraOperatorViewExtractorStd.

virtual void Thyra::EpetraOperatorViewExtractorBase::getNonconstEpetraOpView ( const RCP< LinearOpBase< double > > &  fwdOp,
const Ptr< RCP< Epetra_Operator > > &  epetraOp,
const Ptr< EOpTransp > &  epetraOpTransp,
const Ptr< EApplyEpetraOpAs > &  epetraOpApplyAs,
const Ptr< EAdjointEpetraOp > &  epetraOpAdjointSupport,
const Ptr< double > &  epetraOpScalar 
) const [pure virtual]

Gat a smart pointer to a non-const Epetra_Operator view of a Thyra::LinearOpBase object and how the object is applied to implement the forward linear operator.

Parameters:
fwdOp[in] The forward linear operator that the view will be extracted from. This object may be a wrapped scaled/adjoint operator on input. On output this object is "remembered" in the returned RCP for epetraOp.
epetraOp[out] The non-const epetra operator view of *this.
epetraOpTransp[out] Determines if the operator is applied as its transpose or its non-transpose. The Client should use this value and ignore the value in (*epetraOp)->UseTranspose() since it has been shown to be problematic and error prone.
epetraOpApplyAs[out] Determines if the operator should be applied using (*epetraOp)->Apply(...) or using (*epetraOp)->ApplyInverse(...).
epetraOpAdjointSupport[out] Determines if the operator supports transposes or not.
epetraOpScalar[out] The scalar from the wrapped scaled/adjoint linear operator

Preconditions: epetraOp!=NULL epetraOpOpTransp!=NULL epetraOpApplyAs!=NULL epetraOpAdjointSupport!=NULL

Posconditions: epetraOp->get() != NULL fwdOp.count() is greater on output than on input and hense fwdOp is "remembered"

The object accessed from *epetraOp is only guaranteed to be valid while the returned Teuchos::RCP object exits. This allows for some very specialized implementations where a Epetra_Operator view of *this can be acquired and released according to the lifetime of the returned Teuchos::RCP object.

The Epetra_Operator object may be dynamic casted to more specialized interfaces and therefore modified. Then, when the last RCP object ancestor returned from this function goes away, then *this will be updated to relect the change.

Implemented in Thyra::EpetraOperatorViewExtractorStd.

virtual void Thyra::EpetraOperatorViewExtractorBase::getEpetraOpView ( const RCP< const LinearOpBase< double > > &  fwdOp,
const Ptr< RCP< const Epetra_Operator > > &  epetraOp,
const Ptr< EOpTransp > &  epetraOpTransp,
const Ptr< EApplyEpetraOpAs > &  epetraOpApplyAs,
const Ptr< EAdjointEpetraOp > &  epetraOpAdjointSupport,
const Ptr< double > &  epetraOpScalar 
) const [pure virtual]

Gat a smart pointer to a const Epetra_Operator view of a Thyra::LinearOpBase object and how the object is applied to implement the forward linear operator.

Parameters:
fwdOp[in] The forward linear operator that the view will be extracted from. This object may be a wrapped scaled/adjoint operator on input. On output this object is "remembered" in the returned RCP for epetraOp.
epetraOp[out] The const epetra operator view of *this.
epetraOpTransp[out] Determines if the operator is applied as its transpose or its non-transpose. The Client should use this value and ignore the value in (*epetraOp)->UseTranspose() since it has been shown to be problematic and error prone.
epetraOpApplyAs[out] Determines if the operator should be applied using (*epetraOp)->Apply(...) or using (*epetraOp)->ApplyInverse(...).
epetraOpAdjointSupport[out] Determines if the operator supports transposes or not.
epetraOpScalar[out] The scalar from the wrapped scaled/adjoint linear operator.

Preconditions: epetraOp!=NULL epetraOpOpTransp!=NULL epetraOpApplyAs!=NULL epetraOpAdjointSupport!=NULL

Posconditions: epetraOp->get() != NULL fwdOp.count() is greater on output than on input and hense fwdOp is "remembered"

The object accessed from *return is only guaranteed to be valid while the returned Teuchos::RCP object exits. This allows for some very specialized implementations where a Epetra_Operator view of *this can be acquired and released according to the lifetime of the returned Teuchos::RCP object.

Note that if the client tries to constant cast the returned object and modify it that this returned view is not guaranteed to update *this. If the goal is to modify *this then the client should call the non-const version of this function.

Implemented in Thyra::EpetraOperatorViewExtractorStd.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines