#include "Amesos_ConfigDefs.h"
#ifdef HAVE_MPI
#include "mpi.h"
#include "Epetra_MpiComm.h"
#else
#include "Epetra_SerialComm.h"
#endif
#include "Amesos.h"
#include "Epetra_RowMatrix.h"
#include "Epetra_MultiVector.h"
#include "Epetra_LinearProblem.h"
#include "Galeri_Maps.h"
#include "Galeri_CrsMatrices.h"
using namespace Teuchos;
using namespace Galeri;
int main(int argc, char *argv[])
{
#ifdef HAVE_MPI
MPI_Init(&argc, &argv);
#else
#endif
int nx = 100;
int NumVectors = 1;
GaleriList.
set(
"nx", nx);
GaleriList.
set(
"ny", ny);
Epetra_Map* Map = CreateMap(
"Cartesian2D", Comm, GaleriList);
std::string SolverType = "Klu";
Solver = Factory.
Create(SolverType, Problem);
if (Solver == 0) {
std::cerr << "Specified solver is not available" << std::endl;
#ifdef HAVE_MPI
MPI_Finalize();
#endif
return(EXIT_SUCCESS);
}
List.
set(
"PrintTiming",
true);
List.
set(
"PrintStatus",
true);
std::cout << "Starting symbolic factorization..." << std::endl;
std::cout << "Starting numeric factorization..." << std::endl;
std::cout << "Starting solution phase..." << std::endl;
delete Solver;
delete Matrix;
delete Map;
#ifdef HAVE_MPI
MPI_Finalize();
#endif
return(EXIT_SUCCESS);
}