diff --git a/opm/core/fluid/RockCompressibility.cpp b/opm/core/fluid/RockCompressibility.cpp index 17d86bebc..104861013 100644 --- a/opm/core/fluid/RockCompressibility.cpp +++ b/opm/core/fluid/RockCompressibility.cpp @@ -69,7 +69,8 @@ namespace Opm const double cpnorm = rock_comp_*(pressure - pref_); return (1.0 + cpnorm + 0.5*cpnorm*cpnorm); } else { - return Opm::linearInterpolation(p_, poromult_, pressure); + // return Opm::linearInterpolation(p_, poromult_, pressure); + return Opm::linearInterpolationExtrap(p_, poromult_, pressure); } } @@ -78,8 +79,11 @@ namespace Opm if (p_.empty()) { return rock_comp_; } else { - const double poromult = Opm::linearInterpolation(p_, poromult_, pressure); - const double dporomultdp = Opm::linearInterpolationDerivative(p_, poromult_, pressure); + //const double poromult = Opm::linearInterpolation(p_, poromult_, pressure); + //const double dporomultdp = Opm::linearInterpolationDerivative(p_, poromult_, pressure); + const double poromult = Opm::linearInterpolationExtrap(p_, poromult_, pressure); + const double dporomultdp = Opm::linearInterpolationDerivativeExtrap(p_, poromult_, pressure); + return dporomultdp/poromult; } } diff --git a/opm/core/fluid/SaturationPropsBasic.cpp b/opm/core/fluid/SaturationPropsBasic.cpp index 8249a31f1..760f934d4 100644 --- a/opm/core/fluid/SaturationPropsBasic.cpp +++ b/opm/core/fluid/SaturationPropsBasic.cpp @@ -114,7 +114,8 @@ namespace Opm THROW("SaturationPropsBasic::init() illegal num_phases: " << num_phases); } num_phases_ = num_phases; - std::string rpf = param.getDefault("relperm_func", std::string("Unset")); + //std::string rpf = param.getDefault("relperm_func", std::string("Unset")); + std::string rpf = param.getDefault("relperm_func", std::string("Linear")); if (rpf == "Constant") { relperm_func_ = Constant; if(num_phases!=1){ diff --git a/opm/core/linalg/LinearSolverFactory.cpp b/opm/core/linalg/LinearSolverFactory.cpp index 9b6d89095..98552c84c 100644 --- a/opm/core/linalg/LinearSolverFactory.cpp +++ b/opm/core/linalg/LinearSolverFactory.cpp @@ -30,6 +30,10 @@ #if HAVE_DUNE_ISTL #include #endif +#if HAVE_AGMG +#include +#endif + #include #include @@ -69,8 +73,12 @@ namespace Opm solver_.reset(new LinearSolverIstl(param)); #endif } - - else { + else if (ls == "agmg") { +#if HAVE_AGMG + solver_.reset(new LinearSolverAGMG(param)); +#endif + } + else { THROW("Linear solver " << ls << " is unknown."); }