move NewtonTargetIterations to TypeTag-free parameter system

This commit is contained in:
Arne Morten Kvarving
2024-07-05 17:49:51 +02:00
parent 8285d999e8
commit 930e6c8adf
4 changed files with 14 additions and 30 deletions

View File

@@ -190,13 +190,6 @@ struct LinearSolverTolerance<TypeTag, Properties::TTag::CO2PTBaseProblem>
static constexpr type value = 1e-3;
};
template <class TypeTag>
struct NewtonTargetIterations<TypeTag, Properties::TTag::CO2PTBaseProblem>
{
using type = GetPropType<TypeTag, Properties::Scalar>;
static constexpr type value = 6;
};
template <class TypeTag>
struct NewtonMaxIterations<TypeTag, Properties::TTag::CO2PTBaseProblem>
{ static constexpr int value = 30; };
@@ -374,6 +367,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);
Parameters::SetDefault<Parameters::NewtonTargetIterations>(6);
}
/*!

View File

@@ -108,12 +108,6 @@ template<class TypeTag>
struct EnableGravity<TypeTag, Properties::TTag::RichardsLensProblem>
{ static constexpr bool value = true; };
// Set the "desireable" number of newton iterations of a time step
template<class TypeTag>
struct NewtonTargetIterations<TypeTag, Properties::TTag::RichardsLensProblem>
{ static constexpr int value = 18; };
// Set the maximum number of newton iterations of a time step
template<class TypeTag>
struct NewtonMaxIterations<TypeTag, Properties::TTag::RichardsLensProblem>
{ static constexpr int value = 28; };
@@ -254,6 +248,7 @@ public:
Parameters::SetDefault<Parameters::EndTime<Scalar>>(3000.0);
Parameters::SetDefault<Parameters::InitialTimeStepSize<Scalar>>(100.0);
Parameters::SetDefault<Parameters::NewtonTargetIterations>(18);
}
/*!