Belos Package Browser (Single Doxygen Collection)
Development
|
Simple example of a user's defined Belos::Operator class. More...
#include <MyBetterOperator.hpp>
Public Member Functions | |
MyBetterOperator (const int nrows, const int *colptr, const int nnz, const int *rowin, const ScalarType *vals) | |
Constructor. More... | |
~MyBetterOperator () | |
Deconstructor. More... | |
void | Apply (const Belos::MultiVec< ScalarType > &X, Belos::MultiVec< ScalarType > &Y, Belos::ETrans trans=Belos::NOTRANS) const |
Applies the matrix to a multivector. More... | |
void | Print (std::ostream &os) |
Public Member Functions inherited from Belos::Operator< ScalarType > | |
Operator () | |
Default constructor (does nothing). More... | |
virtual | ~Operator () |
Virtual destructor, for memory safety of derived classes. More... | |
virtual bool | HasApplyTranspose () const |
Whether this operator implements applying the transpose. More... | |
Private Types | |
typedef std::vector < ScalarType >::iterator | STIter |
typedef std::vector< int > ::iterator | IntIter |
Private Attributes | |
int | _nr |
Number of rows and columns. More... | |
int | _nnz |
std::vector< int > | _cptr |
Column pointers. More... | |
std::vector< int > | _rind |
Row indices. More... | |
std::vector< ScalarType > | _vals |
Values. More... | |
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)
Definition at line 34 of file MyBetterOperator.hpp.
|
private |
Definition at line 102 of file MyBetterOperator.hpp.
|
private |
Definition at line 103 of file MyBetterOperator.hpp.
|
inline |
Constructor.
Definition at line 40 of file MyBetterOperator.hpp.
|
inline |
Deconstructor.
Definition at line 50 of file MyBetterOperator.hpp.
|
inlinevirtual |
Applies the matrix to a multivector.
Implements Belos::Operator< ScalarType >.
Definition at line 54 of file MyBetterOperator.hpp.
|
inline |
Definition at line 91 of file MyBetterOperator.hpp.
|
private |
Number of rows and columns.
Definition at line 105 of file MyBetterOperator.hpp.
|
private |
Definition at line 105 of file MyBetterOperator.hpp.
|
private |
Column pointers.
Definition at line 107 of file MyBetterOperator.hpp.
|
private |
Row indices.
Definition at line 109 of file MyBetterOperator.hpp.
|
private |
Values.
Definition at line 111 of file MyBetterOperator.hpp.