32 #include "Epetra_MpiComm.h" 34 #include "Epetra_SerialComm.h" 36 #include "Epetra_CrsMatrix.h" 37 #include "Epetra_Map.h" 51 for (
int i = 0 ; i <
size_ ; ++i)
83 int main(
int argc,
char *argv[])
87 MPI_Init(&argc,&argv);
88 Epetra_MpiComm Comm(MPI_COMM_WORLD);
90 Epetra_SerialComm Comm;
93 if (Comm.NumProc() != 1)
95 std::cerr <<
"This example can be run with one processor only!" << std::endl;
103 Epetra_Map Map(NumMyRows, 0, Comm);
104 Epetra_CrsMatrix A(Copy, Map, 0);
110 A.InsertGlobalValues(0, 1, &val, &col);
113 A.InsertGlobalValues(0, 1, &val, &col);
116 A.InsertGlobalValues(1, 1, &val, &col);
119 A.InsertGlobalValues(1, 1, &val, &col);
122 A.InsertGlobalValues(1, 1, &val, &col);
125 A.InsertGlobalValues(2, 1, &val, &col);
128 A.InsertGlobalValues(2, 1, &val, &col);
131 A.InsertGlobalValues(2, 1, &val, &col);
134 A.InsertGlobalValues(3, 1, &val, &col);
137 A.InsertGlobalValues(3, 1, &val, &col);
146 std::cout <<
"INFO(1) = " << MC64.GetINFO(1) << std::endl;
150 int* CPERM = MC64.GetCPERM();
151 double* DW = MC64.GetDW();
153 for (
int i = 0 ; i < A.NumMyRows() ; ++i)
154 std::cout <<
"CPERM[" << i <<
"] = " << CPERM[i] << std::endl;
156 for (
int i = 0 ; i < A.NumMyRows() * 2 ; ++i)
157 std::cout <<
"DW[" << i <<
"] = " << DW[i] << std::endl;
167 return(EXIT_SUCCESS);
int main(int argc, char *argv[])
int Apply(double *x, double *y)
Ifpack_ReorderOperator(const int size, int *perm, double *scale)
Interface to MC64, reordering and scaling algorithm.