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) {
90 cout <<
"TIME = " << Time.ElapsedTime() << endl;
96 double* Values,
int* Indices)
const
102 if (
pos_[MyRow] != -1)
121 Y[v][i] +=
val_[i] * X[v][i];
#define IFPACK_CHK_ERR(ifpack_err)
std::vector< double > val_
Stores as additional diagonal contribution due to the filter.
double RelativeThreshold_
Multiplies A(i,i) by this value.
const Epetra_Comm & Comm() const
std::vector< int > pos_
Stores the position of the diagonal element, or -1 if not present.
Ifpack_DiagonalFilter(const Teuchos::RefCountPtr< Epetra_RowMatrix > &Matrix, double AbsoluteThreshold, double RelativeThreshold)
Constructor.
virtual int Multiply(bool TransA, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Teuchos::RefCountPtr< Epetra_RowMatrix > A_
Pointer to the matrix to be filtered.
virtual int MaxNumEntries() const
Returns the maximum number of entries.
double AbsoluteThreshold_
This value (times the sgn(A(i,i)) is added to the diagonal elements.
virtual int ExtractMyRowCopy(int MyRow, int Length, int &NumEntries, double *Values, int *Indices) const
virtual int NumMyRows() const