43 #ifndef IFPACK_EUCLID_H
44 #define IFPACK_EUCLID_H
46 #include "Ifpack_ConfigDefs.h"
49 #include "Ifpack_Condest.h"
51 #include "Epetra_CompObject.h"
52 #include "Epetra_MultiVector.h"
53 #include "Epetra_Vector.h"
54 #include "Epetra_CrsGraph.h"
55 #include "Epetra_CrsMatrix.h"
56 #include "Epetra_BlockMap.h"
57 #include "Epetra_Map.h"
58 #include "Epetra_Object.h"
59 #include "Epetra_Comm.h"
60 #include "Epetra_CrsMatrix.h"
61 #include "Epetra_Time.h"
62 #include "Teuchos_RefCountPtr.hpp"
63 #include "Teuchos_ParameterList.hpp"
64 #include "Epetra_MpiComm.h"
68 #include "TimeLog_dh.h"
69 #include "Parser_dh.h"
70 #include "Euclid_dh.h"
86 friend std::ostream& operator << (std::ostream& os,
const Ifpack_Euclid& A);
94 ~Ifpack_Euclid(){ Destroy();}
103 bool IsInitialized()
const{
return(IsInitialized_);}
111 bool IsComputed()
const{
return(IsComputed_);}
127 int SetParameters(Teuchos::ParameterList& parameterlist);
136 int SetParameter(std::string name,
int Value);
145 int SetParameter(std::string name,
double Value);
148 int SetUseTranspose(
bool UseTranspose_in) {UseTranspose_ = UseTranspose_in;
return(0);};
186 double Condest(
const Ifpack_CondestType CT = Ifpack_Cheap,
const int MaxIters = 1550,
190 double Condest()
const{
return(Condest_);}
196 const char*
Label()
const {
return(Label_);}
199 void SetLabel(
const char* Label_in){ strcpy(Label_,Label_in);}
208 double NormInf()
const {
return(0.0);};
223 virtual int NumInitialize()
const{
return(NumInitialize_);}
226 virtual int NumCompute()
const{
return(NumCompute_);}
229 virtual int NumApplyInverse()
const{
return(NumApplyInverse_);}
232 virtual double InitializeTime()
const{
return(InitializeTime_);}
235 virtual double ComputeTime()
const{
return(ComputeTime_);}
238 virtual double ApplyInverseTime()
const{
return(ApplyInverseTime_);}
241 virtual double InitializeFlops()
const{
return(0.0);}
244 virtual double ComputeFlops()
const{
return(ComputeFlops_);}
247 virtual double ApplyInverseFlops()
const{
return(ApplyInverseFlops_);}
255 Ifpack_Euclid(
const Ifpack_Euclid& RHS) : Time_(RHS.Comm()){}
258 Ifpack_Euclid& operator=(
const Ifpack_Euclid& RHS){
return(*
this);}
264 MPI_Comm GetMpiComm()
const{
return (dynamic_cast<const Epetra_MpiComm*>(&A_->Comm()))->GetMpiComm();}
267 int CallEuclid(
double *x,
double *y)
const;
283 int NumGlobalRows()
const {
return(A_->NumGlobalRows());};
286 int NumGlobalCols()
const {
return(A_->NumGlobalCols());};
289 int NumMyRows()
const {
return(A_->NumMyRows());};
292 int NumMyCols()
const {
return(A_->NumMyCols());};
298 Teuchos::RefCountPtr<Epetra_CrsMatrix> A_;
300 Teuchos::ParameterList List_;
316 mutable int NumApplyInverse_;
318 double InitializeTime_;
322 mutable double ApplyInverseTime_;
324 double ComputeFlops_;
326 mutable double ApplyInverseFlops_;
348 std::ostream& operator << (std::ostream& os,
const Ifpack_Euclid& A);
350 #endif // HAVE_EUCLID
virtual int SetUseTranspose(bool UseTranspose)=0
virtual int ApplyInverse(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const =0
virtual const Epetra_Map & OperatorDomainMap() const =0
virtual const char * Label() const =0
virtual int Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const =0
virtual const Epetra_Map & OperatorRangeMap() const =0
virtual const Epetra_Comm & Comm() const =0
virtual bool UseTranspose() const =0
Ifpack_ScalingType enumerable type.
virtual bool HasNormInf() const =0
virtual double NormInf() const =0