Belos Package Browser (Single Doxygen Collection) Development
Public Member Functions | Private Types | Private Attributes
MyBetterOperator< ScalarType > Class Template Reference

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

#include <MyBetterOperator.hpp>

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

List of all members.

Public Member Functions

 MyBetterOperator (const int nrows, const int *colptr, const int nnz, const int *rowin, const ScalarType *vals)
 Constructor.
 ~MyBetterOperator ()
 Deconstructor.
void Apply (const Belos::MultiVec< ScalarType > &X, Belos::MultiVec< ScalarType > &Y, Belos::ETrans trans=Belos::NOTRANS) const
 Applies the matrix to a multivector.
void Print (std::ostream &os)

Private Types

typedef std::vector
< ScalarType >::iterator 
STIter
typedef std::vector< int >
::iterator 
IntIter

Private Attributes

int _nr
 Number of rows and columns.
int _nnz
std::vector< int > _cptr
 Column pointers.
std::vector< int > _rind
 Row indices.
std::vector< ScalarType > _vals
 Values.

Detailed Description

template<class ScalarType>
class MyBetterOperator< 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 class is based on the MyOperator class written by Oscar Chinallato (ETHZ/ICOS) and Marzio Sala (ETHZ/COLAB)

Author:
Christopher Baker (FSU/SCS,SNL/CSRI)

Definition at line 66 of file MyBetterOperator.hpp.


Member Typedef Documentation

template<class ScalarType >
typedef std::vector<ScalarType>::iterator MyBetterOperator< ScalarType >::STIter [private]

Definition at line 134 of file MyBetterOperator.hpp.

template<class ScalarType >
typedef std::vector<int>::iterator MyBetterOperator< ScalarType >::IntIter [private]

Definition at line 135 of file MyBetterOperator.hpp.


Constructor & Destructor Documentation

template<class ScalarType >
MyBetterOperator< ScalarType >::MyBetterOperator ( const int  nrows,
const int *  colptr,
const int  nnz,
const int *  rowin,
const ScalarType *  vals 
) [inline]

Constructor.

Definition at line 72 of file MyBetterOperator.hpp.

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

Deconstructor.

Definition at line 82 of file MyBetterOperator.hpp.


Member Function Documentation

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

Applies the matrix to a multivector.

Implements Belos::Operator< ScalarType >.

Definition at line 86 of file MyBetterOperator.hpp.

template<class ScalarType >
void MyBetterOperator< ScalarType >::Print ( std::ostream &  os) [inline]

Definition at line 123 of file MyBetterOperator.hpp.


Member Data Documentation

template<class ScalarType >
int MyBetterOperator< ScalarType >::_nr [private]

Number of rows and columns.

Definition at line 137 of file MyBetterOperator.hpp.

template<class ScalarType >
int MyBetterOperator< ScalarType >::_nnz [private]

Definition at line 137 of file MyBetterOperator.hpp.

template<class ScalarType >
std::vector<int> MyBetterOperator< ScalarType >::_cptr [private]

Column pointers.

Definition at line 139 of file MyBetterOperator.hpp.

template<class ScalarType >
std::vector<int> MyBetterOperator< ScalarType >::_rind [private]

Row indices.

Definition at line 141 of file MyBetterOperator.hpp.

template<class ScalarType >
std::vector<ScalarType> MyBetterOperator< ScalarType >::_vals [private]

Values.

Definition at line 143 of file MyBetterOperator.hpp.


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