#include "ml_include.h"
#if defined(HAVE_ML_EPETRA) && defined(HAVE_ML_TEUCHOS) && defined(HAVE_ML_GALERI) && defined(HAVE_ML_AZTECOO)
#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_VbrMatrix.h"
#include "Epetra_LinearProblem.h"
#include "AztecOO.h"
#include "Galeri_Maps.h"
#include "Galeri_CrsMatrices.h"
#include "Galeri_VbrMatrices.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 NumPDEEqns = 5;
  int nx = 32;
  GaleriList.
set(
"nx", nx);
  Epetra_Map* Map = CreateMap(
"Cartesian2D", Comm, GaleriList);
 
  AztecOO solver(Problem);
  
  
  
  
  
  
                                                         GaleriList);
  double* x_coord = (*Coord)[0];
  double* y_coord = (*Coord)[1];
  
  
  int *options    = new int[AZ_OPTIONS_SIZE];
  double *params  = new double[AZ_PARAMS_SIZE];
  
  
  
  
  
  
  MLList.
set(
"max levels",3);
  MLList.
set(
"increasing or decreasing",
"increasing");
  MLList.
set(
"smoother: type", 
"symmetric Gauss-Seidel");
  
  
  
  MLList.
set(
"aggregation: type", 
"Uncoupled");
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  MLList.
set(
"viz: output format", 
"vtk");
  MLList.
set(
"viz: enable", 
true);
  MLList.
set(
"x-coordinates", x_coord);
  MLList.
set(
"y-coordinates", y_coord);
  MLList.
set(
"z-coordinates", (
double *)0);
  MLList.
set(
"viz: print starting solution", 
true);
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  delete MLPrec;
  delete [] options;
  delete [] params;
  delete A;
  delete Coord;
  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-aztecoo");
  puts("--enable-galeri");
#ifdef HAVE_MPI
  MPI_Finalize();
#endif
  return(EXIT_SUCCESS);
}
#endif