25 : prec_mp(Teuchos::null)
35 Ifpack2::Factory factory;
37 prec_mp = factory.create(prectype_m, A.getConst());
38 prec_mp->setParameters(*params_mp);
39 prec_mp->initialize();
65 params_mp = Teuchos::parameterList();
72 params_mp->set(
"fact: ilut level-of-fill", 5.0);
73 params_mp->set(
"fact: drop tolerance", 0.0);
77 prectype_m =
"CHEBYSHEV";
78 params_mp->set(
"chebyshev: degree", 1);
82 params_mp->set(
"fact: iluk level-of-fill", 0);
83 params_mp->set(
"fact: relax value", 0.0);
84 params_mp->set(
"fact: absolute threshold", 0.0);
85 params_mp->set(
"fact: relative threshold", 1.0);
88 prectype_m =
"RELAXATION";
89 params_mp->set(
"relaxation: type",
"Jacobi");
90 params_mp->set(
"relaxation: sweeps", 12);
91 params_mp->set(
"relaxation: zero starting solution",
false);
92 params_mp->set(
"relaxation: damping factor", 6.0 / 7.0);
93 params_mp->set(
"relaxation: use l1",
true);
94 params_mp->set(
"relaxation: l1 eta", 1.5);
95 params_mp->set(
"relaxation: backward mode",
false);
96 params_mp->set(
"relaxation: fix tiny diagonal entries",
true);
97 params_mp->set(
"relaxation: min diagonal value", 1.0e-5);
98 params_mp->set(
"relaxation: check diagonal entries",
true);
101 prectype_m =
"BLOCK_RELAXATION";
102 params_mp->set(
"relaxation: type",
"Jacobi");
103 params_mp->set(
"relaxation: sweeps", 12);
104 params_mp->set(
"relaxation: zero starting solution",
false);
105 params_mp->set(
"relaxation: damping factor", 6.0 / 7.0);
106 params_mp->set(
"relaxation: backward mode",
false);
108 params_mp->set(
"partitioner: type",
"linear");
109 params_mp->set(
"partitioner: overlap", 0);
110 params_mp->set(
"partitioner: local parts", 1);
114 prectype_m =
"RELAXATION";
115 params_mp->set(
"relaxation: type",
"Gauss-Seidel");
116 params_mp->set(
"relaxation: sweeps", 12);
117 params_mp->set(
"relaxation: zero starting solution",
false);
118 params_mp->set(
"relaxation: damping factor", 1.0);
119 params_mp->set(
"relaxation: use l1",
true);
120 params_mp->set(
"relaxation: l1 eta", 1.5);
121 params_mp->set(
"relaxation: backward mode",
false);
122 params_mp->set(
"relaxation: fix tiny diagonal entries",
true);
123 params_mp->set(
"relaxation: min diagonal value", 1.0e-5);
124 params_mp->set(
"relaxation: check diagonal entries",
true);
127 prectype_m =
"BLOCK_RELAXATION";
128 params_mp->set(
"relaxation: type",
"Gauss-Seidel");
129 params_mp->set(
"relaxation: sweeps", 12);
130 params_mp->set(
"relaxation: zero starting solution",
false);
131 params_mp->set(
"relaxation: damping factor", 6.0 / 7.0);
132 params_mp->set(
"relaxation: backward mode",
false);
134 params_mp->set(
"partitioner: type",
"linear");
135 params_mp->set(
"partitioner: overlap", 0);
136 params_mp->set(
"partitioner: local parts", 1);
138 case Preconditioner::NONE:
143 "This type of Ifpack2 preconditioner not supported.");
@ GS
Gauss-Seidel point relaxation.
@ JACOBI
Jacobi point relaxation.
@ BLOCK_JACOBI
Jacobi block relaxation.
@ BLOCK_GS
Gauss-Seidel block relaxation.
Ifpack2Preconditioner(Preconditioner prec)
void create(const Teuchos::RCP< amr::matrix_t > &A, Level *level_p=nullptr)
std::map< std::string, Preconditioner > map_t
static void fillMap(map_t &map)
Teuchos::RCP< amr::operator_t> get()
void init_m(Preconditioner prec)
The base class for all OPAL exceptions.