EpetraExt Package Browser (Single Doxygen Collection) Development
EpetraExt_TimedEpetraOperator.cpp
Go to the documentation of this file.
00001 // Questions? Contact Christopher W. Miller (cmiller@math.umd.edu).
00002 // 
00003 // ***********************************************************************
00004 // @HEADER
00005 
00006 #include "Epetra_config.h"
00007 #include "EpetraExt_TimedEpetraOperator.hpp"
00008 
00009 EpetraExt::Epetra_Timed_Operator::Epetra_Timed_Operator(const Teuchos::RCP<Epetra_Operator>& A_) 
00010   : A(A_)
00011 {
00012 ApplyTimer = Teuchos::rcp(new Teuchos::Time("apply timer",false));
00013 ApplyInverseTimer = Teuchos::rcp(new Teuchos::Time("apply inverse timer",false));
00014 }
00015 
00016 EpetraExt::Epetra_Timed_Operator::~Epetra_Timed_Operator()
00017 {
00018 }
00019 
00020 int 
00021 EpetraExt::Epetra_Timed_Operator::SetUseTranspose(bool useTranspose) 
00022 {
00023   int success;
00024   success = A->SetUseTranspose(useTranspose);
00025   return success;
00026 }
00027 
00028 int 
00029 EpetraExt::Epetra_Timed_Operator::Apply(const Epetra_MultiVector& Input, 
00030            Epetra_MultiVector& Result) const
00031 {
00032   int success;
00033   ApplyTimer->start();
00034   success = A->Apply(Input,Result);
00035   ApplyTimer->stop();
00036   return success;
00037 }
00038 
00039 int 
00040 EpetraExt::Epetra_Timed_Operator::ApplyInverse(const Epetra_MultiVector& Input, 
00041             Epetra_MultiVector& Result) const
00042 {
00043   int success;
00044   ApplyInverseTimer->start();
00045   success = A->ApplyInverse(Input,Result);
00046   ApplyInverseTimer->stop();
00047   return success;
00048 }
00049 
00050 double 
00051 EpetraExt::Epetra_Timed_Operator::NormInf() const
00052 {
00053   return A->NormInf();
00054 }
00055 
00056 
00057 const char* 
00058 EpetraExt::Epetra_Timed_Operator::Label () const
00059 {
00060   return A->Label();
00061 }
00062   
00063 bool 
00064 EpetraExt::Epetra_Timed_Operator::UseTranspose() const
00065 {
00066   return A->UseTranspose();
00067 }
00068 
00069 bool 
00070 EpetraExt::Epetra_Timed_Operator::HasNormInf() const
00071 {
00072   return A->HasNormInf();
00073 }
00074 
00075 const Epetra_Comm & 
00076 EpetraExt::Epetra_Timed_Operator::Comm() const
00077 {
00078   return A->Comm();
00079 }
00080 const Epetra_Map& 
00081 EpetraExt::Epetra_Timed_Operator::OperatorDomainMap() const
00082 {
00083   return A->OperatorDomainMap();
00084 }
00085 
00086 const Epetra_Map& 
00087 EpetraExt::Epetra_Timed_Operator::OperatorRangeMap() const
00088 {
00089   return A->OperatorRangeMap();
00090 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines