diff --git a/ebos/ebos.hh b/ebos/ebos.hh index b46450aca..00b149cd6 100644 --- a/ebos/ebos.hh +++ b/ebos/ebos.hh @@ -50,7 +50,10 @@ struct EbosTypeTag { } // Set the problem class -SET_TYPE_PROP(EbosTypeTag, Problem, Opm::EbosProblem); +template +struct Problem { + using type = Opm::EbosProblem; +}; // Enable experimental features for ebos: ebos is the research simulator of the OPM // project. If you're looking for a more stable "production quality" simulator, consider @@ -61,7 +64,10 @@ struct EnableExperiments { }; // use flow's well model for now -SET_TYPE_PROP(EbosTypeTag, EclWellModel, Opm::BlackoilWellModel); +template +struct EclWellModel { + using type = Opm::BlackoilWellModel; +}; // currently, ebos uses the non-multisegment well model by default to avoid // regressions. the --use-multisegment-well=true|false command line parameter is still @@ -95,7 +101,10 @@ struct UseVolumetricResidual { }; // by default use flow's aquifer model for now -SET_TYPE_PROP(EbosTypeTag, EclAquiferModel, Opm::BlackoilAquiferModel); +template +struct EclAquiferModel { + using type = Opm::BlackoilAquiferModel; +}; // use flow's linear solver backend for now SET_TAG_PROP(EbosTypeTag, LinearSolverSplice, FlowIstlSolver); diff --git a/ebos/eclalugridvanguard.hh b/ebos/eclalugridvanguard.hh index efdd9ca7e..3c829c00d 100644 --- a/ebos/eclalugridvanguard.hh +++ b/ebos/eclalugridvanguard.hh @@ -49,9 +49,18 @@ struct EclAluGridVanguard { } // declare the properties -SET_TYPE_PROP(EclAluGridVanguard, Vanguard, Opm::EclAluGridVanguard); -SET_TYPE_PROP(EclAluGridVanguard, Grid, Dune::ALUGrid<3, 3, Dune::cube, Dune::nonconforming>); -SET_TYPE_PROP(EclAluGridVanguard, EquilGrid, Dune::CpGrid); +template +struct Vanguard { + using type = Opm::EclAluGridVanguard; +}; +template +struct Grid { + using type = Dune::ALUGrid<3, 3, Dune::cube, Dune::nonconforming>; +}; +template +struct EquilGrid { + using type = Dune::CpGrid; +}; } // namespace Opm::Properties diff --git a/ebos/eclcpgridvanguard.hh b/ebos/eclcpgridvanguard.hh index 5ac135c92..6dbc3a520 100644 --- a/ebos/eclcpgridvanguard.hh +++ b/ebos/eclcpgridvanguard.hh @@ -56,9 +56,18 @@ struct EclCpGridVanguard { } // declare the properties -SET_TYPE_PROP(EclCpGridVanguard, Vanguard, Opm::EclCpGridVanguard); -SET_TYPE_PROP(EclCpGridVanguard, Grid, Dune::CpGrid); -SET_TYPE_PROP(EclCpGridVanguard, EquilGrid, GetPropType); +template +struct Vanguard { + using type = Opm::EclCpGridVanguard; +}; +template +struct Grid { + using type = Dune::CpGrid; +}; +template +struct EquilGrid { + using type = GetPropType; +}; } // namespace Opm::Properties diff --git a/ebos/eclpolyhedralgridvanguard.hh b/ebos/eclpolyhedralgridvanguard.hh index d33db733f..d96b0b64b 100644 --- a/ebos/eclpolyhedralgridvanguard.hh +++ b/ebos/eclpolyhedralgridvanguard.hh @@ -46,9 +46,18 @@ struct EclPolyhedralGridVanguard { } // declare the properties -SET_TYPE_PROP(EclPolyhedralGridVanguard, Vanguard, Opm::EclPolyhedralGridVanguard); -SET_TYPE_PROP(EclPolyhedralGridVanguard, Grid, Dune::PolyhedralGrid<3, 3>); -SET_TYPE_PROP(EclPolyhedralGridVanguard, EquilGrid, GetPropType); +template +struct Vanguard { + using type = Opm::EclPolyhedralGridVanguard; +}; +template +struct Grid { + using type = Dune::PolyhedralGrid<3, 3>; +}; +template +struct EquilGrid { + using type = GetPropType; +}; } // namespace Opm::Properties diff --git a/ebos/eclproblem.hh b/ebos/eclproblem.hh index fb1cdf412..5e2e11531 100644 --- a/ebos/eclproblem.hh +++ b/ebos/eclproblem.hh @@ -213,7 +213,10 @@ struct OutputMode { }; // Set the problem property -SET_TYPE_PROP(EclBaseProblem, Problem, Opm::EclProblem); +template +struct Problem { + using type = Opm::EclProblem; +}; // Select the element centered finite volume method as spatial discretization SET_TAG_PROP(EclBaseProblem, SpatialDiscretizationSplice, EcfvDiscretization); @@ -285,10 +288,16 @@ public: }; // by default use the dummy aquifer "model" -SET_TYPE_PROP(EclBaseProblem, EclAquiferModel, Opm::EclBaseAquiferModel); +template +struct EclAquiferModel { + using type = Opm::EclBaseAquiferModel; +}; // use the built-in proof of concept well model by default -SET_TYPE_PROP(EclBaseProblem, EclWellModel, EclWellManager); +template +struct EclWellModel { + using type = EclWellManager; +}; // Enable aquifers by default in experimental mode template @@ -452,14 +461,23 @@ struct EnableStorageCache { }; // Use the "velocity module" which uses the Eclipse "NEWTRAN" transmissibilities -SET_TYPE_PROP(EclBaseProblem, FluxModule, Opm::EclTransFluxModule); +template +struct FluxModule { + using type = Opm::EclTransFluxModule; +}; // Use the dummy gradient calculator in order not to do unnecessary work. -SET_TYPE_PROP(EclBaseProblem, GradientCalculator, Opm::EclDummyGradientCalculator); +template +struct GradientCalculator { + using type = Opm::EclDummyGradientCalculator; +}; // Use a custom Newton-Raphson method class for ebos in order to attain more // sophisticated update and error computation mechanisms -SET_TYPE_PROP(EclBaseProblem, NewtonMethod, Opm::EclNewtonMethod); +template +struct NewtonMethod { + using type = Opm::EclNewtonMethod; +}; // The frequency of writing restart (*.ers) files. This is the number of time steps // between writing restart files diff --git a/flow/flow_blackoil_dunecpr.cpp b/flow/flow_blackoil_dunecpr.cpp index c9aac77d3..a5ddea16d 100644 --- a/flow/flow_blackoil_dunecpr.cpp +++ b/flow/flow_blackoil_dunecpr.cpp @@ -97,13 +97,29 @@ namespace Opm { // using InheritsFrom = std::tuple; // }; // } - SET_TYPE_PROP(EclFlowProblemSimple, IntensiveQuantities, Opm::BlackOilIntensiveQuantities); - //SET_TYPE_PROP(EclFlowProblemSimple, LinearSolverBackend, Opm::ISTLSolverEbos); + template + struct IntensiveQuantities { + using type = Opm::BlackOilIntensiveQuantities; + }; +// template +// struct LinearSolverBackend { +// using type = Opm::ISTLSolverEbos; +// }; //SET_TAG_PROP(EclFlowProblemSimple, LinearSolverSplice, ParallelBiCGStabLinearSolver); - //SET_TYPE_PROP(EclFlowProblemSimple, LinearSolverBackend, Opm::Linear::ParallelBiCGStabSolverBackend);//not work - //SET_TYPE_PROP(EclFlowProblemSimple, LinearSolverBackend, Opm::Linear::SuperLUBackend)//not work +// template +// struct LinearSolverBackend { +// using type = Opm::Linear::ParallelBiCGStabSolverBackend; // not work +// }; +// template +// struct LinearSolverBackend { +// using type = Opm::Linear::SuperLUBackend; // not work +// }; //SET_TAG_PROP(EclFlowProblem, FluidState, Opm::BlackOilFluidState); - SET_TYPE_PROP(EclFlowProblemSimple, LinearSolverBackend, Opm::ISTLSolverEbosFlexible); + + template + struct LinearSolverBackend { + using type = Opm::ISTLSolverEbosFlexible; + }; template struct EnableStorageCache { static constexpr bool value = true; diff --git a/opm/simulators/flow/BlackoilModelEbos.hpp b/opm/simulators/flow/BlackoilModelEbos.hpp index 02e82fe07..1b966d614 100644 --- a/opm/simulators/flow/BlackoilModelEbos.hpp +++ b/opm/simulators/flow/BlackoilModelEbos.hpp @@ -95,7 +95,10 @@ struct UseVolumetricResidual { static constexpr bool value = false; }; -SET_TYPE_PROP(EclFlowProblem, EclAquiferModel, Opm::BlackoilAquiferModel); +template +struct EclAquiferModel { + using type = Opm::BlackoilAquiferModel; +}; // disable all extensions supported by black oil model. this should not really be // necessary but it makes things a bit more explicit @@ -124,7 +127,10 @@ struct EnableBrine { static constexpr bool value = false; }; -SET_TYPE_PROP(EclFlowProblem, EclWellModel, Opm::BlackoilWellModel); +template +struct EclWellModel { + using type = Opm::BlackoilWellModel; +}; SET_TAG_PROP(EclFlowProblem, LinearSolverSplice, FlowIstlSolver); } // namespace Opm::Properties diff --git a/opm/simulators/linalg/FlowLinearSolverParameters.hpp b/opm/simulators/linalg/FlowLinearSolverParameters.hpp index 7c9512151..21f73102b 100644 --- a/opm/simulators/linalg/FlowLinearSolverParameters.hpp +++ b/opm/simulators/linalg/FlowLinearSolverParameters.hpp @@ -212,7 +212,10 @@ template struct UseCpr { static constexpr bool value = false; }; -SET_TYPE_PROP(FlowIstlSolverParams, LinearSolverBackend, Opm::ISTLSolverEbos); +template +struct LinearSolverBackend { + using type = Opm::ISTLSolverEbos; +}; template struct PreconditionerAddWellContributions { static constexpr bool value = false;