diff --git a/opm/simulators/linalg/PreconditionerFactory_impl.hpp b/opm/simulators/linalg/PreconditionerFactory_impl.hpp index 4c56a9404..2d7607a3a 100644 --- a/opm/simulators/linalg/PreconditionerFactory_impl.hpp +++ b/opm/simulators/linalg/PreconditionerFactory_impl.hpp @@ -547,12 +547,14 @@ struct StandardPreconditioners { return getRebuildOnUpdateWrapper>(op, crit, parms); } }); +#if HAVE_HYPRE // Only add Hypre for scalar matrices if constexpr (M::block_type::rows == 1 && M::block_type::cols == 1) { F::addCreator("hypre", [](const O& op, const P& prm, const std::function&, std::size_t) { return std::make_shared>(op.getmat(), prm); }); } +#endif } if constexpr (std::is_same_v>) { F::addCreator(