4#ifndef DUNE_ISTL_SOLVERREGISTRY_HH
5#define DUNE_ISTL_SOLVERREGISTRY_HH
11#define DUNE_REGISTER_DIRECT_SOLVER(name, ...) \
12 DUNE_REGISTRY_PUT(DirectSolverTag, name, __VA_ARGS__)
14#define DUNE_REGISTER_PRECONDITIONER(name, ...) \
15 DUNE_REGISTRY_PUT(PreconditionerTag, name, __VA_ARGS__)
17#define DUNE_REGISTER_ITERATIVE_SOLVER(name, ...) \
18 DUNE_REGISTRY_PUT(IterativeSolverTag, name, __VA_ARGS__)
26 struct DirectSolverTag {};
27 struct PreconditionerTag {};
28 struct IterativeSolverTag {};
30 template<
template<
class,
class,
class,
int>
class Preconditioner,
int blockLevel=1>
38 = std::make_shared<Preconditioner<Matrix, Domain, Range, blockLevel>>(matrix, config);
39 return preconditioner;
43 template<
template<
class,
class,
class>
class Preconditioner>
51 = std::make_shared<Preconditioner<Matrix, Domain, Range>>(matrix, config);
52 return preconditioner;
56 template<
template<
class...>
class Solver>
58 return [](
auto typeList,
59 const auto& linearOperator,
60 const auto& scalarProduct,
61 const auto& preconditioner,
67 = std::make_shared<Solver<Domain>>(linearOperator, scalarProduct, preconditioner, config);
Define general, extensible interface for inverse operators.
auto defaultIterativeSolverCreator()
Definition solverregistry.hh:57
auto defaultPreconditionerBlockLevelCreator()
Definition solverregistry.hh:31
auto defaultPreconditionerCreator()
Definition solverregistry.hh:44
constexpr std::size_t blockLevel()
Determine the block level of a possibly nested vector/matrix type.
Definition blocklevel.hh:174
A generic dynamic dense matrix.
Definition matrix.hh:559
Definition solverregistry.hh:75
Definition solverregistry.hh:77