00001 #ifndef IFPACK_REORDERFILTER_H
00002 #define IFPACK_REORDERFILTER_H
00003
00004 #include "Ifpack_ConfigDefs.h"
00005 #include "Epetra_RowMatrix.h"
00006 class Epetra_Comm;
00007 class Epetra_Map;
00008 class Epetra_MultiVector;
00009 class Epetra_Import;
00010 class Epetra_BlockMap;
00011 class Ifpack_Reordering;
00012
00014
00037 class Ifpack_ReorderFilter : public virtual Epetra_RowMatrix {
00038
00039 public:
00040
00041 Ifpack_ReorderFilter(Epetra_RowMatrix* Matrix,
00042 Ifpack_Reordering* Reordering);
00043
00045 Ifpack_ReorderFilter(const Ifpack_ReorderFilter& RHS);
00046
00048 virtual ~Ifpack_ReorderFilter();
00049
00051 Ifpack_ReorderFilter& operator=(const Ifpack_ReorderFilter& RHS);
00052
00054 virtual inline int NumMyRowEntries(int MyRow, int & NumEntries) const
00055 {
00056 return(Matrix().NumMyRowEntries(MyRow, NumEntries));
00057 }
00058
00060 virtual int MaxNumEntries() const
00061 {
00062 return(MaxNumEntries_);
00063 }
00064
00065
00066 virtual int ExtractMyRowCopy(int MyRow, int Length, int & NumEntries, double *Values, int * Indices) const;
00067
00069 virtual int ExtractDiagonalCopy(Epetra_Vector & Diagonal) const;
00070
00072 virtual int Multiply(bool TransA, const Epetra_MultiVector& X,
00073 Epetra_MultiVector& Y) const;
00074
00076 virtual int Solve(bool Upper, bool Trans, bool UnitDiagonal,
00077 const Epetra_MultiVector& X,
00078 Epetra_MultiVector& Y) const;
00079
00081 virtual int Apply(const Epetra_MultiVector& X,
00082 Epetra_MultiVector& Y) const;
00083
00085 virtual int ApplyInverse(const Epetra_MultiVector& X,
00086 Epetra_MultiVector& Y) const
00087 {
00088 return(-1);
00089 }
00090
00092 virtual int InvRowSums(Epetra_Vector& x) const
00093 {
00094 return(-1);
00095 }
00096
00098 virtual int LeftScale(const Epetra_Vector& x)
00099 {
00100 return(-1);
00101 }
00102
00104 virtual int InvColSums(Epetra_Vector& x) const
00105 {
00106 return(-1);
00107 }
00108
00110 virtual int RightScale(const Epetra_Vector& x)
00111 {
00112 return(-1);
00113 }
00114
00116 virtual bool Filled() const
00117 {
00118 return(Matrix().Filled());
00119 }
00120
00122 virtual double NormInf() const
00123 {
00124 return(-1.0);
00125 }
00126
00128 virtual double NormOne() const
00129 {
00130 return(-1.0);
00131 }
00132
00134 virtual int NumGlobalNonzeros() const
00135 {
00136 return(Matrix().NumGlobalNonzeros());
00137 }
00138
00140 virtual int NumGlobalRows() const
00141 {
00142 return(Matrix().NumGlobalRows());
00143 }
00144
00146 virtual int NumGlobalCols() const
00147 {
00148 return(Matrix().NumGlobalCols());
00149 }
00150
00152 virtual int NumGlobalDiagonals() const
00153 {
00154 return(Matrix().NumGlobalDiagonals());
00155 }
00156
00158 virtual int NumMyNonzeros() const
00159 {
00160 return(Matrix().NumMyNonzeros());
00161 }
00162
00164 virtual int NumMyRows() const
00165 {
00166 return(Matrix().NumMyRows());
00167 }
00168
00170 virtual int NumMyCols() const
00171 {
00172 return(Matrix().NumMyCols());
00173 }
00174
00176 virtual int NumMyDiagonals() const
00177 {
00178 return(Matrix().NumMyDiagonals());
00179 }
00180
00182 virtual bool LowerTriangular() const
00183 {
00184 return(false);
00185 }
00186
00188 virtual bool UpperTriangular() const
00189 {
00190 return(false);
00191 }
00192
00194 virtual const Epetra_Map & RowMatrixRowMap() const
00195 {
00196 return(Matrix().RowMatrixRowMap());
00197 }
00198
00200 virtual const Epetra_Map & RowMatrixColMap() const
00201 {
00202 return(Matrix().RowMatrixColMap());
00203 }
00204
00206 virtual const Epetra_Import * RowMatrixImporter() const
00207 {
00208 return(Matrix().RowMatrixImporter());
00209 }
00210
00212 int SetUseTranspose(bool UseTranspose)
00213 {
00214 return(Matrix().SetUseTranspose(UseTranspose));
00215 }
00216
00218 bool UseTranspose() const
00219 {
00220 return(Matrix().UseTranspose());
00221 }
00222
00224 bool HasNormInf() const
00225 {
00226 return(true);
00227 }
00228
00230 const Epetra_Comm & Comm() const
00231 {
00232 return(Matrix().Comm());
00233 }
00234
00236 const Epetra_Map & OperatorDomainMap() const
00237 {
00238 return(Matrix().OperatorDomainMap());
00239 }
00240
00242 const Epetra_Map & OperatorRangeMap() const
00243 {
00244 return(Matrix().OperatorRangeMap());
00245 }
00246
00248 const Epetra_BlockMap& Map() const
00249 {
00250 return(Matrix().Map());
00251 }
00252
00254 const char* Label() const{
00255 return(Label_);
00256 }
00257
00259 inline Epetra_RowMatrix& Matrix() const {
00260 return(*A_);
00261 }
00262
00264 inline Ifpack_Reordering& Reordering() const {
00265 return(*Reordering_);
00266 }
00267
00268 private:
00269
00271 Epetra_RowMatrix* A_;
00273 Ifpack_Reordering* Reordering_;
00274
00276 int NumMyRows_;
00278 int MaxNumEntries_;
00280 char Label_[80];
00281
00282 };
00283
00284
00285 #endif