38 using M =
typename Traits::M;
39 using X =
typename Traits::X;
40 using Y =
typename Traits::Y;
42 template <
class Precon>
46 using FTraits = Dune::FieldTraits<typename M::field_type>;
52 Map::addCreator(
"diag", jacobi);
53 Map::addCreator(
"jacobi", jacobi);
56 Map::addCreator(
"gs", gs);
57 Map::addCreator(
"gauss_seidel", gs);
60 Map::addCreator(
"sor", sor);
63 Map::addCreator(
"ssor", ssor);
65 init_ilu(std::is_arithmetic<typename FTraits::field_type>{});
68 init_amg(std::is_same<typename FTraits::real_type, double>{});
72 Map::addCreator(
"richardson", richardson);
73 Map::addCreator(
"default", richardson);
76 Map::addCreator(
"solver", solver);
78 init_bjacobi(
Types<TYPEOF(std::declval<typename Traits::Comm>().impl())>{}, Dune::PriorityTag<10>{});
81 static void init_ilu(std::false_type)
83 warning(
"ILU preconditioners not created for the matrix with field_type = {}.",
84 Dune::className<typename FTraits::field_type>());
87 static void init_ilu(std::true_type)
90 Map::addCreator(
"ilu", ilu);
91 Map::addCreator(
"ilu0", ilu);
94 Map::addCreator(
"ildl", ildl);
97 static void init_amg(std::false_type)
99 warning(
"AMG preconditioners not created for the matrix with real_type = {}.",
100 Dune::className<typename FTraits::real_type>());
104 static void init_amg(std::true_type)
107 Map::addCreator(
"amg", amg);
109 Map::addCreator(
"fastamg", fastamg);
111 Map::addCreator(
"kamg", kamg);
117 template <
class Comm>
118 static void init_bjacobi(
Types<Comm>, Dune::PriorityTag<1>)
121 Map::addCreator(
"pssor", pssor);
124 Map::addCreator(
"bjacobi", bjacobi);