Thyra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members
Thyra::AddedLinearOpBase< Scalar > Class Template Referenceabstract

Interface class for implicitly added linear operators. More...

#include <Thyra_AddedLinearOpBase.hpp>

Inheritance diagram for Thyra::AddedLinearOpBase< Scalar >:
Inheritance graph
[legend]

Pure virtual functions that must be overridden by subclasses

virtual int numOps () const =0
 Returns the number of constituent operators. More...
 
virtual bool opIsConst (const int k) const =0
 Determine if the kth constituent operator is const-only or not. More...
 
virtual Teuchos::RCP
< LinearOpBase< Scalar > > 
getNonconstOp (const int k)=0
 Return the kth non-constant constituent operator. More...
 
virtual Teuchos::RCP< const
LinearOpBase< Scalar > > 
getOp (const int k) const =0
 Return the kth constant constituent operator. More...
 

Additional Inherited Members

- Public Member Functions inherited from Thyra::LinearOpBase< Scalar >
virtual RCP< const
VectorSpaceBase< Scalar > > 
range () const =0
 Return a smart pointer for the range space for this operator. More...
 
virtual RCP< const
VectorSpaceBase< Scalar > > 
domain () const =0
 Return a smart pointer for the domain space for this operator. More...
 
bool opSupported (EOpTransp M_trans) const
 Return if the M_trans operation of apply() is supported or not. More...
 
void apply (const EOpTransp M_trans, const MultiVectorBase< Scalar > &X, const Ptr< MultiVectorBase< Scalar > > &Y, const Scalar alpha, const Scalar beta) const
 Apply the linear operator to a multi-vector : Y = alpha*op(M)*X + beta*Y. More...
 
virtual RCP< const
LinearOpBase< Scalar > > 
clone () const
 Clone the linear operator object (if supported). More...
 
- Protected Member Functions inherited from Thyra::LinearOpBase< Scalar >
virtual bool opSupportedImpl (EOpTransp M_trans) const =0
 Override in subclass. More...
 
virtual void applyImpl (const EOpTransp M_trans, const MultiVectorBase< Scalar > &X, const Ptr< MultiVectorBase< Scalar > > &Y, const Scalar alpha, const Scalar beta) const =0
 Override in subclass. More...
 

Detailed Description

template<class Scalar>
class Thyra::AddedLinearOpBase< Scalar >

Interface class for implicitly added linear operators.

This interface represents a added linear operator M of the form:

M = Op[0] + Op[1] + ... + Op[numOps-1]

where Op[] is an array of numOps LinearOpBase objects. Of course the operator M is not constructed explicitly but instead just applies the constituent linear operators accordingly using temporaries.

In other words, subclasses define apply() as:

y = alpha*M*x + beta*y
  = alpha * ( Op[0] * x + Op[1] * x + ...  + Op[numOps-1] * x ) + beta * y

Definition at line 41 of file Thyra_AddedLinearOpBase.hpp.

Member Function Documentation

template<class Scalar>
virtual int Thyra::AddedLinearOpBase< Scalar >::numOps ( ) const
pure virtual

Returns the number of constituent operators.

A return value of 0 indicates that this is not fully initialized.

Implemented in Thyra::DefaultAddedLinearOp< Scalar >.

template<class Scalar>
virtual bool Thyra::AddedLinearOpBase< Scalar >::opIsConst ( const int  k) const
pure virtual

Determine if the kth constituent operator is const-only or not.

Parameters
k[in] The zero-based index of the constituent operator to return.

Preconditions:

Implemented in Thyra::DefaultAddedLinearOp< Scalar >.

template<class Scalar>
virtual Teuchos::RCP<LinearOpBase<Scalar> > Thyra::AddedLinearOpBase< Scalar >::getNonconstOp ( const int  k)
pure virtual

Return the kth non-constant constituent operator.

Parameters
k[in] The zero-based index of the constituent operator to return.

Preconditions:

  • 0 <= k < this->numOps()
  • this->opIsConst(k)==false

Implemented in Thyra::DefaultAddedLinearOp< Scalar >.

template<class Scalar>
virtual Teuchos::RCP<const LinearOpBase<Scalar> > Thyra::AddedLinearOpBase< Scalar >::getOp ( const int  k) const
pure virtual

Return the kth constant constituent operator.

Parameters
k[in] The zero-based index of the constituent operator to return.

Preconditions:

Implemented in Thyra::DefaultAddedLinearOp< Scalar >.


The documentation for this class was generated from the following file: