45 #include "Epetra_MpiComm.h"
47 #include "Epetra_SerialComm.h"
49 #include "Epetra_CrsMatrix.h"
50 #include "Epetra_MultiVector.h"
51 #include "Epetra_LinearProblem.h"
52 #include "Galeri_Maps.h"
53 #include "Galeri_CrsMatrices.h"
54 #include "Teuchos_ParameterList.hpp"
55 #include "Teuchos_RefCountPtr.hpp"
63 int main(
int argc,
char *argv[])
67 MPI_Init(&argc,&argv);
77 GaleriList.
set(
"nx", nx);
79 GaleriList.
set(
"mx", 1);
81 Teuchos::RefCountPtr<Epetra_Map> Map =
Teuchos::rcp( Galeri::CreateMap(
"Cartesian2D", Comm, GaleriList) );
82 Teuchos::RefCountPtr<Epetra_RowMatrix>
A =
Teuchos::rcp( Galeri::CreateCrsMatrix(
"Laplace2D", &*Map, GaleriList) );
108 int OverlapProcs = 2;
109 int OverlapBlocks = 0;
118 List.
set(
"relaxation: type",
"symmetric Gauss-Seidel");
119 List.
set(
"partitioner: overlap", OverlapBlocks);
120 #ifdef HAVE_IFPACK_METIS
123 List.
set(
"partitioner: type",
"metis");
126 List.
set(
"partitioner: type",
"greedy");
131 List.
set(
"partitioner: local parts", 4);
163 Solver.SetAztecOption(AZ_solver,AZ_cg);
164 Solver.SetAztecOption(AZ_output,32);
167 Solver.SetPrecOperator(&Prec);
172 Solver.Iterate(1550,1e-5);
178 return(EXIT_SUCCESS);
ParameterList & set(std::string const &name, T &&value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
virtual int Initialize()
Initialized the preconditioner.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Ifpack_AdditiveSchwarz: a class to define Additive Schwarz preconditioners of Epetra_RowMatrix's.
int main(int argc, char *argv[])
virtual int SetParameters(Teuchos::ParameterList &List)
Sets the parameters.
virtual int Compute()
Computes the preconditioner.
#define IFPACK_CHK_ERR(ifpack_err)