ThreadsPerProcess moved to TypeTag-free parameter system

This commit is contained in:
Arne Morten Kvarving
2024-07-06 10:22:47 +02:00
parent a20cb10572
commit 9e11888ccb
10 changed files with 20 additions and 31 deletions

View File

@@ -122,14 +122,6 @@ struct LinearSolverBackend<TypeTag, TTag::FlowExpTypeTag> {
namespace Opm::Parameters {
// if openMP is available, set the default the number of threads per process for the main
// simulation to 2 (instead of grabbing everything that is available).
#if _OPENMP
template<class TypeTag>
struct ThreadsPerProcess<TypeTag, Properties::TTag::FlowExpTypeTag>
{ static constexpr int value = 2; };
#endif
// By default, flowexp accepts the result of the time integration unconditionally if the
// smallest time step size is reached.
template<class TypeTag>
@@ -230,6 +222,12 @@ public:
Parameters::hideParam<TypeTag, Parameters::UseUpdateStabilization>();
Parameters::hideParam<TypeTag, Parameters::MatrixAddWellContributions>();
Parameters::hideParam<TypeTag, Parameters::EnableTerminalOutput>();
// if openMP is available, set the default the number of threads per process for the main
// simulation to 2 (instead of grabbing everything that is available).
#if _OPENMP
Parameters::SetDefault<Parameters::ThreadsPerProcess>(2);
#endif
}
// inherit the constructors

View File

@@ -121,10 +121,6 @@ struct NewtonTolerance<TypeTag, Properties::TTag::FlowExpProblemBlackOil>
static constexpr type value = 1e-2;
};
template<class TypeTag>
struct ThreadsPerProcess<TypeTag, Properties::TTag::FlowExpProblemBlackOil>
{ static constexpr int value = 1; };
template<class TypeTag>
struct EclNewtonStrictIterations<TypeTag, Properties::TTag::FlowExpProblemBlackOil>
{ static constexpr int value = 100; };