EpetraExt Development
EpetraExt_TimedEpetraOperator.hpp
Go to the documentation of this file.
00001 // Questions? Contact Christopher W. Miller(cmiller@math.umd.edu).
00002 // 
00003 // ***********************************************************************
00004 // @HEADER
00005 
00006 #ifndef EPETRAEXT_TIMED_EPETRA_OP_HPP
00007 #define EPETRAEXT_TIMED_EPETRA_OP_HPP
00008 
00009 #include "Teuchos_RCP.hpp"
00010 #include "Epetra_Operator.h"
00011 #include "Epetra_MultiVector.h"
00012 #include <Teuchos_Time.hpp>
00013 #include <EpetraExt_ConfigDefs.h>
00014 
00015 namespace EpetraExt {
00016     
00021   class Epetra_Timed_Operator : public Epetra_Operator {
00022       
00023   public:
00024 
00026     Epetra_Timed_Operator(const Teuchos::RCP<Epetra_Operator>& A_);
00027     
00029     virtual ~Epetra_Timed_Operator();
00030 
00032     int SetUseTranspose(bool useTranspose);
00033     
00038     virtual int Apply(const Epetra_MultiVector& Input, 
00039                       Epetra_MultiVector& Result) const;
00040 
00045     virtual int ApplyInverse(const Epetra_MultiVector& X, 
00046                              Epetra_MultiVector& Y) const;
00047     
00049     virtual double NormInf() const;
00050     
00052     virtual const char* Label () const;
00053   
00055     virtual bool UseTranspose() const;
00056     
00061     virtual bool HasNormInf() const;
00062 
00067     virtual const Epetra_Comm & Comm() const;
00068 
00073     virtual const Epetra_Map& OperatorDomainMap () const;
00074 
00079     virtual const Epetra_Map& OperatorRangeMap () const;
00080     
00084     virtual double ApplyTime() const{return this->ApplyTimer->totalElapsedTime(false);};
00085 
00089     virtual double ApplyInverseTime() const{return this->ApplyInverseTimer->totalElapsedTime(false);};
00090 
00094     virtual Teuchos::RCP<const Epetra_Operator> ReturnOperator() const{return this->A;};
00095 
00096   private:
00097     
00099     Epetra_Timed_Operator(const Epetra_Timed_Operator&);
00100     
00102     Epetra_Timed_Operator & operator=(const Epetra_Timed_Operator&);
00103     
00104   protected:
00105     
00107     Teuchos::RCP<Epetra_Operator> A;
00108 
00110     Teuchos::RCP<Teuchos::Time> ApplyTimer;
00111 
00113     Teuchos::RCP<Teuchos::Time> ApplyInverseTimer;
00114 
00115   }; // class Epetra_Timed_Operator
00116   
00117 } // namespace EpetraExt
00118 
00119 #endif // EPETRAEXT_TIMED_EPETRA_OP_HPP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines