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 
00192 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
00193 
00194   virtual int NumGlobalNonzeros() const
00195   {
00196     return(Matrix().NumGlobalNonzeros());
00197   }
00198 
00200   virtual int NumGlobalRows() const
00201   {
00202     return(Matrix().NumGlobalRows());
00203   }
00204 
00206   virtual int NumGlobalCols() const
00207   {
00208     return(Matrix().NumGlobalCols());
00209   }
00210 
00212   virtual int NumGlobalDiagonals() const
00213   {
00214     return(Matrix().NumGlobalDiagonals());
00215   }
00216 #endif
00217 
00219   virtual long long NumGlobalNonzeros64() const
00220   {
00221     return(Matrix().NumGlobalNonzeros64());
00222   }
00223 
00225   virtual long long NumGlobalRows64() const
00226   {
00227     return(Matrix().NumGlobalRows64());
00228   }
00229 
00231   virtual long long NumGlobalCols64() const
00232   {
00233     return(Matrix().NumGlobalCols64());
00234   }
00235 
00237   virtual long long NumGlobalDiagonals64() const
00238   {
00239     return(Matrix().NumGlobalDiagonals64());
00240   }
00241 
00243   virtual int NumMyNonzeros() const
00244   {
00245     return(Matrix().NumMyNonzeros());
00246   }
00247 
00249   virtual int NumMyRows() const
00250   {
00251     return(Matrix().NumMyRows());
00252   }
00253 
00255   virtual int NumMyCols() const
00256   {
00257     return(Matrix().NumMyCols());
00258   }
00259 
00261   virtual int NumMyDiagonals() const
00262   {
00263     return(Matrix().NumMyDiagonals());
00264   }
00265 
00267   virtual bool LowerTriangular() const
00268   {
00269     return(Matrix_->LowerTriangular());
00270   }
00271 
00273   virtual bool UpperTriangular() const
00274   {
00275     return(Matrix_->UpperTriangular());
00276   }
00277 
00279   virtual const Epetra_Map & RowMatrixRowMap() const
00280   {
00281     return(Matrix().RowMatrixRowMap());
00282   }
00284   virtual const Epetra_Map & RowMatrixColMap() const
00285   {
00286     return(Matrix().RowMatrixColMap());
00287   }
00288 
00290   virtual const Epetra_Import * RowMatrixImporter() const
00291   {
00292     return(Matrix().RowMatrixImporter());
00293   }
00295 
00296   // following functions are required to derive Epetra_RowMatrix objects.
00297 
00298 #ifdef FIXME
00299 
00300   int SetOwnership(bool ownership)
00301   {
00302     return(Matrix().SetOwnership(ownership));
00303   }
00304 #endif
00305 
00307   int SetUseTranspose(bool UseTranspose_in)
00308   {
00309     return(Matrix().SetUseTranspose(UseTranspose_in));
00310   }
00311 
00313   bool UseTranspose() const 
00314   {
00315     return(Matrix().UseTranspose());
00316   }
00317 
00319   bool HasNormInf() const
00320   {
00321     return(Matrix().HasNormInf());
00322   }
00323 
00325   const Epetra_Comm & Comm() const
00326   {
00327     return(Matrix().Comm());
00328   }
00329 
00331   const Epetra_Map & OperatorDomainMap() const 
00332   {
00333     return(Matrix().OperatorDomainMap());
00334   }
00335 
00337   const Epetra_Map & OperatorRangeMap() const 
00338   {
00339     return(Matrix().OperatorRangeMap());
00340   }
00342 
00343   const Epetra_BlockMap& Map() const
00344   {
00345     return(Matrix().Map());
00346   }
00347 
00348   const char* Label() const
00349   {
00350     return(Matrix().Label());
00351   }
00352 
00353 
00354 private:
00355 
00356   Epetra_RowMatrix& Matrix()
00357   {
00358     return(*Matrix_);
00359   }
00360 
00361   const Epetra_RowMatrix& Matrix() const
00362   {
00363     return(*Matrix_);
00364   }
00365 
00367   Epetra_RowMatrix* Matrix_;
00368   
00369 };
00370 
00371 #endif /* IFPACK_ROWMATRIX_H */
00372 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines