00001 // 00002 // C++ Interface: operatortest 00003 // 00004 // Description: 00005 // 00006 // 00007 // Author: Roman Geus <roman.geus@psi.ch>, (C) 2004 00008 // 00009 // Copyright: See COPYING file that comes with this distribution 00010 // 00011 // 00012 00013 #ifndef OPERATORTEST 00014 #define OPERATORTEST 00015 00016 #include <ostream> 00017 00018 class Epetra_Operator; 00019 class Epetra_Map; 00020 00024 class OperatorTest { 00025 public: 00026 OperatorTest(const Epetra_Operator* op); 00030 void set_operator(const Epetra_Operator* op, bool use_inverse=false); 00033 bool is_symmetric(); 00036 bool is_linear(); 00039 bool is_non_destructive(); 00042 void dump_stats(std::ostream& ostr, std::string operator_name); 00043 protected: 00047 int apply(Epetra_MultiVector& X, Epetra_MultiVector& Y); 00048 const Epetra_Operator* op_; 00049 int nrows_; 00050 int ncols_; 00051 int verbose_; 00052 bool use_inverse_; 00053 static const double symmetric_tol_; 00054 static const double linear_tol_; 00055 }; 00056 00057 #endif //OPERATORTEST