MyOperator< ScalarType > Class Template Reference

Simple example of a user's defined Belos::Operator class. More...

#include <MyOperator.hpp>

Inheritance diagram for MyOperator< ScalarType >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 MyOperator (const int NumRows)
 MyOperator (const int NumRows, std::vector< ScalarType > ldu)
 MyOperator (std::vector< ScalarType > diag)
 ~MyOperator ()
 Dtor.
void Apply (const Belos::MultiVec< ScalarType > &X, Belos::MultiVec< ScalarType > &Y, Belos::ETrans trans=Belos::NOTRANS) const
 Applies the tridiagonal or diagonal matrix to a multivector.

Private Attributes

int NumRows_
 Number of rows and columns.
ScalarType l_
 Elements on subdiagonal, diagonal, and superdiagonal.
ScalarType d_
ScalarType u_
std::vector< ScalarType > diag_
 Elements on diagonal (for variable-diagonal case).

Detailed Description

template<class ScalarType>
class MyOperator< ScalarType >

Simple example of a user's defined Belos::Operator class.

This is a simple, single processor example of user's defined Belos::Operator-derived class. The class is templated with ScalarType; possible choices are, for example, "float", "double", or "std::complex<double>".

This file can be easily extended to tackle more interesting cases.

Author:
Oscar Chinallato (ETHZ/ICOS) and Marzio Sala (ETHZ/COLAB)
Date:
Last modified on 01-Nov-05

Definition at line 22 of file MyOperator.hpp.


Constructor & Destructor Documentation

template<class ScalarType >
MyOperator< ScalarType >::MyOperator ( const int  NumRows  )  [inline]

Definition at line 31 of file MyOperator.hpp.

template<class ScalarType >
MyOperator< ScalarType >::MyOperator ( const int  NumRows,
std::vector< ScalarType >  ldu 
) [inline]

Definition at line 40 of file MyOperator.hpp.

template<class ScalarType >
MyOperator< ScalarType >::MyOperator ( std::vector< ScalarType >  diag  )  [inline]

Definition at line 49 of file MyOperator.hpp.

template<class ScalarType >
MyOperator< ScalarType >::~MyOperator (  )  [inline]

Dtor.

Definition at line 58 of file MyOperator.hpp.


Member Function Documentation

template<class ScalarType >
void MyOperator< ScalarType >::Apply ( const Belos::MultiVec< ScalarType > &  X,
Belos::MultiVec< ScalarType > &  Y,
Belos::ETrans  trans = Belos::NOTRANS 
) const [inline, virtual]

Applies the tridiagonal or diagonal matrix to a multivector.

Implements Belos::Operator< ScalarType >.

Definition at line 62 of file MyOperator.hpp.


Member Data Documentation

template<class ScalarType >
int MyOperator< ScalarType >::NumRows_ [private]

Number of rows and columns.

Definition at line 114 of file MyOperator.hpp.

template<class ScalarType >
ScalarType MyOperator< ScalarType >::l_ [private]

Elements on subdiagonal, diagonal, and superdiagonal.

Definition at line 116 of file MyOperator.hpp.

template<class ScalarType >
ScalarType MyOperator< ScalarType >::d_ [private]

Definition at line 116 of file MyOperator.hpp.

template<class ScalarType >
ScalarType MyOperator< ScalarType >::u_ [private]

Definition at line 116 of file MyOperator.hpp.

template<class ScalarType >
std::vector<ScalarType> MyOperator< ScalarType >::diag_ [private]

Elements on diagonal (for variable-diagonal case).

Definition at line 118 of file MyOperator.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Wed Apr 13 10:05:17 2011 for Belos Package Browser (Single Doxygen Collection) by  doxygen 1.6.3