diff --git a/opm/simulators/linalg/PreconditionerFactory_impl.hpp b/opm/simulators/linalg/PreconditionerFactory_impl.hpp index e50a2a697..1dd1c8345 100644 --- a/opm/simulators/linalg/PreconditionerFactory_impl.hpp +++ b/opm/simulators/linalg/PreconditionerFactory_impl.hpp @@ -167,6 +167,10 @@ struct StandardPreconditioners using M = typename F::Matrix; using V = typename F::Vector; using P = PropertyTree; + // TODO: add DuneILU with correct communicator + // F::addCreator("DuneILU", [](const O& op, const P& prm, const std::function&, std::size_t, const C& comm) { + // return wrapBlockPreconditioner>(comm, op.getmat()); + // }); F::addCreator("ILU0", [](const O& op, const P& prm, const std::function&, std::size_t, const C& comm) { return createParILU(op, prm, comm, 0); }); @@ -176,6 +180,12 @@ struct StandardPreconditioners F::addCreator("ILUn", [](const O& op, const P& prm, const std::function&, std::size_t, const C& comm) { return createParILU(op, prm, comm, prm.get("ilulevel", 0)); }); + // F::addCreator("DuneILU", [](const O& op, const P& prm, const std::function&, std::size_t) { + // const double w = prm.get("relaxation", 1.0); + // const int n = prm.get("ilulevel", 0); + // const bool resort = prm.get("resort", false); + // return wrapBlockPreconditioner>(op.getmat(), n, w, resort); + // }); F::addCreator("DILU", [](const O& op, const P& prm, const std::function&, std::size_t, const C& comm) { DUNE_UNUSED_PARAMETER(prm); return wrapBlockPreconditioner>(comm, op.getmat()); @@ -360,6 +370,12 @@ struct StandardPreconditioners return std::make_shared>( op.getmat(), 0, w, Opm::MILU_VARIANT::ILU); }); + F::addCreator("DuneILU", [](const O& op, const P& prm, const std::function&, std::size_t) { + const double w = prm.get("relaxation", 1.0); + const int n = prm.get("ilulevel", 0); + const bool resort = prm.get("resort", false); + return wrapPreconditioner>(op.getmat(), n, w, resort); + }); F::addCreator("ParOverILU0", [](const O& op, const P& prm, const std::function&, std::size_t) { const double w = prm.get("relaxation", 1.0); const int n = prm.get("ilulevel", 0);