Belos Version of the Day
Belos::Operator< ScalarType > Class Template Reference

Alternative run-time polymorphic interface for operators. More...

#include <BelosOperator.hpp>

List of all members.

Public Member Functions

 Operator ()
 Default constructor (does nothing).
virtual ~Operator ()
 Virtual destructor, for memory safety of derived classes.
Operator application method
virtual void Apply (const MultiVec< ScalarType > &x, MultiVec< ScalarType > &y, ETrans trans=NOTRANS) const =0
 Apply the operator to x, putting the result in y.

Detailed Description

template<class ScalarType>
class Belos::Operator< ScalarType >

Alternative run-time polymorphic interface for operators.

Michael Heroux and Heidi Thornquist

Belos' linear solvers are templated on the scalar (Scalar), multivector (MV), and operator (OP) types. The term "operator" includes the matrix A in the linear system $AX = B$, any left or right preconditioners, and any left or right scaling operators. If you have enabled the right packages, you can use Belos' solvers directly with OP = Epetra_Operator, Tpetra::Operator, or Thyra::LinearOpBase. Alternately, you may wish to use some other object as an operator. If so, you can make that object inherit from Belos::Operator<Scalar>, and make its corresponding multivector objects inherit from Belos::MultiVec<Scalar>. Belos' solvers may also be instantiated with MV = Belos::MultiVec<Scalar> and OP = Belos::Operator<Scalar>.

A concrete implementation of this class is necessary. Users may create their own implementation if the supplied implementations are not suitable for their needs.

Definition at line 80 of file BelosOperator.hpp.

Constructor & Destructor Documentation

template<class ScalarType>
Belos::Operator< ScalarType >::Operator ( ) [inline]

Default constructor (does nothing).

Definition at line 87 of file BelosOperator.hpp.

template<class ScalarType>
virtual Belos::Operator< ScalarType >::~Operator ( ) [inline, virtual]

Virtual destructor, for memory safety of derived classes.

Definition at line 90 of file BelosOperator.hpp.

Member Function Documentation

template<class ScalarType>
virtual void Belos::Operator< ScalarType >::Apply ( const MultiVec< ScalarType > &  x,
MultiVec< ScalarType > &  y,
ETrans  trans = NOTRANS 
) const [pure virtual]

Apply the operator to x, putting the result in y.

This routine takes the Belos::MultiVec x and applies the operator (or its transpose or Hermitian transpose) to it, writing the result into the Belos::MultiVec y.

It is expected that any problem with applying this operator to x will be indicated by an std::exception being thrown.

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