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
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 #ifndef IFPACK_REORDERFILTER_H
00044 #define IFPACK_REORDERFILTER_H
00045
00046 #include "Ifpack_ConfigDefs.h"
00047 #include "Epetra_RowMatrix.h"
00048 #include "Teuchos_RefCountPtr.hpp"
00049
00050 class Epetra_Comm;
00051 class Epetra_Map;
00052 class Epetra_MultiVector;
00053 class Epetra_Import;
00054 class Epetra_BlockMap;
00055 class Ifpack_Reordering;
00056
00058
00081 class Ifpack_ReorderFilter : public virtual Epetra_RowMatrix {
00082
00083 public:
00084
00085 Ifpack_ReorderFilter(const Teuchos::RefCountPtr<Epetra_RowMatrix>& Matrix_in,
00086 const Teuchos::RefCountPtr<Ifpack_Reordering>& Reordering_in);
00087
00089 Ifpack_ReorderFilter(const Ifpack_ReorderFilter& RHS);
00090
00092 virtual ~Ifpack_ReorderFilter() {};
00093
00095 Ifpack_ReorderFilter& operator=(const Ifpack_ReorderFilter& RHS);
00096
00098 virtual inline int NumMyRowEntries(int MyRow, int & NumEntries) const
00099 {
00100 return(Matrix()->NumMyRowEntries(MyRow, NumEntries));
00101 }
00102
00104 virtual int MaxNumEntries() const
00105 {
00106 return(MaxNumEntries_);
00107 }
00108
00109
00110 virtual int ExtractMyRowCopy(int MyRow, int Length, int & NumEntries, double *Values, int * Indices) const;
00111
00113 virtual int ExtractDiagonalCopy(Epetra_Vector & Diagonal) const;
00114
00116 virtual int Multiply(bool TransA, const Epetra_MultiVector& X,
00117 Epetra_MultiVector& Y) const;
00118
00120 virtual int Solve(bool Upper, bool Trans, bool UnitDiagonal,
00121 const Epetra_MultiVector& X,
00122 Epetra_MultiVector& Y) const;
00123
00125 virtual int Apply(const Epetra_MultiVector& X,
00126 Epetra_MultiVector& Y) const;
00127
00129 virtual int ApplyInverse(const Epetra_MultiVector& X,
00130 Epetra_MultiVector& Y) const
00131 {
00132 return(-1);
00133 }
00134
00136 virtual int InvRowSums(Epetra_Vector& x) const
00137 {
00138 return(-1);
00139 }
00140
00142 virtual int LeftScale(const Epetra_Vector& x)
00143 {
00144 return(-1);
00145 }
00146
00148 virtual int InvColSums(Epetra_Vector& x) const
00149 {
00150 return(-1);
00151 }
00152
00154 virtual int RightScale(const Epetra_Vector& x)
00155 {
00156 return(-1);
00157 }
00158
00160 virtual bool Filled() const
00161 {
00162 return(Matrix()->Filled());
00163 }
00164
00166 virtual double NormInf() const
00167 {
00168 return(-1.0);
00169 }
00170
00172 virtual double NormOne() const
00173 {
00174 return(-1.0);
00175 }
00176
00177 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
00178
00180 virtual int NumGlobalNonzeros() const
00181 {
00182 return(Matrix()->NumGlobalNonzeros());
00183 }
00184
00186 virtual int NumGlobalRows() const
00187 {
00188 return(Matrix()->NumGlobalRows());
00189 }
00190
00192 virtual int NumGlobalCols() const
00193 {
00194 return(Matrix()->NumGlobalCols());
00195 }
00196
00198 virtual int NumGlobalDiagonals() const
00199 {
00200 return(Matrix()->NumGlobalDiagonals());
00201 }
00202 #endif
00203
00205 virtual long long NumGlobalNonzeros64() const
00206 {
00207 return(Matrix()->NumGlobalNonzeros64());
00208 }
00209
00211 virtual long long NumGlobalRows64() const
00212 {
00213 return(Matrix()->NumGlobalRows64());
00214 }
00215
00217 virtual long long NumGlobalCols64() const
00218 {
00219 return(Matrix()->NumGlobalCols64());
00220 }
00221
00223 virtual long long NumGlobalDiagonals64() const
00224 {
00225 return(Matrix()->NumGlobalDiagonals64());
00226 }
00227
00229 virtual int NumMyNonzeros() const
00230 {
00231 return(Matrix()->NumMyNonzeros());
00232 }
00233
00235 virtual int NumMyRows() const
00236 {
00237 return(Matrix()->NumMyRows());
00238 }
00239
00241 virtual int NumMyCols() const
00242 {
00243 return(Matrix()->NumMyCols());
00244 }
00245
00247 virtual int NumMyDiagonals() const
00248 {
00249 return(Matrix()->NumMyDiagonals());
00250 }
00251
00253 virtual bool LowerTriangular() const
00254 {
00255 return(false);
00256 }
00257
00259 virtual bool UpperTriangular() const
00260 {
00261 return(false);
00262 }
00263
00265 virtual const Epetra_Map & RowMatrixRowMap() const
00266 {
00267 return(Matrix()->RowMatrixRowMap());
00268 }
00269
00271 virtual const Epetra_Map & RowMatrixColMap() const
00272 {
00273 return(Matrix()->RowMatrixColMap());
00274 }
00275
00277 virtual const Epetra_Import * RowMatrixImporter() const
00278 {
00279 return(Matrix()->RowMatrixImporter());
00280 }
00281
00283 int SetUseTranspose(bool UseTranspose_in)
00284 {
00285 return(Matrix()->SetUseTranspose(UseTranspose_in));
00286 }
00287
00289 bool UseTranspose() const
00290 {
00291 return(Matrix()->UseTranspose());
00292 }
00293
00295 bool HasNormInf() const
00296 {
00297 return(true);
00298 }
00299
00301 const Epetra_Comm & Comm() const
00302 {
00303 return(Matrix()->Comm());
00304 }
00305
00307 const Epetra_Map & OperatorDomainMap() const
00308 {
00309 return(Matrix()->OperatorDomainMap());
00310 }
00311
00313 const Epetra_Map & OperatorRangeMap() const
00314 {
00315 return(Matrix()->OperatorRangeMap());
00316 }
00317
00319 const Epetra_BlockMap& Map() const
00320 {
00321 return(Matrix()->Map());
00322 }
00323
00325 const char* Label() const{
00326 return(Label_);
00327 }
00328
00330 inline Teuchos::RefCountPtr<Epetra_RowMatrix> Matrix() const {
00331 return(A_);
00332 }
00333
00335 inline Teuchos::RefCountPtr<Ifpack_Reordering> Reordering() const {
00336 return(Reordering_);
00337 }
00338
00339 private:
00340
00342 Teuchos::RefCountPtr<Epetra_RowMatrix> A_;
00344 Teuchos::RefCountPtr<Ifpack_Reordering> Reordering_;
00345
00347 int NumMyRows_;
00349 int MaxNumEntries_;
00351 char Label_[80];
00352
00353 };
00354
00355
00356 #endif