24 #include <MueLu_CreateTpetraPreconditioner.hpp>
26 template <
class Level>
28 : prec_mp(Teuchos::null)
34 template <
class Level>
38 typedef Tpetra::Operator<scalar_t, lo_t, go_t, amr::node_t> TpetraOperator_t;
39 Teuchos::RCP<TpetraOperator_t> At = Teuchos::rcp_dynamic_cast<TpetraOperator_t>(A);
40 prec_mp = MueLu::CreateTpetraPreconditioner(At, params_m);
44 template <
class Level>
50 template <
class Level>
56 template <
class Level>
60 std::map<std::string, std::string> map;
67 auto muelu = map.find(reuse);
69 if ( muelu == map.end() )
70 throw OpalException(
"MueLuPreconditioner::convertToMueLuReuseOption()",
71 "No MueLu reuse option '" + reuse +
"'.");
77 template <
class Level>
79 params_m.set(
"problem: type",
"Poisson-3D");
80 params_m.set(
"verbosity",
"none");
81 params_m.set(
"number of equations", 1);
82 params_m.set(
"max levels", 8);
83 params_m.set(
"cycle type",
"V");
85 params_m.set(
"coarse: max size", 200);
86 params_m.set(
"multigrid algorithm",
"sa");
87 params_m.set(
"sa: damping factor", 1.33);
88 params_m.set(
"sa: use filtered matrix",
true);
89 params_m.set(
"filtered matrix: reuse eigenvalue",
false);
91 params_m.set(
"repartition: enable",
false);
92 params_m.set(
"repartition: rebalance P and R",
false);
93 params_m.set(
"repartition: partitioner",
"zoltan2");
94 params_m.set(
"repartition: min rows per proc", 800);
95 params_m.set(
"repartition: start level", 2);
97 Teuchos::ParameterList reparms;
98 reparms.set(
"algorithm",
"multijagged");
101 params_m.set(
"repartition: params", reparms);
104 params_m.set(
"smoother: type",
"CHEBYSHEV");
105 params_m.set(
"smoother: pre or post",
"both");
106 Teuchos::ParameterList smparms;
107 smparms.set(
"chebyshev: degree", 3);
108 smparms.set(
"chebyshev: assume matrix does not change",
false);
109 smparms.set(
"chebyshev: zero starting solution",
true);
110 params_m.set(
"smoother: params", smparms);
112 params_m.set(
"smoother: type",
"CHEBYSHEV");
113 params_m.set(
"smoother: pre or post",
"both");
115 params_m.set(
"coarse: type",
"KLU2");
117 params_m.set(
"aggregation: type",
"uncoupled");
118 params_m.set(
"aggregation: min agg size", 3);
119 params_m.set(
"aggregation: max agg size", 27);
121 params_m.set(
"transpose: use implicit",
false);
123 params_m.set(
"reuse: type", reuse);
@ SA
smoothed aggregation multigrid
static std::string convertToMueLuReuseOption(const std::string &reuse)
void init_m(const std::string &reuse)
void create(const Teuchos::RCP< amr::matrix_t > &A, Level *level_p=nullptr)
MueLuPreconditioner(const std::string &reuse)
std::map< std::string, Preconditioner > map_t
static void fillMap(map_t &map)
Teuchos::RCP< amr::operator_t> get()
The base class for all OPAL exceptions.