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 "Epetra_Time.h"
40 #include "Galeri_Maps.h"
41 #include "Galeri_CrsMatrices.h"
42 #include "Teuchos_ParameterList.hpp"
43 #include "Teuchos_RefCountPtr.hpp"
48 int main(
int argc,
char *argv[])
53 MPI_Init(&argc,&argv);
63 GaleriList.
set(
"nx", nx);
65 GaleriList.
set(
"mx", 1);
67 Teuchos::RefCountPtr<Epetra_Map> Map =
Teuchos::rcp( Galeri::CreateMap64(
"Cartesian2D", Comm, GaleriList) );
68 Teuchos::RefCountPtr<Epetra_RowMatrix>
A =
Teuchos::rcp( Galeri::CreateCrsMatrix(
"Laplace2D", &*Map, GaleriList) );
87 List.
set(
"fact: ict level-of-fill", 1.0);
89 List.
set(
"fact: absolute threshold", 0.0);
90 List.
set(
"fact: relative threshold", 1.0);
91 List.
set(
"fact: relaxation value", 0.0);
96 List.
set(
"schwarz: filter singletons",
true);
130 Solver.SetAztecOption(AZ_solver,AZ_cg_condnum);
131 Solver.SetAztecOption(AZ_output,32);
134 Solver.SetPrecOperator(&Prec);
139 Solver.Iterate(1550,1e-5);
148 return (EXIT_SUCCESS);
ParameterList & set(std::string const &name, T const &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)