mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
changed: remove SET_INT_PROP macro usage
This commit is contained in:
parent
a79c37a041
commit
fca83318aa
15
ebos/ebos.hh
15
ebos/ebos.hh
@ -118,16 +118,25 @@ SET_SCALAR_PROP(EbosTypeTag, EclNewtonSumTolerance, 1e-5);
|
||||
// make all Newton iterations strict, i.e., the volumetric Newton tolerance must be
|
||||
// always be upheld in the majority of the spatial domain. In this context, "majority"
|
||||
// means 1 - EclNewtonRelaxedVolumeFraction.
|
||||
SET_INT_PROP(EbosTypeTag, EclNewtonStrictIterations, 100);
|
||||
template<class TypeTag>
|
||||
struct EclNewtonStrictIterations<TypeTag, TTag::EbosTypeTag> {
|
||||
static constexpr int value = 100;
|
||||
};
|
||||
|
||||
// set the maximum number of Newton iterations to 8 so that we fail quickly (albeit
|
||||
// relatively often)
|
||||
SET_INT_PROP(EbosTypeTag, NewtonMaxIterations, 8);
|
||||
template<class TypeTag>
|
||||
struct NewtonMaxIterations<TypeTag, TTag::EbosTypeTag> {
|
||||
static constexpr int value = 8;
|
||||
};
|
||||
|
||||
// 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
|
||||
SET_INT_PROP(EbosTypeTag, ThreadsPerProcess, 2);
|
||||
template<class TypeTag>
|
||||
struct ThreadsPerProcess<TypeTag, TTag::EbosTypeTag> {
|
||||
static constexpr int value = 2;
|
||||
};
|
||||
#endif
|
||||
|
||||
// By default, ebos accepts the result of the time integration unconditionally if the
|
||||
|
@ -90,7 +90,10 @@ template<class TypeTag>
|
||||
struct EclDeckFileName<TypeTag, TTag::EclBaseVanguard> {
|
||||
static constexpr auto value = "";
|
||||
};
|
||||
SET_INT_PROP(EclBaseVanguard, EclOutputInterval, -1); // use the deck-provided value
|
||||
template<class TypeTag>
|
||||
struct EclOutputInterval<TypeTag, TTag::EclBaseVanguard> {
|
||||
static constexpr int value = -1;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct EnableOpmRstFile<TypeTag, TTag::EclBaseVanguard> {
|
||||
static constexpr bool value = false;
|
||||
@ -103,7 +106,10 @@ template<class TypeTag>
|
||||
struct SchedRestart<TypeTag, TTag::EclBaseVanguard> {
|
||||
static constexpr bool value = false;
|
||||
};
|
||||
SET_INT_PROP(EclBaseVanguard, EdgeWeightsMethod, 1);
|
||||
template<class TypeTag>
|
||||
struct EdgeWeightsMethod<TypeTag, TTag::EclBaseVanguard> {
|
||||
static constexpr int value = 1;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct OwnerCellsFirst<TypeTag, TTag::EclBaseVanguard> {
|
||||
static constexpr bool value = true;
|
||||
|
@ -303,7 +303,10 @@ SET_SCALAR_PROP(EclBaseProblem, EclNewtonSumToleranceExponent, 1.0/3.0);
|
||||
|
||||
// set number of Newton iterations where the volumetric residual is considered for
|
||||
// convergence
|
||||
SET_INT_PROP(EclBaseProblem, EclNewtonStrictIterations, 8);
|
||||
template<class TypeTag>
|
||||
struct EclNewtonStrictIterations<TypeTag, TTag::EclBaseProblem> {
|
||||
static constexpr int value = 8;
|
||||
};
|
||||
|
||||
// set fraction of the pore volume where the volumetric residual may be violated during
|
||||
// strict Newton iterations
|
||||
@ -317,12 +320,18 @@ SET_SCALAR_PROP(EclBaseProblem, NewtonMaxError, 10e9);
|
||||
|
||||
// set the maximum number of Newton iterations to 14 because the likelyhood that a time
|
||||
// step succeeds at more than 14 Newton iteration is rather small
|
||||
SET_INT_PROP(EclBaseProblem, NewtonMaxIterations, 14);
|
||||
template<class TypeTag>
|
||||
struct NewtonMaxIterations<TypeTag, TTag::EclBaseProblem> {
|
||||
static constexpr int value = 14;
|
||||
};
|
||||
|
||||
// also, reduce the target for the "optimum" number of Newton iterations to 6. Note that
|
||||
// this is only relevant if the time step is reduced from the report step size for some
|
||||
// reason. (because ebos first tries to do a report step using a single time step.)
|
||||
SET_INT_PROP(EclBaseProblem, NewtonTargetIterations, 6);
|
||||
template<class TypeTag>
|
||||
struct NewtonTargetIterations<TypeTag, TTag::EclBaseProblem> {
|
||||
static constexpr int value = 6;
|
||||
};
|
||||
|
||||
// Disable the VTK output by default for this problem ...
|
||||
template<class TypeTag>
|
||||
@ -379,7 +388,10 @@ SET_TYPE_PROP(EclBaseProblem, NewtonMethod, Opm::EclNewtonMethod<TypeTag>);
|
||||
|
||||
// The frequency of writing restart (*.ers) files. This is the number of time steps
|
||||
// between writing restart files
|
||||
SET_INT_PROP(EclBaseProblem, RestartWritingInterval, 0xffffff); // disable
|
||||
template<class TypeTag>
|
||||
struct RestartWritingInterval<TypeTag, TTag::EclBaseProblem> {
|
||||
static constexpr int value = 0xffffff; // disable
|
||||
};
|
||||
|
||||
// Drift compensation is an experimental feature, i.e., systematic errors in the
|
||||
// conservation quantities are only compensated for
|
||||
|
@ -36,9 +36,15 @@ namespace Opm {
|
||||
struct MatrixAddWellContributions<TypeTag, TTag::EclFlowProblemSimple> {
|
||||
static constexpr bool value = true;
|
||||
};
|
||||
SET_INT_PROP(EclFlowProblemSimple, LinearSolverVerbosity,0);
|
||||
template<class TypeTag>
|
||||
struct LinearSolverVerbosity<TypeTag, TTag::EclFlowProblemSimple> {
|
||||
static constexpr int value = 0;
|
||||
};
|
||||
SET_SCALAR_PROP(EclFlowProblemSimple, LinearSolverReduction, 1e-2);
|
||||
SET_INT_PROP(EclFlowProblemSimple, LinearSolverMaxIter, 100);
|
||||
template<class TypeTag>
|
||||
struct LinearSolverMaxIter<TypeTag, TTag::EclFlowProblemSimple> {
|
||||
static constexpr int value = 100;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct UseAmg<TypeTag, TTag::EclFlowProblemSimple> { // probably not used
|
||||
static constexpr bool value = true;
|
||||
@ -47,10 +53,22 @@ namespace Opm {
|
||||
struct UseCpr<TypeTag, TTag::EclFlowProblemSimple> {
|
||||
static constexpr bool value = true;
|
||||
};
|
||||
SET_INT_PROP(EclFlowProblemSimple, CprMaxEllIter, 1);
|
||||
SET_INT_PROP(EclFlowProblemSimple, CprEllSolvetype, 3);
|
||||
SET_INT_PROP(EclFlowProblemSimple, CprReuseSetup, 3);
|
||||
SET_INT_PROP(EclFlowProblemSimple, CprSolverVerbose, 0);
|
||||
template<class TypeTag>
|
||||
struct CprMaxEllIter<TypeTag,TTag::EclFlowProblemSimple> {
|
||||
static constexpr int value = 1;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct CprEllSolvetype<TypeTag, TTag::EclFlowProblemSimple> {
|
||||
static constexpr int value = 3;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct CprReuseSetup<TypeTag,TTag::EclFlowProblemSimple> {
|
||||
static constexpr int value = 3;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct CprSolverVerbose<TypeTag, TTag::EclFlowProblemSimple> {
|
||||
static constexpr int value = 0;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct LinearSolverConfiguration<TypeTag, TTag::EclFlowProblemSimple> {
|
||||
static constexpr auto value = "ilu0";
|
||||
@ -90,7 +108,10 @@ namespace Opm {
|
||||
static constexpr bool value = true;
|
||||
};
|
||||
|
||||
//SET_INT_PROP(EclFlowProblemSimple, NumWellAdjoint, 1);
|
||||
// template<class TypeTag>
|
||||
// struct NumWellAdjoint<TypeTag, TTag::EclFlowProblemSimple> {
|
||||
// static constexpr int value = 1;
|
||||
// };
|
||||
// template<class TypeTag>
|
||||
// struct EnableStorageCache<TypeTag, TTag::EclFlowProblem> {
|
||||
// static constexpr bool value = true;
|
||||
|
@ -71,13 +71,19 @@ SET_SCALAR_PROP(FlowModelParameters, ToleranceCnv,1e-2);
|
||||
SET_SCALAR_PROP(FlowModelParameters, ToleranceCnvRelaxed, 1e9);
|
||||
SET_SCALAR_PROP(FlowModelParameters, ToleranceWells, 1e-4);
|
||||
SET_SCALAR_PROP(FlowModelParameters, ToleranceWellControl, 1e-7);
|
||||
SET_INT_PROP(FlowModelParameters, MaxWelleqIter, 30);
|
||||
template<class TypeTag>
|
||||
struct MaxWelleqIter<TypeTag, TTag::FlowModelParameters> {
|
||||
static constexpr int value = 30;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct UseMultisegmentWell<TypeTag, TTag::FlowModelParameters> {
|
||||
static constexpr bool value = true;
|
||||
};
|
||||
SET_SCALAR_PROP(FlowModelParameters, MaxSinglePrecisionDays, 20.0);
|
||||
SET_INT_PROP(FlowModelParameters, MaxStrictIter, 8);
|
||||
template<class TypeTag>
|
||||
struct MaxStrictIter<TypeTag, TTag::FlowModelParameters> {
|
||||
static constexpr int value = 8;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct SolveWelleqInitially<TypeTag, TTag::FlowModelParameters> {
|
||||
static constexpr bool value = true;
|
||||
@ -100,13 +106,22 @@ template<class TypeTag>
|
||||
struct UseInnerIterationsMsWells<TypeTag, TTag::FlowModelParameters> {
|
||||
static constexpr bool value = true;
|
||||
};
|
||||
SET_INT_PROP(FlowModelParameters, MaxInnerIterMsWells, 100);
|
||||
template<class TypeTag>
|
||||
struct MaxInnerIterMsWells<TypeTag, TTag::FlowModelParameters> {
|
||||
static constexpr int value = 100;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct UseInnerIterationsWells<TypeTag, TTag::FlowModelParameters> {
|
||||
static constexpr bool value = false;
|
||||
};
|
||||
SET_INT_PROP(FlowModelParameters, MaxInnerIterWells, 50);
|
||||
SET_INT_PROP(FlowModelParameters, StrictInnerIterMsWells, 40);
|
||||
template<class TypeTag>
|
||||
struct MaxInnerIterWells<TypeTag, TTag::FlowModelParameters> {
|
||||
static constexpr int value = 50;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct StrictInnerIterMsWells<TypeTag, TTag::FlowModelParameters> {
|
||||
static constexpr int value = 40;
|
||||
};
|
||||
SET_SCALAR_PROP(FlowModelParameters, RegularizationFactorMsw, 1);
|
||||
template<class TypeTag>
|
||||
struct EnableWellOperabilityCheck<TypeTag, TTag::FlowModelParameters> {
|
||||
@ -118,7 +133,10 @@ SET_SCALAR_PROP(FlowModelParameters, RelaxedPressureTolInnerIterMsw, 0.5e5);
|
||||
|
||||
// if openMP is available, determine the number threads per process automatically.
|
||||
#if _OPENMP
|
||||
SET_INT_PROP(FlowModelParameters, ThreadsPerProcess, -1);
|
||||
template<class TypeTag>
|
||||
struct ThreadsPerProcess<TypeTag, TTag::FlowModelParameters> {
|
||||
static constexpr int value = -1;
|
||||
};
|
||||
#endif
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
@ -64,7 +64,10 @@ template<class TypeTag>
|
||||
struct EnableLoggingFalloutWarning<TypeTag, TTag::EclFlowProblem> {
|
||||
static constexpr bool value = false;
|
||||
};
|
||||
SET_INT_PROP(EclFlowProblem, OutputInterval, 1);
|
||||
template<class TypeTag>
|
||||
struct OutputInterval<TypeTag, TTag::EclFlowProblem> {
|
||||
static constexpr int value = 1;
|
||||
};
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
|
@ -46,8 +46,14 @@ NEW_PROP_TAG(FlowNewtonMinIterations);
|
||||
NEW_PROP_TAG(NewtonRelaxationType);
|
||||
|
||||
SET_SCALAR_PROP(FlowNonLinearSolver, NewtonMaxRelax, 0.5);
|
||||
SET_INT_PROP(FlowNonLinearSolver, FlowNewtonMaxIterations, 20);
|
||||
SET_INT_PROP(FlowNonLinearSolver, FlowNewtonMinIterations, 1);
|
||||
template<class TypeTag>
|
||||
struct FlowNewtonMaxIterations<TypeTag, TTag::FlowNonLinearSolver> {
|
||||
static constexpr int value = 20;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct FlowNewtonMinIterations<TypeTag, TTag::FlowNonLinearSolver> {
|
||||
static constexpr int value = 1;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct NewtonRelaxationType<TypeTag, TTag::FlowNonLinearSolver> {
|
||||
static constexpr auto value = "dampen";
|
||||
|
@ -75,10 +75,22 @@ NEW_PROP_TAG(OpenclPlatformId);
|
||||
|
||||
SET_SCALAR_PROP(FlowIstlSolverParams, LinearSolverReduction, 1e-2);
|
||||
SET_SCALAR_PROP(FlowIstlSolverParams, IluRelaxation, 0.9);
|
||||
SET_INT_PROP(FlowIstlSolverParams, LinearSolverMaxIter, 200);
|
||||
SET_INT_PROP(FlowIstlSolverParams, LinearSolverRestart, 40);
|
||||
SET_INT_PROP(FlowIstlSolverParams, FlowLinearSolverVerbosity, 0);
|
||||
SET_INT_PROP(FlowIstlSolverParams, IluFillinLevel, 0);
|
||||
template<class TypeTag>
|
||||
struct LinearSolverMaxIter<TypeTag, TTag::FlowIstlSolverParams> {
|
||||
static constexpr int value = 200;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct LinearSolverRestart<TypeTag, TTag::FlowIstlSolverParams> {
|
||||
static constexpr int value = 40;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct FlowLinearSolverVerbosity<TypeTag, TTag::FlowIstlSolverParams> {
|
||||
static constexpr int value = 0;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct IluFillinLevel<TypeTag, TTag::FlowIstlSolverParams> {
|
||||
static constexpr int value = 0;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct MiluVariant<TypeTag, TTag::FlowIstlSolverParams> {
|
||||
static constexpr auto value = "ILU";
|
||||
@ -124,14 +136,26 @@ template<class TypeTag>
|
||||
struct ScaleLinearSystem<TypeTag, TTag::FlowIstlSolverParams> {
|
||||
static constexpr bool value = false;
|
||||
};
|
||||
SET_INT_PROP(FlowIstlSolverParams, CprSolverVerbose, 0);
|
||||
template<class TypeTag>
|
||||
struct CprSolverVerbose<TypeTag, TTag::FlowIstlSolverParams> {
|
||||
static constexpr int value = 0;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct CprUseDrs<TypeTag, TTag::FlowIstlSolverParams> {
|
||||
static constexpr bool value = false;
|
||||
};
|
||||
SET_INT_PROP(FlowIstlSolverParams, CprMaxEllIter, 20);
|
||||
SET_INT_PROP(FlowIstlSolverParams, CprEllSolvetype, 0);
|
||||
SET_INT_PROP(FlowIstlSolverParams, CprReuseSetup, 3);
|
||||
template<class TypeTag>
|
||||
struct CprMaxEllIter<TypeTag, TTag::FlowIstlSolverParams> {
|
||||
static constexpr int value = 20;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct CprEllSolvetype<TypeTag, TTag::FlowIstlSolverParams> {
|
||||
static constexpr int value = 0;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct CprReuseSetup<TypeTag, TTag::FlowIstlSolverParams> {
|
||||
static constexpr int value = 3;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct LinearSolverConfiguration<TypeTag, TTag::FlowIstlSolverParams> {
|
||||
static constexpr auto value = "ilu0";
|
||||
@ -144,8 +168,14 @@ template<class TypeTag>
|
||||
struct GpuMode<TypeTag, TTag::FlowIstlSolverParams> {
|
||||
static constexpr auto value = "none";
|
||||
};
|
||||
SET_INT_PROP(FlowIstlSolverParams, BdaDeviceId, 0);
|
||||
SET_INT_PROP(FlowIstlSolverParams, OpenclPlatformId, 0);
|
||||
template<class TypeTag>
|
||||
struct BdaDeviceId<TypeTag, TTag::FlowIstlSolverParams> {
|
||||
static constexpr int value = 0;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct OpenclPlatformId<TypeTag, TTag::FlowIstlSolverParams> {
|
||||
static constexpr int value = 0;
|
||||
};
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
|
@ -48,9 +48,18 @@ SET_SCALAR_PROP(FlowTimeSteppingParameters, SolverGrowthFactor, 2.0);
|
||||
SET_SCALAR_PROP(FlowTimeSteppingParameters, SolverMaxGrowth, 3.0);
|
||||
SET_SCALAR_PROP(FlowTimeSteppingParameters, SolverMaxTimeStepInDays, 365.0);
|
||||
SET_SCALAR_PROP(FlowTimeSteppingParameters, SolverMinTimeStep, 0.0);
|
||||
SET_INT_PROP(FlowTimeSteppingParameters, SolverMaxRestarts, 10);
|
||||
SET_INT_PROP(FlowTimeSteppingParameters, SolverVerbosity, 1);
|
||||
SET_INT_PROP(FlowTimeSteppingParameters, TimeStepVerbosity, 1);
|
||||
template<class TypeTag>
|
||||
struct SolverMaxRestarts<TypeTag, TTag::FlowTimeSteppingParameters> {
|
||||
static constexpr int value = 10;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct SolverVerbosity<TypeTag, TTag::FlowTimeSteppingParameters> {
|
||||
static constexpr int value = 1;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct TimeStepVerbosity<TypeTag, TTag::FlowTimeSteppingParameters> {
|
||||
static constexpr int value = 1;
|
||||
};
|
||||
SET_SCALAR_PROP(FlowTimeSteppingParameters, InitialTimeStepInDays, 1.0);
|
||||
template<class TypeTag>
|
||||
struct FullTimeStepInitially<TypeTag, TTag::FlowTimeSteppingParameters> {
|
||||
@ -62,8 +71,14 @@ struct TimeStepControl<TypeTag, TTag::FlowTimeSteppingParameters> {
|
||||
static constexpr auto value = "pid";
|
||||
};
|
||||
SET_SCALAR_PROP(FlowTimeSteppingParameters, TimeStepControlTolerance, 1e-1);
|
||||
SET_INT_PROP(FlowTimeSteppingParameters, TimeStepControlTargetIterations, 30);
|
||||
SET_INT_PROP(FlowTimeSteppingParameters, TimeStepControlTargetNewtonIterations, 8);
|
||||
template<class TypeTag>
|
||||
struct TimeStepControlTargetIterations<TypeTag, TTag::FlowTimeSteppingParameters> {
|
||||
static constexpr int value = 30;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct TimeStepControlTargetNewtonIterations<TypeTag, TTag::FlowTimeSteppingParameters> {
|
||||
static constexpr int value = 8;
|
||||
};
|
||||
SET_SCALAR_PROP(FlowTimeSteppingParameters, TimeStepControlDecayRate, 0.75);
|
||||
SET_SCALAR_PROP(FlowTimeSteppingParameters, TimeStepControlGrowthRate, 1.25);
|
||||
template<class TypeTag>
|
||||
|
Loading…
Reference in New Issue
Block a user