mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Add HAVE_PETSC macro.
This commit is contained in:
@@ -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