00001 00027 /* ******************************************************************** */ 00028 /* See the file COPYRIGHT for a complete copyright notice, contact */ 00029 /* person and disclaimer. */ 00030 /* ******************************************************************** */ 00031 00032 #ifndef ML_MULTILEVELOPERATOR_H 00033 #define ML_MULTILEVELOPERATOR_H 00034 00035 class Epetra_MultiVector; 00036 class Epetra_BlockMap; 00037 class Epetra_Comm; 00038 00039 #include "ml_common.h" 00040 #include "Epetra_LinearProblem.h" 00041 #include "Epetra_Object.h" 00042 #include "ml_include.h" 00043 00045 00046 namespace ML_Epetra 00047 { 00048 00050 00055 class MultiLevelOperator: public virtual Epetra_Operator { 00056 00057 public: 00058 00060 00061 00068 MultiLevelOperator(ML * ml_handle, const Epetra_Comm & myComm, 00069 const Epetra_Map & DomainMap, 00070 const Epetra_Map & RangeMap); 00072 00073 ~MultiLevelOperator(); 00075 00076 00078 00080 00091 int SetOwnership(bool ownership){ ownership_ = ownership; return(-1);}; 00093 00094 00096 00098 00109 int SetUseTranspose(bool UseTranspose){ ML_avoid_unused_param((void *) UseTranspose); 00110 return(-1);} 00112 00114 00116 00121 int Apply(const Epetra_MultiVector& X, Epetra_MultiVector& Y) const { 00122 return(-1);} 00123 00125 00131 #ifdef WKC 00132 00133 #if WKC < 1 00134 #error Blocking parameter (WKC) is not properly defined! 00135 #endif 00136 00137 00138 int ApplyInverse_WKC(const Epetra_MultiVector& X, Epetra_MultiVector& Y) const 00139 ; 00140 // int ApplyInverse(const Epetra_MultiVector& X, Epetra_MultiVector& Y, int iBlockSize = WKC) const; 00141 int ApplyInverse(const Epetra_MultiVector& X, Epetra_MultiVector& Y) const; 00142 #else 00143 int ApplyInverse(const Epetra_MultiVector& X, Epetra_MultiVector& Y) const; 00144 #endif 00145 00146 //int ApplyInverse(const Epetra_MultiVector& X, Epetra_MultiVector& Y) const; 00147 00149 /* Returns the quantity \f$ \| A \|_\infty\f$ such that 00150 \f[\| A \|_\infty = \max_{1\lei\lem} \sum_{j=1}^n |a_{ij}| \f]. 00151 00152 \warning This method must not be called unless HasNormInf() returns true. 00153 */ 00154 double NormInf() const {return(0.0);}; 00156 00158 00160 const char * Label() const{return(Label_);}; 00161 00163 bool UseTranspose() const {return(false);}; 00164 00166 bool HasNormInf() const{return(false);}; 00167 00169 const Epetra_Comm & Comm() const{return(Comm_);}; 00170 00172 const Epetra_Map & OperatorDomainMap() const {return(DomainMap_);}; 00174 const Epetra_Map & OperatorRangeMap() const {return(RangeMap_);}; 00176 00177 protected: 00178 00180 00181 ML * solver_; 00183 char * Label_; 00184 00185 private: 00187 MultiLevelOperator(const MultiLevelOperator& RHS) : 00188 Comm_(RHS.Comm()), 00189 DomainMap_(RHS.OperatorDomainMap()), 00190 RangeMap_(RHS.OperatorRangeMap()) 00191 { } 00192 00194 MultiLevelOperator& operator=(const MultiLevelOperator& RHS) 00195 { 00196 return(*this); 00197 } 00198 00200 const Epetra_Comm& Comm_; 00202 const Epetra_Map& DomainMap_; 00204 const Epetra_Map& RangeMap_; 00205 bool ownership_; 00206 }; 00207 00208 } 00209 00210 #endif /* ML_MULTILEVELOPERATOR_H */ 00211