changed: remove SET_BOOL_PROP macro usage

This commit is contained in:
Arne Morten Kvarving
2020-08-27 13:01:51 +02:00
parent e8248b44ff
commit 0e71c0e29b
28 changed files with 367 additions and 93 deletions
+36 -9
View File
@@ -78,21 +78,48 @@ struct EclFlowProblem {
};
}
SET_STRING_PROP(EclFlowProblem, OutputDir, "");
SET_BOOL_PROP(EclFlowProblem, EnableDebuggingChecks, false);
template<class TypeTag>
struct EnableDebuggingChecks<TypeTag, TTag::EclFlowProblem> {
static constexpr bool value = false;
};
// default in flow is to formulate the equations in surface volumes
SET_BOOL_PROP(EclFlowProblem, BlackoilConserveSurfaceVolume, true);
SET_BOOL_PROP(EclFlowProblem, UseVolumetricResidual, false);
template<class TypeTag>
struct BlackoilConserveSurfaceVolume<TypeTag, TTag::EclFlowProblem> {
static constexpr bool value = true;
};
template<class TypeTag>
struct UseVolumetricResidual<TypeTag, TTag::EclFlowProblem> {
static constexpr bool value = false;
};
SET_TYPE_PROP(EclFlowProblem, EclAquiferModel, Opm::BlackoilAquiferModel<TypeTag>);
// disable all extensions supported by black oil model. this should not really be
// necessary but it makes things a bit more explicit
SET_BOOL_PROP(EclFlowProblem, EnablePolymer, false);
SET_BOOL_PROP(EclFlowProblem, EnableSolvent, false);
SET_BOOL_PROP(EclFlowProblem, EnableTemperature, true);
SET_BOOL_PROP(EclFlowProblem, EnableEnergy, false);
SET_BOOL_PROP(EclFlowProblem, EnableFoam, false);
SET_BOOL_PROP(EclFlowProblem, EnableBrine, false);
template<class TypeTag>
struct EnablePolymer<TypeTag, TTag::EclFlowProblem> {
static constexpr bool value = false;
};
template<class TypeTag>
struct EnableSolvent<TypeTag, TTag::EclFlowProblem> {
static constexpr bool value = false;
};
template<class TypeTag>
struct EnableTemperature<TypeTag, TTag::EclFlowProblem> {
static constexpr bool value = true;
};
template<class TypeTag>
struct EnableEnergy<TypeTag, TTag::EclFlowProblem> {
static constexpr bool value = false;
};
template<class TypeTag>
struct EnableFoam<TypeTag, TTag::EclFlowProblem> {
static constexpr bool value = false;
};
template<class TypeTag>
struct EnableBrine<TypeTag, TTag::EclFlowProblem> {
static constexpr bool value = false;
};
SET_TYPE_PROP(EclFlowProblem, EclWellModel, Opm::BlackoilWellModel<TypeTag>);
SET_TAG_PROP(EclFlowProblem, LinearSolverSplice, FlowIstlSolver);
@@ -72,22 +72,46 @@ 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);
SET_BOOL_PROP(FlowModelParameters, UseMultisegmentWell, true);
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);
SET_BOOL_PROP(FlowModelParameters, SolveWelleqInitially, true);
SET_BOOL_PROP(FlowModelParameters, UpdateEquationsScaling, false);
SET_BOOL_PROP(FlowModelParameters, UseUpdateStabilization, true);
SET_BOOL_PROP(FlowModelParameters, MatrixAddWellContributions, false);
template<class TypeTag>
struct SolveWelleqInitially<TypeTag, TTag::FlowModelParameters> {
static constexpr bool value = true;
};
template<class TypeTag>
struct UpdateEquationsScaling<TypeTag, TTag::FlowModelParameters> {
static constexpr bool value = false;
};
template<class TypeTag>
struct UseUpdateStabilization<TypeTag, TTag::FlowModelParameters> {
static constexpr bool value = true;
};
template<class TypeTag>
struct MatrixAddWellContributions<TypeTag, TTag::FlowModelParameters> {
static constexpr bool value = false;
};
SET_SCALAR_PROP(FlowModelParameters, TolerancePressureMsWells, 0.01*1e5);
SET_SCALAR_PROP(FlowModelParameters, MaxPressureChangeMsWells, 10*1e5);
SET_BOOL_PROP(FlowModelParameters, UseInnerIterationsMsWells, true);
template<class TypeTag>
struct UseInnerIterationsMsWells<TypeTag, TTag::FlowModelParameters> {
static constexpr bool value = true;
};
SET_INT_PROP(FlowModelParameters, MaxInnerIterMsWells, 100);
SET_BOOL_PROP(FlowModelParameters, UseInnerIterationsWells, false);
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);
SET_SCALAR_PROP(FlowModelParameters, RegularizationFactorMsw, 1);
SET_BOOL_PROP(FlowModelParameters, EnableWellOperabilityCheck, true);
template<class TypeTag>
struct EnableWellOperabilityCheck<TypeTag, TTag::FlowModelParameters> {
static constexpr bool value = true;
};
SET_SCALAR_PROP(FlowModelParameters, RelaxedFlowTolInnerIterMsw, 1);
SET_SCALAR_PROP(FlowModelParameters, RelaxedPressureTolInnerIterMsw, 0.5e5);
+4 -1
View File
@@ -57,7 +57,10 @@ NEW_PROP_TAG(EnableLoggingFalloutWarning);
// TODO: enumeration parameters. we use strings for now.
SET_STRING_PROP(EclFlowProblem, EnableDryRun, "auto");
// Do not merge parallel output files or warn about them
SET_BOOL_PROP(EclFlowProblem, EnableLoggingFalloutWarning, false);
template<class TypeTag>
struct EnableLoggingFalloutWarning<TypeTag, TTag::EclFlowProblem> {
static constexpr bool value = false;
};
SET_INT_PROP(EclFlowProblem, OutputInterval, 1);
} // namespace Opm::Properties
@@ -39,9 +39,18 @@ namespace Opm::Properties {
NEW_PROP_TAG(EnableAdaptiveTimeStepping);
NEW_PROP_TAG(EnableTuning);
SET_BOOL_PROP(EclFlowProblem, EnableTerminalOutput, true);
SET_BOOL_PROP(EclFlowProblem, EnableAdaptiveTimeStepping, true);
SET_BOOL_PROP(EclFlowProblem, EnableTuning, false);
template<class TypeTag>
struct EnableTerminalOutput<TypeTag, TTag::EclFlowProblem> {
static constexpr bool value = true;
};
template<class TypeTag>
struct EnableAdaptiveTimeStepping<TypeTag, TTag::EclFlowProblem> {
static constexpr bool value = true;
};
template<class TypeTag>
struct EnableTuning<TypeTag, TTag::EclFlowProblem> {
static constexpr bool value = false;
};
} // namespace Opm::Properties
@@ -80,19 +80,49 @@ SET_INT_PROP(FlowIstlSolverParams, LinearSolverRestart, 40);
SET_INT_PROP(FlowIstlSolverParams, FlowLinearSolverVerbosity, 0);
SET_INT_PROP(FlowIstlSolverParams, IluFillinLevel, 0);
SET_STRING_PROP(FlowIstlSolverParams, MiluVariant, "ILU");
SET_BOOL_PROP(FlowIstlSolverParams, IluRedblack, false);
SET_BOOL_PROP(FlowIstlSolverParams, IluReorderSpheres, false);
SET_BOOL_PROP(FlowIstlSolverParams, UseGmres, false);
SET_BOOL_PROP(FlowIstlSolverParams, LinearSolverRequireFullSparsityPattern, false);
SET_BOOL_PROP(FlowIstlSolverParams, LinearSolverIgnoreConvergenceFailure, false);
SET_BOOL_PROP(FlowIstlSolverParams, UseAmg, false);
SET_BOOL_PROP(FlowIstlSolverParams, UseCpr, false);
template<class TypeTag>
struct IluRedblack<TypeTag, TTag::FlowIstlSolverParams> {
static constexpr bool value = false;
};
template<class TypeTag>
struct IluReorderSpheres<TypeTag, TTag::FlowIstlSolverParams> {
static constexpr bool value = false;
};
template<class TypeTag>
struct UseGmres<TypeTag, TTag::FlowIstlSolverParams> {
static constexpr bool value = false;
};
template<class TypeTag>
struct LinearSolverRequireFullSparsityPattern<TypeTag, TTag::FlowIstlSolverParams> {
static constexpr bool value = false;
};
template<class TypeTag>
struct LinearSolverIgnoreConvergenceFailure<TypeTag, TTag::FlowIstlSolverParams> {
static constexpr bool value = false;
};
template<class TypeTag>
struct UseAmg<TypeTag, TTag::FlowIstlSolverParams> {
static constexpr bool value = false;
};
template<class TypeTag>
struct UseCpr<TypeTag, TTag::FlowIstlSolverParams> {
static constexpr bool value = false;
};
SET_TYPE_PROP(FlowIstlSolverParams, LinearSolverBackend, Opm::ISTLSolverEbos<TypeTag>);
SET_BOOL_PROP(FlowIstlSolverParams, PreconditionerAddWellContributions, false);
template<class TypeTag>
struct PreconditionerAddWellContributions<TypeTag, TTag::FlowIstlSolverParams> {
static constexpr bool value = false;
};
SET_STRING_PROP(FlowIstlSolverParams, SystemStrategy, "none");
SET_BOOL_PROP(FlowIstlSolverParams, ScaleLinearSystem, false);
template<class TypeTag>
struct ScaleLinearSystem<TypeTag, TTag::FlowIstlSolverParams> {
static constexpr bool value = false;
};
SET_INT_PROP(FlowIstlSolverParams, CprSolverVerbose, 0);
SET_BOOL_PROP(FlowIstlSolverParams, CprUseDrs, false);
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);
@@ -52,7 +52,10 @@ SET_INT_PROP(FlowTimeSteppingParameters, SolverMaxRestarts, 10);
SET_INT_PROP(FlowTimeSteppingParameters, SolverVerbosity, 1);
SET_INT_PROP(FlowTimeSteppingParameters, TimeStepVerbosity, 1);
SET_SCALAR_PROP(FlowTimeSteppingParameters, InitialTimeStepInDays, 1.0);
SET_BOOL_PROP(FlowTimeSteppingParameters, FullTimeStepInitially, false);
template<class TypeTag>
struct FullTimeStepInitially<TypeTag, TTag::FlowTimeSteppingParameters> {
static constexpr bool value = false;
};
SET_SCALAR_PROP(FlowTimeSteppingParameters, TimeStepAfterEventInDays, -1.0);
SET_STRING_PROP(FlowTimeSteppingParameters, TimeStepControl, "pid");
SET_SCALAR_PROP(FlowTimeSteppingParameters, TimeStepControlTolerance, 1e-1);