00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00034 #ifndef BELOS_EPETRA_OPERATOR_H
00035 #define BELOS_EPETRA_OPERATOR_H
00036
00037 #include "Epetra_MultiVector.h"
00038 #include "Epetra_Operator.h"
00039 #include "Epetra_Map.h"
00040 #include "Epetra_LocalMap.h"
00041
00042 #include "BelosLinearProblem.hpp"
00043 #include "BelosStatusTest.hpp"
00044 #include "BelosOutputManager.hpp"
00045 #include "BelosEpetraAdapter.hpp"
00046 #include "BelosBlockGmresSolMgr.hpp"
00047 #include "BelosPseudoBlockGmresSolMgr.hpp"
00048 #include "BelosBlockCGSolMgr.hpp"
00049
00050 #include "Teuchos_ParameterList.hpp"
00051 using Teuchos::RCP;
00052 using Teuchos::ParameterList;
00053
00059 namespace Belos {
00060
00062
00063
00064
00065
00066
00067
00069
00070 class EpetraOperator : public virtual Epetra_Operator {
00071 public:
00073
00074
00076 EpetraOperator( const RCP<LinearProblem<double,Epetra_MultiVector,Epetra_Operator> >& lp,
00077 const RCP<ParameterList>& plist,
00078 bool initSolnVec = false );
00079
00081 virtual ~EpetraOperator() {}
00083
00085
00086
00088 int SetUseTranspose( bool UseTranspose ) { return(-1); };
00090
00092
00093
00095 int Apply( const Epetra_MultiVector &X, Epetra_MultiVector &Y ) const;
00096
00098 int ApplyInverse( const Epetra_MultiVector &X, Epetra_MultiVector &Y ) const;
00100
00102
00103
00105 double NormInf() const { return(0.0); };
00107
00109
00110
00112 const char* Label() const { return(&Solver[0]); };
00113
00115 bool UseTranspose() const { return(false); };
00116
00118 bool HasNormInf() const { return(false); };
00119
00121 const Epetra_Comm& Comm() const;
00122
00124 const Epetra_Map& OperatorDomainMap() const;
00125
00127 const Epetra_Map& OperatorRangeMap() const;
00129 private:
00130
00131 RCP<SolverManager<double,Epetra_MultiVector,Epetra_Operator> > solver_;
00132 RCP<LinearProblem<double,Epetra_MultiVector,Epetra_Operator> > lp_;
00133 RCP<ParameterList> plist_;
00134
00135 std::vector<char> Solver;
00136 bool initSolnVec_;
00137 };
00138
00139 }
00140
00141
00142 #endif
00143