diff --git a/opm/core/linalg/LinearSolverFactory.cpp b/opm/core/linalg/LinearSolverFactory.cpp index 98552c84c..4e2f3679b 100644 --- a/opm/core/linalg/LinearSolverFactory.cpp +++ b/opm/core/linalg/LinearSolverFactory.cpp @@ -30,6 +30,7 @@ #if HAVE_DUNE_ISTL #include #endif + #if HAVE_AGMG #include #endif @@ -73,12 +74,14 @@ namespace Opm solver_.reset(new LinearSolverIstl(param)); #endif } - else if (ls == "agmg") { + + else if (ls == "agmg") { #if HAVE_AGMG solver_.reset(new LinearSolverAGMG(param)); #endif - } - else { + } + + else { THROW("Linear solver " << ls << " is unknown."); }