45#include "Epetra_MultiVector.h"
46#include "Epetra_Vector.h"
47#include "Epetra_RowMatrix.h"
48#include "Epetra_Map.h"
49#include "Epetra_BlockMap.h"
60 sprintf(
Label_,
"%s",
"Ifpack_LocalFilter");
71#if !defined(EPETRA_NO_32BIT_GLOBAL_INDICES) || !defined(EPETRA_NO_64BIT_GLOBAL_INDICES)
103 int ActualMaxNumEntries = 0;
105 for (
int i = 0 ; i <
NumRows_ ; ++i) {
111 for (
int j = 0 ; j < Nnz ; ++j) {
118 if (NewNnz > ActualMaxNumEntries)
119 ActualMaxNumEntries = NewNnz;
132 double *Values,
int * Indices)
const
134 if ((MyRow < 0) || (MyRow >=
NumRows_)) {
153 for (
int j = 0 ; j < Nnz ; ++j) {
157 Values[NumEntries] =
Values_[j];
190 for (
int i = 0 ; i <
NumRows_ ; ++i) {
197 for (
int j = 0 ; j < Nnz ; ++j) {
#define IFPACK_CHK_ERR(ifpack_err)
#define IFPACK_CHK_ERRV(ifpack_err)
bool SameAs(const Epetra_BlockMap &Map) const
const Epetra_BlockMap & Map() const
int ExtractView(double **A, int *MyLDA) const
int PutScalar(double ScalarConstant)
Teuchos::RefCountPtr< Epetra_SerialComm > SerialComm_
Communicator containing this process only.
std::vector< int > NumEntries_
NumEntries_[i] contains the nonzero entries in row āiā.
const Epetra_BlockMap & Map() const
Teuchos::RefCountPtr< const Epetra_RowMatrix > Matrix_
Pointer to the matrix to be preconditioned.
std::vector< int > Indices_
Used in ExtractMyRowCopy, to avoid allocation each time.
Ifpack_LocalFilter(const Teuchos::RefCountPtr< const Epetra_RowMatrix > &Matrix)
Constructor.
virtual int ApplyInverse(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
int NumNonzeros_
Number of nonzeros in the local matrix.
Teuchos::RefCountPtr< Epetra_Map > Map_
Map based on SerialComm_, containing the local rows only.
char Label_[80]
Label for this object.
int MaxNumEntriesA_
Maximum number of nonzero entries in a row for Matrix_.
virtual int ExtractDiagonalCopy(Epetra_Vector &Diagonal) const
Returns a copy of the main diagonal in a user-provided vector.
int NumRows_
Number of rows in the local matrix.
virtual int ExtractMyRowCopy(int MyRow, int Length, int &NumEntries, double *Values, int *Indices) const
Returns a copy of the specified local row in user-provided arrays.
std::vector< double > Values_
Used in ExtractMyRowCopy, to avoid allocation each time.
int MaxNumEntries_
Maximum number of nonzero entries in a row for the filtered matrix.
virtual int Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Teuchos::RefCountPtr< Epetra_Vector > Diagonal_