Feature/solverfactory
-
Review changes -
-
Download -
Patches
-
Plain diff
This MR introduces a solver factory that can assemble solvers to a given LinearOperator, that are fully configurable via a ParameterTree
.
It is based on a compile-time registry that can register class templates at compile time.
This compile time registry can then be added to a ParameterizedObjectFactory
.
We've introduced tree types of these Factories:
DirectSolverFactory
PreconditionerFactory
IterativeSolverFactory
We provide Macros for registering class templates. For example a preconditioner can be registered like that:
DUNE_REGISTER_PRECONDITIONER("ssor", default_preconditoner_BL_creator<Dune::SeqSSOR>());
where default_preconditoner_BL_creator<Dune::SeqSSOR>()
could also be replaced by a object that creates the preconditoner from a matrix and a ParameterTree
.
The solver factory can then be used like this:
std::shared_ptr<MatrixAdapter<Vector,Vector>> op = std::make_shared<MatrixAdapter<Vector,Vector>>(A);
std::shared_ptr<Dune::InverseOperator<Vector, Vector>> solver = getSolverFromFactory(op, solverConfig);
where solverConfig
is a ParameterTree containing a configuration tree:
[CGWithAMG]
type = cgsolver
verbose = 1
maxit = 1000
reduction = 1e-5
[CGWithAMG.preconditioner]
type = amg
iterations = 1
relaxation = 1
maxLevel = 10
It is planned to have a library "libduneistl" at some point that contains preconditioners and solvers for the most often used template parameters.
Merge request reports
- version 3722140db7
- version 363ff25272
- version 35334cc0d6
- version 348e334041
- version 33cf636117
- version 32bb97a276
- version 31cf636117
- version 30bd069928
- version 29ed5bca24
- version 2891d35ea0
- version 27359aadfa
- version 26da26bbd8
- version 251e394850
- version 2455537753
- version 23ed280a00
- version 22c0b18cc1
- version 215a7362e4
- version 20e2e09738
- version 194214a196
- version 1811fee01f
- version 1722af0304
- version 16de3cc18d
- version 15ba43ee86
- version 14ae2c0853
- version 13c44e1d26
- version 12595b0233
- version 11ac9b81d2
- version 10d2a8bfb2
- version 97ec96766
- version 814b94f40
- version 7ed5cbea9
- version 661bcda46
- version 540074e83
- version 4ba759b9d
- version 3fb770ce1
- version 207637525
- version 16f3888b9
- master (base)
- latest version4e53c48046 commits,
- version 3722140db745 commits,
- version 363ff2527244 commits,
- version 35334cc0d641 commits,
- version 348e33404139 commits,
- version 33cf63611738 commits,
- version 32bb97a27639 commits,
- version 31cf63611738 commits,
- version 30bd06992837 commits,
- version 29ed5bca2437 commits,
- version 2891d35ea036 commits,
- version 27359aadfa41 commits,
- version 26da26bbd839 commits,
- version 251e39485033 commits,
- version 245553775332 commits,
- version 23ed280a0031 commits,
- version 22c0b18cc129 commits,
- version 215a7362e428 commits,
- version 20e2e0973845 commits,
- version 194214a19644 commits,
- version 1811fee01f43 commits,
- version 1722af030437 commits,
- version 16de3cc18d36 commits,
- version 15ba43ee8635 commits,
- version 14ae2c085333 commits,
- version 13c44e1d2631 commits,
- version 12595b023330 commits,
- version 11ac9b81d227 commits,
- version 10d2a8bfb226 commits,
- version 97ec9676625 commits,
- version 814b94f4019 commits,
- version 7ed5cbea918 commits,
- version 661bcda4616 commits,
- version 540074e8315 commits,
- version 4ba759b9d12 commits,
- version 3fb770ce112 commits,
- version 20763752512 commits,
- version 16f3888b911 commits,
- Side-by-side
- Inline