00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef IFPACK_REORDERFILTER_H
00031 #define IFPACK_REORDERFILTER_H
00032
00033 #include "Ifpack_ConfigDefs.h"
00034 #include "Epetra_RowMatrix.h"
00035 #include "Teuchos_RefCountPtr.hpp"
00036
00037 class Epetra_Comm;
00038 class Epetra_Map;
00039 class Epetra_MultiVector;
00040 class Epetra_Import;
00041 class Epetra_BlockMap;
00042 class Ifpack_Reordering;
00043
00045
00068 class Ifpack_ReorderFilter : public virtual Epetra_RowMatrix {
00069
00070 public:
00071
00072 Ifpack_ReorderFilter(const Teuchos::RefCountPtr<Epetra_RowMatrix>& Matrix_in,
00073 const Teuchos::RefCountPtr<Ifpack_Reordering>& Reordering_in);
00074
00076 Ifpack_ReorderFilter(const Ifpack_ReorderFilter& RHS);
00077
00079 virtual ~Ifpack_ReorderFilter() {};
00080
00082 Ifpack_ReorderFilter& operator=(const Ifpack_ReorderFilter& RHS);
00083
00085 virtual inline int NumMyRowEntries(int MyRow, int & NumEntries) const
00086 {
00087 return(Matrix()->NumMyRowEntries(MyRow, NumEntries));
00088 }
00089
00091 virtual int MaxNumEntries() const
00092 {
00093 return(MaxNumEntries_);
00094 }
00095
00096
00097 virtual int ExtractMyRowCopy(int MyRow, int Length, int & NumEntries, double *Values, int * Indices) const;
00098
00100 virtual int ExtractDiagonalCopy(Epetra_Vector & Diagonal) const;
00101
00103 virtual int Multiply(bool TransA, const Epetra_MultiVector& X,
00104 Epetra_MultiVector& Y) const;
00105
00107 virtual int Solve(bool Upper, bool Trans, bool UnitDiagonal,
00108 const Epetra_MultiVector& X,
00109 Epetra_MultiVector& Y) const;
00110
00112 virtual int Apply(const Epetra_MultiVector& X,
00113 Epetra_MultiVector& Y) const;
00114
00116 virtual int ApplyInverse(const Epetra_MultiVector& X,
00117 Epetra_MultiVector& Y) const
00118 {
00119 return(-1);
00120 }
00121
00123 virtual int InvRowSums(Epetra_Vector& x) const
00124 {
00125 return(-1);
00126 }
00127
00129 virtual int LeftScale(const Epetra_Vector& x)
00130 {
00131 return(-1);
00132 }
00133
00135 virtual int InvColSums(Epetra_Vector& x) const
00136 {
00137 return(-1);
00138 }
00139
00141 virtual int RightScale(const Epetra_Vector& x)
00142 {
00143 return(-1);
00144 }
00145
00147 virtual bool Filled() const
00148 {
00149 return(Matrix()->Filled());
00150 }
00151
00153 virtual double NormInf() const
00154 {
00155 return(-1.0);
00156 }
00157
00159 virtual double NormOne() const
00160 {
00161 return(-1.0);
00162 }
00163
00164 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
00165
00167 virtual int NumGlobalNonzeros() const
00168 {
00169 return(Matrix()->NumGlobalNonzeros());
00170 }
00171
00173 virtual int NumGlobalRows() const
00174 {
00175 return(Matrix()->NumGlobalRows());
00176 }
00177
00179 virtual int NumGlobalCols() const
00180 {
00181 return(Matrix()->NumGlobalCols());
00182 }
00183
00185 virtual int NumGlobalDiagonals() const
00186 {
00187 return(Matrix()->NumGlobalDiagonals());
00188 }
00189 #endif
00190
00192 virtual long long NumGlobalNonzeros64() const
00193 {
00194 return(Matrix()->NumGlobalNonzeros64());
00195 }
00196
00198 virtual long long NumGlobalRows64() const
00199 {
00200 return(Matrix()->NumGlobalRows64());
00201 }
00202
00204 virtual long long NumGlobalCols64() const
00205 {
00206 return(Matrix()->NumGlobalCols64());
00207 }
00208
00210 virtual long long NumGlobalDiagonals64() const
00211 {
00212 return(Matrix()->NumGlobalDiagonals64());
00213 }
00214
00216 virtual int NumMyNonzeros() const
00217 {
00218 return(Matrix()->NumMyNonzeros());
00219 }
00220
00222 virtual int NumMyRows() const
00223 {
00224 return(Matrix()->NumMyRows());
00225 }
00226
00228 virtual int NumMyCols() const
00229 {
00230 return(Matrix()->NumMyCols());
00231 }
00232
00234 virtual int NumMyDiagonals() const
00235 {
00236 return(Matrix()->NumMyDiagonals());
00237 }
00238
00240 virtual bool LowerTriangular() const
00241 {
00242 return(false);
00243 }
00244
00246 virtual bool UpperTriangular() const
00247 {
00248 return(false);
00249 }
00250
00252 virtual const Epetra_Map & RowMatrixRowMap() const
00253 {
00254 return(Matrix()->RowMatrixRowMap());
00255 }
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 }
00268
00270 int SetUseTranspose(bool UseTranspose_in)
00271 {
00272 return(Matrix()->SetUseTranspose(UseTranspose_in));
00273 }
00274
00276 bool UseTranspose() const
00277 {
00278 return(Matrix()->UseTranspose());
00279 }
00280
00282 bool HasNormInf() const
00283 {
00284 return(true);
00285 }
00286
00288 const Epetra_Comm & Comm() const
00289 {
00290 return(Matrix()->Comm());
00291 }
00292
00294 const Epetra_Map & OperatorDomainMap() const
00295 {
00296 return(Matrix()->OperatorDomainMap());
00297 }
00298
00300 const Epetra_Map & OperatorRangeMap() const
00301 {
00302 return(Matrix()->OperatorRangeMap());
00303 }
00304
00306 const Epetra_BlockMap& Map() const
00307 {
00308 return(Matrix()->Map());
00309 }
00310
00312 const char* Label() const{
00313 return(Label_);
00314 }
00315
00317 inline Teuchos::RefCountPtr<Epetra_RowMatrix> Matrix() const {
00318 return(A_);
00319 }
00320
00322 inline Teuchos::RefCountPtr<Ifpack_Reordering> Reordering() const {
00323 return(Reordering_);
00324 }
00325
00326 private:
00327
00329 Teuchos::RefCountPtr<Epetra_RowMatrix> A_;
00331 Teuchos::RefCountPtr<Ifpack_Reordering> Reordering_;
00332
00334 int NumMyRows_;
00336 int MaxNumEntries_;
00338 char Label_[80];
00339
00340 };
00341
00342
00343 #endif