MyOperator< OrdinalType, ScalarType > Class Template Reference

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

#include <MyOperator.hpp>

List of all members.

Public Member Functions

 MyOperator (const Tpetra::VectorSpace< OrdinalType, ScalarType > &vs, const int nrows, const int *colptr, const int nnz, const int *rowin, const ScalarType *vals)
 Constructor.
 ~MyOperator ()
 Deconstructor.

Private Types

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

Private Attributes

Tpetra::VectorSpace
< OrdinalType, ScalarType > 
_vs
 Tpetra std::vector space.
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.

Functions Overridden from Tpetra::Operator.



Tpetra::VectorSpace
< OrdinalType, ScalarType >
const & 
getDomainDist () const
 Returns the VectorSpace associated with the domain of this linear operator.
Tpetra::VectorSpace
< OrdinalType, ScalarType >
const & 
getRangeDist () const
 Returns the VectorSpace associated with the range of this linear operator.
void apply (Tpetra::Vector< OrdinalType, ScalarType > const &x, Tpetra::Vector< OrdinalType, ScalarType > &y, bool transpose=false) const
 Computes the matrix-stdvector multiplication y = Ax.

Detailed Description

template<class OrdinalType, class ScalarType>
class MyOperator< OrdinalType, ScalarType >

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

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

Definition at line 18 of file MyOperator.hpp.


Member Typedef Documentation

template<class OrdinalType , class ScalarType >
typedef std::vector<ScalarType>::iterator MyOperator< OrdinalType, ScalarType >::STIter [private]

Definition at line 81 of file MyOperator.hpp.

template<class OrdinalType , class ScalarType >
typedef std::vector<int>::iterator MyOperator< OrdinalType, ScalarType >::IntIter [private]

Definition at line 88 of file MyOperator.hpp.


Constructor & Destructor Documentation

template<class OrdinalType , class ScalarType >
MyOperator< OrdinalType, ScalarType >::MyOperator ( const Tpetra::VectorSpace< OrdinalType, ScalarType > &  vs,
const int  nrows,
const int *  colptr,
const int  nnz,
const int *  rowin,
const ScalarType *  vals 
) [inline]

Constructor.

Definition at line 24 of file MyOperator.hpp.

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

Deconstructor.

Definition at line 35 of file MyOperator.hpp.


Member Function Documentation

template<class OrdinalType , class ScalarType >
Tpetra::VectorSpace<OrdinalType,ScalarType> const& MyOperator< OrdinalType, ScalarType >::getDomainDist (  )  const [inline]

Returns the VectorSpace associated with the domain of this linear operator.

Definition at line 43 of file MyOperator.hpp.

template<class OrdinalType , class ScalarType >
Tpetra::VectorSpace<OrdinalType,ScalarType> const& MyOperator< OrdinalType, ScalarType >::getRangeDist (  )  const [inline]

Returns the VectorSpace associated with the range of this linear operator.

Definition at line 46 of file MyOperator.hpp.

template<class OrdinalType , class ScalarType >
void MyOperator< OrdinalType, ScalarType >::apply ( Tpetra::Vector< OrdinalType, ScalarType > const &  x,
Tpetra::Vector< OrdinalType, ScalarType > &  y,
bool  transpose = false 
) const [inline]

Computes the matrix-stdvector multiplication y = Ax.

Definition at line 49 of file MyOperator.hpp.


Member Data Documentation

template<class OrdinalType , class ScalarType >
Tpetra::VectorSpace<OrdinalType,ScalarType> MyOperator< OrdinalType, ScalarType >::_vs [private]

Tpetra std::vector space.

Definition at line 91 of file MyOperator.hpp.

template<class OrdinalType , class ScalarType >
int MyOperator< OrdinalType, ScalarType >::_nr [private]

Number of rows and columns.

Definition at line 94 of file MyOperator.hpp.

template<class OrdinalType , class ScalarType >
int MyOperator< OrdinalType, ScalarType >::_nnz [private]

Definition at line 94 of file MyOperator.hpp.

template<class OrdinalType , class ScalarType >
std::vector<int> MyOperator< OrdinalType, ScalarType >::_cptr [private]

Column pointers.

Definition at line 96 of file MyOperator.hpp.

template<class OrdinalType , class ScalarType >
std::vector<int> MyOperator< OrdinalType, ScalarType >::_rind [private]

Row indices.

Definition at line 98 of file MyOperator.hpp.

template<class OrdinalType , class ScalarType >
std::vector<ScalarType> MyOperator< OrdinalType, ScalarType >::_vals [private]

Values.

Definition at line 100 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
Generated on Wed Apr 13 10:20:31 2011 for Stratimikos Package Browser (Single Doxygen Collection) by  doxygen 1.6.3