32 #include "Epetra_MpiComm.h"
34 #include "Epetra_SerialComm.h"
36 #include "Epetra_CrsMatrix.h"
37 #include "Epetra_MultiVector.h"
38 #include "Epetra_LinearProblem.h"
39 #include "Galeri_Maps.h"
40 #include "Galeri_CrsMatrices.h"
41 #include "Teuchos_ParameterList.hpp"
42 #include "Teuchos_RefCountPtr.hpp"
50 int main(
int argc,
char *argv[])
54 MPI_Init(&argc,&argv);
64 GaleriList.
set(
"nx", nx);
66 GaleriList.
set(
"mx", 1);
68 Teuchos::RefCountPtr<Epetra_Map> Map =
Teuchos::rcp( Galeri::CreateMap64(
"Cartesian2D", Comm, GaleriList) );
69 Teuchos::RefCountPtr<Epetra_RowMatrix>
A =
Teuchos::rcp( Galeri::CreateCrsMatrix(
"Laplace2D", &*Map, GaleriList) );
96 int OverlapBlocks = 0;
105 List.
set(
"relaxation: type",
"symmetric Gauss-Seidel");
106 List.
set(
"partitioner: overlap", OverlapBlocks);
107 #ifdef HAVE_IFPACK_METIS
110 List.
set(
"partitioner: type",
"metis");
113 List.
set(
"partitioner: type",
"greedy");
118 List.
set(
"partitioner: local parts", 4);
150 Solver.SetAztecOption(AZ_solver,AZ_cg);
151 Solver.SetAztecOption(AZ_output,32);
154 Solver.SetPrecOperator(&Prec);
159 Solver.Iterate(1550,1e-5);
165 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)