move NewtonTolerance to TypeTag-free parameter system

This commit is contained in:
Arne Morten Kvarving
2024-07-05 17:49:51 +02:00
parent 6d649be5db
commit 73344cfb60
9 changed files with 31 additions and 85 deletions

View File

@@ -231,6 +231,9 @@ struct Temperature<TypeTag, Properties::TTag::Co2InjectionBaseProblem>
} // namespace Opm::Parameters
namespace Opm {
double Co2InjectionTolerance = 1e-8;
/*!
* \ingroup TestProblems
*
@@ -393,6 +396,8 @@ public:
Parameters::SetDefault<Parameters::GridFile>("data/co2injection.dgf");
Parameters::SetDefault<Parameters::EndTime<Scalar>>(1e4);
Parameters::SetDefault<Parameters::InitialTimeStepSize<Scalar>>(250);
Parameters::SetDefault<Parameters::NewtonTolerance<Scalar>>(Scalar{Co2InjectionTolerance});
}
/*!

View File

@@ -190,13 +190,6 @@ struct LinearSolverTolerance<TypeTag, Properties::TTag::CO2PTBaseProblem>
static constexpr type value = 1e-3;
};
template <class TypeTag>
struct NewtonTolerance<TypeTag, Properties::TTag::CO2PTBaseProblem>
{
using type = GetPropType<TypeTag, Properties::Scalar>;
static constexpr type value = 1e-3;
};
template <class TypeTag>
struct NewtonTargetIterations<TypeTag, Properties::TTag::CO2PTBaseProblem>
{
@@ -380,6 +373,7 @@ public:
Parameters::SetDefault<Parameters::EndTime<Scalar>>(60. * 60.);
Parameters::SetDefault<Parameters::InitialTimeStepSize<Scalar>>(0.1 * 60. * 60.);
Parameters::SetDefault<Parameters::NewtonTolerance<Scalar>>(1e-3);
}
/*!

View File

@@ -148,14 +148,6 @@ struct MaxDepth<TypeTag, Properties::TTag::ReservoirBaseProblem>
static constexpr type value = 2500;
};
// increase the tolerance for this problem to get larger time steps
template<class TypeTag>
struct NewtonTolerance<TypeTag, Properties::TTag::ReservoirBaseProblem>
{
using type = GetPropType<TypeTag, Properties::Scalar>;
static constexpr type value = 1e-6;
};
template<class TypeTag>
struct Temperature<TypeTag, Properties::TTag::ReservoirBaseProblem>
{
@@ -431,6 +423,8 @@ public:
Parameters::SetDefault<Parameters::EnableStorageCache>(true);
Parameters::SetDefault<Parameters::GridFile>("data/reservoir.dgf");
Parameters::SetDefault<Parameters::InitialTimeStepSize<Scalar>>(100e3);
// increase the tolerance for this problem to get larger time steps
Parameters::SetDefault<Parameters::NewtonTolerance<Scalar>>(1e-6);
}
/*!