• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

ml_RefMaxwell_11_Operator.h

Go to the documentation of this file.
00001 /* ******************************************************************** */
00002 /* See the file COPYRIGHT for a complete copyright notice, contact      */
00003 /* person and disclaimer.                                               */        
00004 /* ******************************************************************** */
00005 //@HEADER
00019 #ifndef ML_REFMAXWELL_11_OPERATOR_H
00020 #define ML_REFMAXWELL_11_OPERATOR_H
00021 #if defined(HAVE_ML_EPETRA) && defined (HAVE_ML_EPETRAEXT)
00022 #include "Epetra_Comm.h"
00023 #include "Epetra_Map.h"
00024 #include "Epetra_Operator.h"
00025 #include "Epetra_Vector.h"
00026 #include "Epetra_CrsMatrix.h"
00027 #include "ml_Preconditioner.h"
00028 #include "Epetra_Operator_With_MatMat.h"
00029 #include "Epetra_Multi_CrsMatrix.h"
00030 #include "EpetraExt_Reindex_CrsMatrix.h"
00031 #include "EpetraExt_Transpose_RowMatrix.h"
00032 #include "EpetraExt_SolverMap_CrsMatrix.h"
00033 namespace ML_Epetra{
00034 
00042 class ML_RefMaxwell_11_Operator: public Epetra_Operator_With_MatMat{
00043 public:
00045 
00046 
00047   // be called for all of these matrices before you try to use the matmat functions.
00048   // WARNING:  All these matrices will be shallow pointed to.  Please be sure
00049   // they stick around until after ML_RefMaxwell_11_Operator is done.
00050   ML_RefMaxwell_11_Operator(const Epetra_CrsMatrix& SM_Matrix,    //S+M
00051                             const Epetra_CrsMatrix& D0_Matrix,    //T or D0
00052                             const Epetra_CrsMatrix& M0inv_Matrix, //M0^{-1}
00053                             const Epetra_CrsMatrix& M1_Matrix);   //M1(1)                        
00055   
00057 
00058 
00059   virtual ~ML_RefMaxwell_11_Operator();
00061   
00063 
00064  
00066   virtual int SetUseTranspose(bool UseTranspose){return(-1);}
00067 
00068 
00070   
00072 
00073 
00075 
00083   virtual int Apply(const Epetra_MultiVector& X, Epetra_MultiVector& Y) const;
00084 
00086   //Epetra_MultiVector X in Y. NOT IMPLEMEMENTED!
00087   virtual int ApplyInverse(const Epetra_MultiVector& X, Epetra_MultiVector& Y) const {return -1;}
00088 
00089 
00091   //matrices in *this, before this routine can work.
00092   virtual int MatrixMatrix_Multiply(const Epetra_CrsMatrix & A, Epetra_CrsMatrix **C) const;
00093 
00095   //matrices in *this, before this routine can work.
00096   virtual int MatrixMatrix_Multiply(const Epetra_CrsMatrix & A, ML_Comm *comm, ML_Operator **C) const;
00097 
00099   //matrices in *this, before this routine can work.
00100   virtual int PtAP(const Epetra_CrsMatrix & A, ML_Comm *comm, ML_Operator **C) const;
00101   
00102   
00104   
00106 
00107 
00109   virtual double NormInf() const {return(0.0);};
00110 
00112   virtual bool UseTranspose() const {return(false);};
00113   
00115   virtual bool HasNormInf() const{return(false);};
00116 
00118   virtual const char* Label() const{return(Label_);};  
00119   
00121   virtual const Epetra_Comm& Comm() const{return(*Comm_);};
00122   
00124   virtual const Epetra_Map& OperatorDomainMap() const {return(*DomainMap_);};
00125   
00127   virtual const Epetra_Map& OperatorRangeMap() const {return(*RangeMap_);};
00128 
00130   virtual const Epetra_CrsMatrix & SM_Matrix(){return *SM_Matrix_;}
00132   
00133 private:
00135 
00136 
00137   const Epetra_CrsMatrix * SM_Matrix_;
00139   Epetra_CrsMatrix ** Addon_Matrix_;
00140 
00142   Epetra_CrsMatrix * D0T_Matrix_;
00143   EpetraExt::RowMatrix_Transpose * D0_Matrix_Transposer_;
00144   EpetraExt::CrsMatrix_SolverMap D0T_Matrix_Trans_;
00145   
00147   Epetra_Multi_CrsMatrix *Addon_;
00148 
00150   char* Label_;
00151 
00153   const Epetra_Map* DomainMap_;
00155   const Epetra_Map* RangeMap_;
00157   const Epetra_Comm* Comm_;
00158   
00159   
00161   
00162 };//end Epetra_Multi_CrsMatrix
00163 
00164 }//end namespace
00165 #endif  
00166 #endif /*ML_REFMAXWELL_11_OPERATOR_H*/