#include "ml_include.h"
#if defined(HAVE_ML_EPETRA) && defined(HAVE_ML_AZTECOO) && defined(HAVE_ML_TEUCHOS) && defined(HAVE_ML_GALERI)
#ifdef HAVE_MPI
#include "mpi.h"
#include "Epetra_MpiComm.h"
#else
#include "Epetra_SerialComm.h"
#endif
#include "Epetra_Map.h"
#include "Epetra_Vector.h"
#include "Epetra_CrsMatrix.h"
#include "Epetra_LinearProblem.h"
#include "Galeri_Maps.h"
#include "Galeri_CrsMatrices.h"
#include "Galeri_Utils.h"
using namespace Teuchos;
using namespace Galeri;
int main(int argc, char *argv[])
{
#ifdef HAVE_MPI
MPI_Init(&argc,&argv);
#else
#endif
int nx = 28;
GaleriList.
set(
"nx", nx);
GaleriList.
set(
"ny", ny);
Epetra_Map* Map = CreateMap(
"Cartesian2D", Comm, GaleriList);
MLList.
set(
"aggregation: type",
"Uncoupled");
MLList.
set(
"smoother: type",
"symmetric Gauss-Seidel");
int NumPreCycles = 5;
int NumPostCycles = 1;
int NumMLCycles = 10;
delete MLPrec;
delete A;
delete Map;
#ifdef HAVE_MPI
MPI_Finalize() ;
#endif
return(EXIT_SUCCESS);
}
#else
#include <stdlib.h>
#include <stdio.h>
#ifdef HAVE_MPI
#include "mpi.h"
#endif
int main(int argc, char *argv[])
{
#ifdef HAVE_MPI
MPI_Init(&argc,&argv);
#endif
puts("Please configure ML with:");
puts("--enable-epetra");
puts("--enable-teuchos");
puts("--enable-galeri");
puts("--enable-aztecoo");
#ifdef HAVE_MPI
MPI_Finalize();
#endif
return 0;
}
#endif