45 #include "Epetra_ConfigDefs.h" 46 #include "Epetra_RowMatrix.h" 47 #include "Epetra_Comm.h" 48 #include "Epetra_Map.h" 49 #include "Epetra_MultiVector.h" 50 #include "Epetra_Vector.h" 54 double AbsoluteThreshold,
55 double RelativeThreshold) :
57 AbsoluteThreshold_(AbsoluteThreshold),
58 RelativeThreshold_(RelativeThreshold)
72 for (
int MyRow = 0 ; MyRow <
NumMyRows() ; ++MyRow) {
77 &Values[0], &Indices[0]);
81 for (
int i = 0 ; i < NumEntries ; ++i) {
82 if (Indices[i] == MyRow) {
96 double* Values,
int* Indices)
const 102 if (
pos_[MyRow] != -1)
121 Y[v][i] +=
val_[i] * X[v][i];
std::vector< int > pos_
Stores the position of the diagonal element, or -1 if not present.
Teuchos::RefCountPtr< Epetra_RowMatrix > A_
Pointer to the matrix to be filtered.
virtual int MaxNumEntries() const
Returns the maximum number of entries.
double RelativeThreshold_
Multiplies A(i,i) by this value.
virtual int Multiply(bool TransA, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
virtual int ExtractMyRowCopy(int MyRow, int Length, int &NumEntries, double *Values, int *Indices) const
virtual int NumMyRows() const
const Epetra_Comm & Comm() const
Ifpack_DiagonalFilter(const Teuchos::RefCountPtr< Epetra_RowMatrix > &Matrix, double AbsoluteThreshold, double RelativeThreshold)
Constructor.
double AbsoluteThreshold_
This value (times the sgn(A(i,i)) is added to the diagonal elements.
#define IFPACK_CHK_ERR(ifpack_err)
std::vector< double > val_
Stores as additional diagonal contribution due to the filter.
double ElapsedTime(void) const