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 "Epetra_Time.h"
53 #include "Galeri_Maps.h"
54 #include "Galeri_CrsMatrices.h"
55 #include "Teuchos_ParameterList.hpp"
56 #include "Teuchos_RefCountPtr.hpp"
61 int main(
int argc,
char *argv[])
66 MPI_Init(&argc,&argv);
76 GaleriList.
set(
"nx", nx);
78 GaleriList.
set(
"mx", 1);
80 Teuchos::RefCountPtr<Epetra_Map> Map =
Teuchos::rcp( Galeri::CreateMap(
"Cartesian2D", Comm, GaleriList) );
81 Teuchos::RefCountPtr<Epetra_RowMatrix>
A =
Teuchos::rcp( Galeri::CreateCrsMatrix(
"Laplace2D", &*Map, GaleriList) );
100 List.
set(
"fact: ict level-of-fill", 1.0);
102 List.
set(
"fact: absolute threshold", 0.0);
103 List.
set(
"fact: relative threshold", 1.0);
104 List.
set(
"fact: relaxation value", 0.0);
109 List.
set(
"schwarz: filter singletons",
true);
143 Solver.SetAztecOption(AZ_solver,AZ_cg_condnum);
144 Solver.SetAztecOption(AZ_output,32);
147 Solver.SetPrecOperator(&Prec);
152 Solver.Iterate(1550,1e-5);
161 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)