46 #include "Epetra_MpiComm.h" 48 #include "Epetra_SerialComm.h" 50 #include "Epetra_Comm.h" 51 #include "Epetra_Map.h" 52 #include "Epetra_MultiVector.h" 53 #include "Epetra_CrsMatrix.h" 66 bool UseTranspose =
true;
76 LHS_exact.Random(); LHS.PutScalar(0.0);
78 A.Multiply(UseTranspose, LHS_exact,
RHS);
80 Prec.ApplyInverse(
RHS, LHS);
82 LHS.Update(1.0, LHS_exact, -1.0);
90 cout << what <<
": Test failed: norm = " << norm[0] << endl;
94 cout << what <<
": Test passed: norm = " << norm[0] << endl;
101 int main(
int argc,
char *argv[])
104 MPI_Init(&argc,&argv);
112 cerr <<
"To be run with one processor only" << endl;
125 for (
int row = 0; row < 8; ++row)
127 double value = 2.0 + row;
128 A.InsertGlobalValues(row, 1, &value, &row);
133 A.InsertGlobalValues(row, 1, &value, &col);
140 A.InsertGlobalValues(row, 1, &value, &col);
147 Test<Ifpack_ILU>(
"Ifpack_ILU",
A);
148 Test<Ifpack_ILUT>(
"Ifpack_ILUT",
A);
149 Test<Ifpack_AdditiveSchwarz<Ifpack_ILU> >(
"AS, Ifpack_ILU",
A);
150 Test<Ifpack_AdditiveSchwarz<Ifpack_ILUT> >(
"AS, Ifpack_ILUT",
A);
156 return(EXIT_SUCCESS);
#define IFPACK_CHK_ERRV(ifpack_err)
int main(int argc, char *argv[])
int NumGlobalElements() const
void Test(const std::string what, Epetra_RowMatrix &A)