Add a valid wrapper through OwningBlockPreconditioner that rebuiilds the preconditioner on updates. Still has excessive matrix copy and misses a wrapper function

This commit is contained in:
Tobias Meyer Andersen
2023-12-19 15:33:16 +01:00
parent 6b73856fd9
commit 71d58afc0e
2 changed files with 50 additions and 3 deletions

View File

@@ -177,10 +177,10 @@ struct StandardPreconditioners
return createParILU(op, prm, comm, prm.get<int>("ilulevel", 0));
});
F::addCreator("DuneILU", [](const O& op, const P& prm, const std::function<V()>&, std::size_t, const C& comm) {
const double w = prm.get<double>("relaxation", 1.0);
const int n = prm.get<int>("ilulevel", 0);
const double w = prm.get<double>("relaxation", 1.0);
const bool resort = prm.get<bool>("resort", false);
return wrapBlockPreconditioner<DummyUpdatePreconditioner<Dune::SeqILU<M, V, V>>>(comm, op.getmat(), n, w, resort);
return wrapBlockPreconditioner<RebuildOnUpdatePreconditioner<Dune::SeqILU<M, V, V>, M>>(comm, op.getmat(), n, w, resort);
});
F::addCreator("DILU", [](const O& op, const P& prm, const std::function<V()>&, std::size_t, const C& comm) {
DUNE_UNUSED_PARAMETER(prm);