Add HAVE_PETSC macro.
This commit is contained in:
1 parent
399a8f6884
commit
d8962ff1ce
3 files changed
+15
-5
No files matched your search
@@ -31,7 +31,10 @@
|
||||
#include <opm/core/linalg/LinearSolverIstl.hpp>
|
||||
#endif
|
||||
|
||||
#if HAVE_PETSC
|
||||
#include <opm/core/linalg/LinearSolverPetsc.hpp>
|
||||
#endif
|
||||
|
||||
#include <opm/core/utility/parameters/ParameterGroup.hpp>
|
||||
#include <opm/core/utility/ErrorMacros.hpp>
|
||||
#include <string>
|
||||
@@ -46,9 +49,9 @@ namespace Opm
|
||||
solver_.reset(new LinearSolverUmfpack);
|
||||
#elif HAVE_DUNE_ISTL
|
||||
solver_.reset(new LinearSolverIstl);
|
||||
#else
|
||||
#elif HAVE_PETSC
|
||||
solver_.reset(new LinearSolverPetsc);
|
||||
|
||||
#else
|
||||
OPM_THROW(std::runtime_error, "No linear solver available, you must have UMFPACK , dune-istl or Petsc installed to use LinearSolverFactory.");
|
||||
#endif
|
||||
}
|
||||
@@ -73,7 +76,9 @@ namespace Opm
|
||||
#endif
|
||||
}
|
||||
else if (ls == "petsc"){
|
||||
#if HAVE_PETSC
|
||||
solver_.reset(new LinearSolverPetsc(param));
|
||||
#endif
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
Reference in new issue
Block a user