|
Stratimikos Package Browser (Single Doxygen Collection)
Version of the Day
|
Simple example of a user's defined Tpetra::Operator class. More...
#include <MyOperator.hpp>
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-std::vector multiplication y = Ax. | |
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 63 of file MyOperator.hpp.
typedef std::vector<ScalarType>::iterator MyOperator< OrdinalType, ScalarType >::STIter [private] |
Definition at line 126 of file MyOperator.hpp.
typedef std::vector<int>::iterator MyOperator< OrdinalType, ScalarType >::IntIter [private] |
Definition at line 133 of file MyOperator.hpp.
| 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 69 of file MyOperator.hpp.
| MyOperator< OrdinalType, ScalarType >::~MyOperator | ( | ) | [inline] |
Deconstructor.
Definition at line 80 of file MyOperator.hpp.
| 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 88 of file MyOperator.hpp.
| 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 91 of file MyOperator.hpp.
| void MyOperator< OrdinalType, ScalarType >::apply | ( | Tpetra::Vector< OrdinalType, ScalarType > const & | x, |
| Tpetra::Vector< OrdinalType, ScalarType > & | y, | ||
| bool | transpose = false |
||
| ) | const [inline] |
Computes the matrix-std::vector multiplication y = Ax.
Definition at line 94 of file MyOperator.hpp.
Tpetra::VectorSpace<OrdinalType,ScalarType> MyOperator< OrdinalType, ScalarType >::_vs [private] |
Tpetra std::vector space.
Definition at line 136 of file MyOperator.hpp.
int MyOperator< OrdinalType, ScalarType >::_nr [private] |
Number of rows and columns.
Definition at line 139 of file MyOperator.hpp.
int MyOperator< OrdinalType, ScalarType >::_nnz [private] |
Definition at line 139 of file MyOperator.hpp.
std::vector<int> MyOperator< OrdinalType, ScalarType >::_cptr [private] |
Column pointers.
Definition at line 141 of file MyOperator.hpp.
std::vector<int> MyOperator< OrdinalType, ScalarType >::_rind [private] |
Row indices.
Definition at line 143 of file MyOperator.hpp.
std::vector<ScalarType> MyOperator< OrdinalType, ScalarType >::_vals [private] |
Values.
Definition at line 145 of file MyOperator.hpp.
1.7.6.1