#include <operatortest.h>
Public Member Functions | |
OperatorTest (const Epetra_Operator *op) | |
void | set_operator (const Epetra_Operator *op, bool use_inverse=false) |
bool | is_symmetric () |
bool | is_linear () |
bool | is_non_destructive () |
void | dump_stats (std::ostream &ostr, std::string operator_name) |
Protected Member Functions | |
int | apply (Epetra_MultiVector &X, Epetra_MultiVector &Y) |
Protected Attributes | |
const Epetra_Operator * | op_ |
int | nrows_ |
int | ncols_ |
int | verbose_ |
bool | use_inverse_ |
Static Protected Attributes | |
static const double | symmetric_tol_ = 1e-13 |
static const double | linear_tol_ = 1e-11 |
Definition at line 24 of file operatortest.h.
OperatorTest::OperatorTest | ( | const Epetra_Operator * | op | ) |
int OperatorTest::apply | ( | Epetra_MultiVector & | X, | |
Epetra_MultiVector & | Y | |||
) | [protected] |
Call Apply or ApplyInverse method of operator according to _use_inverse member.
Definition at line 154 of file operatortest.cpp.
References op_, and use_inverse_.
Referenced by is_linear(), is_non_destructive(), and is_symmetric().
void OperatorTest::dump_stats | ( | std::ostream & | ostr, | |
std::string | operator_name | |||
) |
Run all available tests and dump results to ostream.
Definition at line 50 of file operatortest.cpp.
References is_linear(), is_non_destructive(), is_symmetric(), and op_.
Referenced by FemaxxDriver::calculate_eigenfields().
Here is the call graph for this function:
bool OperatorTest::is_linear | ( | ) |
Test whether the operator is linear.
Definition at line 106 of file operatortest.cpp.
References apply(), EPETRA_CHK, linear_tol_, op_, verbose_, x, and y.
Referenced by dump_stats().
Here is the call graph for this function:
bool OperatorTest::is_non_destructive | ( | ) |
Test whether operator leaves input vector intact
Definition at line 137 of file operatortest.cpp.
References apply(), EPETRA_CHK, op_, verbose_, x, and y.
Referenced by dump_stats().
Here is the call graph for this function:
bool OperatorTest::is_symmetric | ( | ) |
Test whether the operator is symmetric.
Definition at line 77 of file operatortest.cpp.
References apply(), EPETRA_CHK, ncols_, nrows_, op_, symmetric_tol_, verbose_, x, and y.
Referenced by dump_stats().
Here is the call graph for this function:
void OperatorTest::set_operator | ( | const Epetra_Operator * | op, | |
bool | use_inverse = false | |||
) |
Set new operator for following tests. Specify whether Apply or ApplyInverse will be used for the tests.
Definition at line 43 of file operatortest.cpp.
References ncols_, nrows_, op_, and use_inverse_.
Referenced by FemaxxDriver::calculate_eigenfields().
const double OperatorTest::linear_tol_ = 1e-11 [static, protected] |
int OperatorTest::ncols_ [protected] |
Definition at line 50 of file operatortest.h.
Referenced by is_symmetric(), OperatorTest(), and set_operator().
int OperatorTest::nrows_ [protected] |
Definition at line 49 of file operatortest.h.
Referenced by is_symmetric(), OperatorTest(), and set_operator().
const Epetra_Operator* OperatorTest::op_ [protected] |
Definition at line 48 of file operatortest.h.
Referenced by apply(), dump_stats(), is_linear(), is_non_destructive(), is_symmetric(), and set_operator().
const double OperatorTest::symmetric_tol_ = 1e-13 [static, protected] |
bool OperatorTest::use_inverse_ [protected] |
int OperatorTest::verbose_ [protected] |
Definition at line 51 of file operatortest.h.
Referenced by is_linear(), is_non_destructive(), is_symmetric(), and OperatorTest().