44 using PrecPtr = std::shared_ptr<Dune::PreconditionerWithUpdate<Vector, Vector>>;
46 = Dune::Amg::AggregationCriterion<Dune::Amg::SymmetricDependency<Matrix, Dune::Amg::FirstDiagonal>>;
47 using Criterion = Dune::Amg::CoarsenCriterion<CriterionBase>;
51 template <
class Smoother>
52 static PrecPtr makeAmgPreconditioner(
const Operator& op,
54 bool useKamg =
false);
67 using Matrix =
typename Operator::matrix_type;
68 using Vector =
typename Operator::domain_type;
71 using PrecPtr = std::shared_ptr<Dune::PreconditionerWithUpdate<Vector, Vector>>;
75 const std::function<Vector()>&, std::size_t)>;
77 const std::function<Vector()>&, std::size_t,
const Comm&)>;
85 const std::function<Vector()>& weightsCalculator = {},
86 std::size_t pressureIndex = std::numeric_limits<std::size_t>::max());
95 const std::function<Vector()>& weightsCalculator,
const Comm& comm,
96 std::size_t pressureIndex = std::numeric_limits<std::size_t>::max());
104 std::size_t pressureIndex = std::numeric_limits<std::size_t>::max());
122 static void addCreator(
const std::string& type, ParCreator creator);
125 = Dune::Amg::AggregationCriterion<Dune::Amg::SymmetricDependency<Matrix, Dune::Amg::FirstDiagonal>>;
126 using Criterion = Dune::Amg::CoarsenCriterion<CriterionBase>;
139 const std::function<Vector()> weightsCalculator,
140 std::size_t pressureIndex);
143 const std::function<Vector()> weightsCalculator,
144 std::size_t pressureIndex,
const Comm& comm);
147 void doAddCreator(
const std::string& type,
Creator c);
150 void doAddCreator(
const std::string& type, ParCreator c);
153 std::map<std::string, Creator> creators_;
154 std::map<std::string, ParCreator> parallel_creators_;
155 bool defAdded_=
false;
static PrecPtr create(const Operator &op, const PropertyTree &prm, const std::function< Vector()> &weightsCalculator={}, std::size_t pressureIndex=std::numeric_limits< std::size_t >::max())
Create a new serial preconditioner and return a pointer to it.
Definition PreconditionerFactory_impl.hpp:702
std::function< PrecPtr(const Operator &, const PropertyTree &, const std::function< Vector()> &, std::size_t)> Creator
The type of creator functions passed to addCreator().
Definition PreconditionerFactory.hpp:75
static void addCreator(const std::string &type, Creator creator)
Add a creator for a serial preconditioner to the PreconditionerFactory.
Definition PreconditionerFactory_impl.hpp:734
std::shared_ptr< Dune::PreconditionerWithUpdate< Vector, Vector > > PrecPtr
The type of pointer returned by create().
Definition PreconditionerFactory.hpp:71