Amesos Package Browser (Single Doxygen Collection) Development
Amesos_TestRowMatrix.h
Go to the documentation of this file.
00001 #ifndef IFPACK_ROWMATRIX_H
00002 #define IFPACK_ROWMATRIX_H
00003 
00004 #include "Amesos_ConfigDefs.h"
00005 #ifdef HAVE_MPI
00006 #include "Epetra_MpiComm.h"
00007 #else
00008 #include "Epetra_SerialComm.h"
00009 #endif
00010 #include "Epetra_RowMatrix.h"
00011 class Epetra_Map;
00012 class Epetra_MultiVector;
00013 class Epetra_Import;
00014 class Epetra_BlockMap;
00015 
00017 
00030 class Amesos_TestRowMatrix : public virtual Epetra_RowMatrix {
00031 
00032 public:
00034 
00035   Amesos_TestRowMatrix(Epetra_RowMatrix* Matrix_in) :
00036     Matrix_(Matrix_in)
00037   {}
00038 
00040 
00041 
00042   virtual ~Amesos_TestRowMatrix()
00043   {}
00044 
00046 
00048 
00050 
00058   virtual int NumMyRowEntries(int MyRow, int & NumEntries) const
00059   {
00060     return(Matrix().NumMyRowEntries(MyRow,NumEntries));
00061   }
00062 
00064   virtual int MaxNumEntries() const
00065   {
00066     return(Matrix().MaxNumEntries());
00067   }
00068 
00070 
00084   virtual int ExtractMyRowCopy(int MyRow, int Length, int & NumEntries, double *Values, int * Indices) const
00085   {
00086     return(Matrix().ExtractMyRowCopy(MyRow,Length, NumEntries,
00087              Values, Indices));
00088   }
00089 
00091 
00097   virtual int ExtractDiagonalCopy(Epetra_Vector & Diagonal) const
00098   {
00099     return(Matrix().ExtractDiagonalCopy(Diagonal));
00100   }
00102 
00104 
00106 
00116   virtual int Multiply(bool TransA, const Epetra_MultiVector& X, Epetra_MultiVector& Y) const
00117   {
00118     return(Matrix().Multiply(TransA,X,Y));
00119   }
00120 
00122   virtual int Solve(bool Upper, bool Trans, bool UnitDiagonal, const Epetra_MultiVector& X, 
00123         Epetra_MultiVector& Y) const
00124   {
00125     return(Matrix().Solve(Upper,Trans,UnitDiagonal,X,Y));
00126   }
00127 
00128   virtual int Apply(const Epetra_MultiVector& X,
00129         Epetra_MultiVector& Y) const
00130   {
00131     return(Matrix().Apply(X,Y));
00132   }
00133 
00134   virtual int ApplyInverse(const Epetra_MultiVector& X,
00135          Epetra_MultiVector& Y) const
00136   {
00137     return(Matrix().ApplyInverse(X,Y));
00138   }
00140   virtual int InvRowSums(Epetra_Vector& x) const
00141   {
00142     return(Matrix().InvRowSums(x));
00143   }
00144 
00146   virtual int LeftScale(const Epetra_Vector& x)
00147   {
00148     return(Matrix().LeftScale(x));
00149   }
00150 
00152   virtual int InvColSums(Epetra_Vector& x) const
00153   {
00154     return(Matrix().InvColSums(x));
00155   }
00156 
00157 
00159   virtual int RightScale(const Epetra_Vector& x) 
00160   {
00161     return(Matrix().RightScale(x));
00162   }
00163 
00165 
00167 
00169   virtual bool Filled() const
00170   {
00171     return(Matrix().Filled());
00172   }
00173 
00175   /* Returns the quantity \f$ \| A \|_\infty\f$ such that
00176      \f[\| A \|_\infty = \max_{1\lei\len} \sum_{i=1}^m |a_{ij}| \f].
00177      */ 
00178   virtual double NormInf() const
00179   {
00180     return(Matrix().NormInf());
00181   }
00182 
00184   /* Returns the quantity \f$ \| A \|_1\f$ such that
00185      \f[\| A \|_1= \max_{1\lej\len} \sum_{j=1}^n |a_{ij}| \f].
00186      */ 
00187   virtual double NormOne() const
00188   {
00189     return(Matrix().NormOne());
00190   }
00191 
00193   virtual int NumGlobalNonzeros() const
00194   {
00195     return(Matrix().NumGlobalNonzeros());
00196   }
00197 
00199   virtual int NumGlobalRows() const
00200   {
00201     return(Matrix().NumGlobalRows());
00202   }
00203 
00205   virtual int NumGlobalCols() const
00206   {
00207     return(Matrix().NumGlobalCols());
00208   }
00209 
00211   virtual int NumGlobalDiagonals() const
00212   {
00213     return(Matrix().NumGlobalDiagonals());
00214   }
00215 
00217   virtual int NumMyNonzeros() const
00218   {
00219     return(Matrix().NumMyNonzeros());
00220   }
00221 
00223   virtual int NumMyRows() const
00224   {
00225     return(Matrix().NumMyRows());
00226   }
00227 
00229   virtual int NumMyCols() const
00230   {
00231     return(Matrix().NumMyCols());
00232   }
00233 
00235   virtual int NumMyDiagonals() const
00236   {
00237     return(Matrix().NumMyDiagonals());
00238   }
00239 
00241   virtual bool LowerTriangular() const
00242   {
00243     return(Matrix_->LowerTriangular());
00244   }
00245 
00247   virtual bool UpperTriangular() const
00248   {
00249     return(Matrix_->UpperTriangular());
00250   }
00251 
00253   virtual const Epetra_Map & RowMatrixRowMap() const
00254   {
00255     return(Matrix().RowMatrixRowMap());
00256   }
00258   virtual const Epetra_Map & RowMatrixColMap() const
00259   {
00260     return(Matrix().RowMatrixColMap());
00261   }
00262 
00264   virtual const Epetra_Import * RowMatrixImporter() const
00265   {
00266     return(Matrix().RowMatrixImporter());
00267   }
00269 
00270   // following functions are required to derive Epetra_RowMatrix objects.
00271 
00272 #ifdef FIXME
00273 
00274   int SetOwnership(bool ownership)
00275   {
00276     return(Matrix().SetOwnership(ownership));
00277   }
00278 #endif
00279 
00281   int SetUseTranspose(bool UseTranspose_in)
00282   {
00283     return(Matrix().SetUseTranspose(UseTranspose_in));
00284   }
00285 
00287   bool UseTranspose() const 
00288   {
00289     return(Matrix().UseTranspose());
00290   }
00291 
00293   bool HasNormInf() const
00294   {
00295     return(Matrix().HasNormInf());
00296   }
00297 
00299   const Epetra_Comm & Comm() const
00300   {
00301     return(Matrix().Comm());
00302   }
00303 
00305   const Epetra_Map & OperatorDomainMap() const 
00306   {
00307     return(Matrix().OperatorDomainMap());
00308   }
00309 
00311   const Epetra_Map & OperatorRangeMap() const 
00312   {
00313     return(Matrix().OperatorRangeMap());
00314   }
00316 
00317   const Epetra_BlockMap& Map() const
00318   {
00319     return(Matrix().Map());
00320   }
00321 
00322   const char* Label() const
00323   {
00324     return(Matrix().Label());
00325   }
00326 
00327 
00328 private:
00329 
00330   Epetra_RowMatrix& Matrix()
00331   {
00332     return(*Matrix_);
00333   }
00334 
00335   const Epetra_RowMatrix& Matrix() const
00336   {
00337     return(*Matrix_);
00338   }
00339 
00341   Epetra_RowMatrix* Matrix_;
00342   
00343 };
00344 
00345 #endif /* IFPACK_ROWMATRIX_H */
00346 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines