From e8248b44fffdc880e654833b24001e759e6806e6 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Thu, 27 Aug 2020 10:30:29 +0200 Subject: [PATCH] changed: remove NEW_TYPE_TAG macro usage --- ebos/ebos.hh | 6 +++++- ebos/ebos_altidx.cc | 6 +++++- ebos/ebos_brine.cc | 6 +++++- ebos/ebos_foam.cc | 6 +++++- ebos/ebos_gasoil.cc | 6 +++++- ebos/ebos_oilwater.cc | 6 +++++- ebos/ebos_oilwaterpolymer.cc | 6 +++++- ebos/ebos_plain.cc | 6 +++++- ebos/ebos_polymer.cc | 6 +++++- ebos/ebos_solvent.cc | 6 +++++- ebos/ebos_thermal.cc | 6 +++++- ebos/eclalugridvanguard.hh | 6 +++++- ebos/eclbasevanguard.hh | 4 +++- ebos/eclcpgridvanguard.hh | 6 +++++- ebos/ecloutputblackoilmodule.hh | 4 +++- ebos/eclpolyhedralgridvanguard.hh | 6 +++++- ebos/eclproblem.hh | 21 +++++++++++++------ ebos/vtkecltracermodule.hh | 4 +++- flow/flow_blackoil_dunecpr.cpp | 12 +++++++++-- flow/flow_ebos_brine.cpp | 6 +++++- flow/flow_ebos_energy.cpp | 6 +++++- flow/flow_ebos_foam.cpp | 6 +++++- flow/flow_ebos_gasoil.cpp | 6 +++++- flow/flow_ebos_oilwater.cpp | 6 +++++- flow/flow_ebos_oilwater_brine.cpp | 6 +++++- flow/flow_ebos_oilwater_polymer.cpp | 6 +++++- ...flow_ebos_oilwater_polymer_injectivity.cpp | 6 +++++- flow/flow_ebos_polymer.cpp | 6 +++++- flow/flow_ebos_solvent.cpp | 6 +++++- flow/flow_onephase.cpp | 6 +++++- flow/flow_onephase_energy.cpp | 6 +++++- opm/simulators/flow/BlackoilModelEbos.hpp | 7 ++++++- .../flow/BlackoilModelParametersEbos.hpp | 4 +++- opm/simulators/flow/FlowMainEbos.hpp | 4 ++-- opm/simulators/flow/Main.hpp | 6 +++++- opm/simulators/flow/NonlinearSolverEbos.hpp | 4 +++- .../linalg/FlowLinearSolverParameters.hpp | 4 +++- opm/simulators/linalg/ISTLSolverEbos.hpp | 6 +++++- .../linalg/ISTLSolverEbosFlexible.hpp | 6 +++++- .../timestepping/AdaptiveTimeSteppingEbos.hpp | 4 +++- tests/test_ecl_output.cc | 11 ++++++---- tests/test_equil.cc | 12 ++++++----- 42 files changed, 213 insertions(+), 56 deletions(-) diff --git a/ebos/ebos.hh b/ebos/ebos.hh index 405f4dfe3..9102ad464 100644 --- a/ebos/ebos.hh +++ b/ebos/ebos.hh @@ -43,7 +43,11 @@ class EbosProblem; namespace Opm::Properties { -NEW_TYPE_TAG(EbosTypeTag, INHERITS_FROM(BlackOilModel, EclBaseProblem, FlowModelParameters)); +namespace TTag { +struct EbosTypeTag { + using InheritsFrom = std::tuple; +}; +} // Set the problem class SET_TYPE_PROP(EbosTypeTag, Problem, Opm::EbosProblem); diff --git a/ebos/ebos_altidx.cc b/ebos/ebos_altidx.cc index b7432ea58..30c01c044 100644 --- a/ebos/ebos_altidx.cc +++ b/ebos/ebos_altidx.cc @@ -53,7 +53,11 @@ public: namespace Opm::Properties { -NEW_TYPE_TAG(EbosAltIdxTypeTag, INHERITS_FROM(EbosTypeTag)); +namespace TTag { +struct EbosAltIdxTypeTag { + using InheritsFrom = std::tuple; +}; +} // use a fluid system with different indices than the default SET_PROP(EbosAltIdxTypeTag, FluidSystem) diff --git a/ebos/ebos_brine.cc b/ebos/ebos_brine.cc index 5ecfef6a1..fbce8d330 100644 --- a/ebos/ebos_brine.cc +++ b/ebos/ebos_brine.cc @@ -32,7 +32,11 @@ namespace Opm::Properties { -NEW_TYPE_TAG(EbosBrineTypeTag, INHERITS_FROM(EbosTypeTag)); +namespace TTag { +struct EbosBrineTypeTag { + using InheritsFrom = std::tuple; +}; +} // enable the brine extension of the black oil model SET_BOOL_PROP(EbosBrineTypeTag, EnableBrine, true); diff --git a/ebos/ebos_foam.cc b/ebos/ebos_foam.cc index c5ffaf634..17274799e 100644 --- a/ebos/ebos_foam.cc +++ b/ebos/ebos_foam.cc @@ -32,7 +32,11 @@ namespace Opm::Properties { -NEW_TYPE_TAG(EbosFoamTypeTag, INHERITS_FROM(EbosTypeTag)); +namespace TTag { +struct EbosFoamTypeTag { + using InheritsFrom = std::tuple; +}; +} // enable the foam extension of the black oil model SET_BOOL_PROP(EbosFoamTypeTag, EnableFoam, true); diff --git a/ebos/ebos_gasoil.cc b/ebos/ebos_gasoil.cc index 0152a1bfb..3ab9b0b10 100644 --- a/ebos/ebos_gasoil.cc +++ b/ebos/ebos_gasoil.cc @@ -32,7 +32,11 @@ namespace Opm::Properties { -NEW_TYPE_TAG(EbosGasOilTypeTag, INHERITS_FROM(EbosTypeTag)); +namespace TTag { +struct EbosGasOilTypeTag { + using InheritsFrom = std::tuple; +}; +} //! The indices indices which only enable oil and water SET_PROP(EbosGasOilTypeTag, Indices) diff --git a/ebos/ebos_oilwater.cc b/ebos/ebos_oilwater.cc index 2b230d663..b84e361a3 100644 --- a/ebos/ebos_oilwater.cc +++ b/ebos/ebos_oilwater.cc @@ -32,7 +32,11 @@ namespace Opm::Properties { -NEW_TYPE_TAG(EbosOilWaterTypeTag, INHERITS_FROM(EbosTypeTag)); +namespace TTag { +struct EbosOilWaterTypeTag { + using InheritsFrom = std::tuple; +}; +} //! The indices indices which only enable oil and water SET_PROP(EbosOilWaterTypeTag, Indices) diff --git a/ebos/ebos_oilwaterpolymer.cc b/ebos/ebos_oilwaterpolymer.cc index 3870da8d3..4991fb2c3 100644 --- a/ebos/ebos_oilwaterpolymer.cc +++ b/ebos/ebos_oilwaterpolymer.cc @@ -31,7 +31,11 @@ namespace Opm::Properties { -NEW_TYPE_TAG(EbosOilWaterPolymerTypeTag, INHERITS_FROM(EbosTypeTag)); +namespace TTag { +struct EbosOilWaterPolymerTypeTag { + using InheritsFrom = std::tuple; +}; +} // enable the polymer extension of the black oil model SET_BOOL_PROP(EbosOilWaterPolymerTypeTag, EnablePolymer, true); diff --git a/ebos/ebos_plain.cc b/ebos/ebos_plain.cc index 815afd2b3..089c943f6 100644 --- a/ebos/ebos_plain.cc +++ b/ebos/ebos_plain.cc @@ -33,7 +33,11 @@ namespace Opm::Properties { -NEW_TYPE_TAG(EbosPlainTypeTag, INHERITS_FROM(BlackOilModel, EclBaseProblem)); +namespace TTag { +struct EbosPlainTypeTag { + using InheritsFrom = std::tuple; +}; +} } // namespace Opm::Properties diff --git a/ebos/ebos_polymer.cc b/ebos/ebos_polymer.cc index cd83ec9d3..5ac936c80 100644 --- a/ebos/ebos_polymer.cc +++ b/ebos/ebos_polymer.cc @@ -32,7 +32,11 @@ namespace Opm::Properties { -NEW_TYPE_TAG(EbosPolymerTypeTag, INHERITS_FROM(EbosTypeTag)); +namespace TTag { +struct EbosPolymerTypeTag { + using InheritsFrom = std::tuple; +}; +} // enable the polymer extension of the black oil model SET_BOOL_PROP(EbosPolymerTypeTag, EnablePolymer, true); diff --git a/ebos/ebos_solvent.cc b/ebos/ebos_solvent.cc index dd246cdb8..ccf28a368 100644 --- a/ebos/ebos_solvent.cc +++ b/ebos/ebos_solvent.cc @@ -32,7 +32,11 @@ namespace Opm::Properties { -NEW_TYPE_TAG(EbosSolventTypeTag, INHERITS_FROM(EbosTypeTag)); +namespace TTag { +struct EbosSolventTypeTag { + using InheritsFrom = std::tuple; +}; +} // enable the solvent extension of the black oil model SET_BOOL_PROP(EbosSolventTypeTag, EnableSolvent, true); diff --git a/ebos/ebos_thermal.cc b/ebos/ebos_thermal.cc index 9b4964a03..1ba1862fc 100644 --- a/ebos/ebos_thermal.cc +++ b/ebos/ebos_thermal.cc @@ -32,7 +32,11 @@ namespace Opm::Properties { -NEW_TYPE_TAG(EbosThermalTypeTag, INHERITS_FROM(EbosTypeTag)); +namespace TTag { +struct EbosThermalTypeTag { + using InheritsFrom = std::tuple; +}; +} // enable the energy extension of the black oil model SET_BOOL_PROP(EbosThermalTypeTag, EnableEnergy, true); diff --git a/ebos/eclalugridvanguard.hh b/ebos/eclalugridvanguard.hh index f04392cd0..efdd9ca7e 100644 --- a/ebos/eclalugridvanguard.hh +++ b/ebos/eclalugridvanguard.hh @@ -42,7 +42,11 @@ class EclAluGridVanguard; namespace Opm::Properties { -NEW_TYPE_TAG(EclAluGridVanguard, INHERITS_FROM(EclBaseVanguard)); +namespace TTag { +struct EclAluGridVanguard { + using InheritsFrom = std::tuple; +}; +} // declare the properties SET_TYPE_PROP(EclAluGridVanguard, Vanguard, Opm::EclAluGridVanguard); diff --git a/ebos/eclbasevanguard.hh b/ebos/eclbasevanguard.hh index ab4c885de..2b6e3918b 100644 --- a/ebos/eclbasevanguard.hh +++ b/ebos/eclbasevanguard.hh @@ -67,7 +67,9 @@ class EclBaseVanguard; namespace Opm::Properties { -NEW_TYPE_TAG(EclBaseVanguard); +namespace TTag { +struct EclBaseVanguard {}; +} // declare the properties required by the for the ecl simulator vanguard NEW_PROP_TAG(EquilGrid); diff --git a/ebos/eclcpgridvanguard.hh b/ebos/eclcpgridvanguard.hh index bcbf0fc97..5ac135c92 100644 --- a/ebos/eclcpgridvanguard.hh +++ b/ebos/eclcpgridvanguard.hh @@ -49,7 +49,11 @@ class EclCpGridVanguard; namespace Opm::Properties { -NEW_TYPE_TAG(EclCpGridVanguard, INHERITS_FROM(EclBaseVanguard)); +namespace TTag { +struct EclCpGridVanguard { + using InheritsFrom = std::tuple; +}; +} // declare the properties SET_TYPE_PROP(EclCpGridVanguard, Vanguard, Opm::EclCpGridVanguard); diff --git a/ebos/ecloutputblackoilmodule.hh b/ebos/ecloutputblackoilmodule.hh index 8d6c3aa2e..751941efc 100644 --- a/ebos/ecloutputblackoilmodule.hh +++ b/ebos/ecloutputblackoilmodule.hh @@ -47,7 +47,9 @@ namespace Opm::Properties { // create new type tag for the Ecl-output -NEW_TYPE_TAG(EclOutputBlackOil); +namespace TTag { +struct EclOutputBlackOil {}; +} NEW_PROP_TAG(ForceDisableFluidInPlaceOutput); diff --git a/ebos/eclpolyhedralgridvanguard.hh b/ebos/eclpolyhedralgridvanguard.hh index 4697a30bb..d33db733f 100644 --- a/ebos/eclpolyhedralgridvanguard.hh +++ b/ebos/eclpolyhedralgridvanguard.hh @@ -39,7 +39,11 @@ class EclPolyhedralGridVanguard; namespace Opm::Properties { -NEW_TYPE_TAG(EclPolyhedralGridVanguard, INHERITS_FROM(EclBaseVanguard)); +namespace TTag { +struct EclPolyhedralGridVanguard { + using InheritsFrom = std::tuple; +}; +} // declare the properties SET_TYPE_PROP(EclPolyhedralGridVanguard, Vanguard, Opm::EclPolyhedralGridVanguard); diff --git a/ebos/eclproblem.hh b/ebos/eclproblem.hh index 1138ea085..88937b1a6 100644 --- a/ebos/eclproblem.hh +++ b/ebos/eclproblem.hh @@ -118,12 +118,21 @@ class EclProblem; namespace Opm::Properties { +namespace TTag { + #if EBOS_USE_ALUGRID -NEW_TYPE_TAG(EclBaseProblem, INHERITS_FROM(EclAluGridVanguard, EclOutputBlackOil, VtkEclTracer)); +struct EclBaseProblem { + using InheritstFrom = std::tuple; +}; #else -NEW_TYPE_TAG(EclBaseProblem, INHERITS_FROM(EclCpGridVanguard, EclOutputBlackOil, VtkEclTracer)); -//NEW_TYPE_TAG(EclBaseProblem, INHERITS_FROM(EclPolyhedralGridVanguard, EclOutputBlackOil, VtkEclTracer)); +struct EclBaseProblem { + using InheritsFrom = std::tuple; +}; +//struct EclBaseProblem { +// using InheritsFrom = std::tuple; +//}; #endif +} // The class which deals with ECL wells NEW_PROP_TAG(EclWellModel); @@ -431,8 +440,8 @@ class EclProblem : public GetPropType using Simulator = GetPropType; using Element = typename GridView::template Codim<0>::Entity; using ElementContext = GetPropType; - using EclMaterialLawManager = typename GET_PROP(TypeTag, MaterialLaw)::EclMaterialLawManager; - using EclThermalLawManager = typename GET_PROP(TypeTag, SolidEnergyLaw)::EclThermalLawManager; + using EclMaterialLawManager = typename GetProp::EclMaterialLawManager; + using EclThermalLawManager = typename GetProp::EclThermalLawManager; using MaterialLawParams = typename EclMaterialLawManager::MaterialLawParams; using SolidEnergyLawParams = typename EclThermalLawManager::SolidEnergyLawParams; using ThermalConductionLawParams = typename EclThermalLawManager::ThermalConductionLawParams; @@ -521,7 +530,7 @@ public: int paramIdx, int posParamIdx OPM_UNUSED) { - typedef typename GET_PROP(TypeTag, ParameterMetaData) ParamsMeta; + using ParamsMeta = GetProp; Dune::ParameterTree& tree = ParamsMeta::tree(); std::string param = argv[paramIdx]; diff --git a/ebos/vtkecltracermodule.hh b/ebos/vtkecltracermodule.hh index bae0208b5..b6d26dace 100644 --- a/ebos/vtkecltracermodule.hh +++ b/ebos/vtkecltracermodule.hh @@ -43,7 +43,9 @@ namespace Opm::Properties { // create new type tag for the VTK tracer output -NEW_TYPE_TAG(VtkEclTracer); +namespace TTag { +struct VtkEclTracer {}; +} // create the property tags needed for the tracer model NEW_PROP_TAG(VtkWriteEclTracerConcentration); diff --git a/flow/flow_blackoil_dunecpr.cpp b/flow/flow_blackoil_dunecpr.cpp index 64b10cd2e..d0b4cc10e 100644 --- a/flow/flow_blackoil_dunecpr.cpp +++ b/flow/flow_blackoil_dunecpr.cpp @@ -26,7 +26,11 @@ namespace Opm { namespace Properties { - NEW_TYPE_TAG(EclFlowProblemSimple, INHERITS_FROM(EclFlowProblem)); + namespace TTag { + struct EclFlowProblemSimple { + using InheritsFrom = std::tuple; + }; + } SET_BOOL_PROP(EclFlowProblemSimple, MatrixAddWellContributions, true); SET_INT_PROP(EclFlowProblemSimple, LinearSolverVerbosity,0); @@ -50,7 +54,11 @@ namespace Opm { public: typedef Opm::BlackOilFluidSystem type; }; - //NEW_TYPE_TAG(EclFlowProblem, INHERITS_FROM(BlackOilModel, EclBaseProblem)); +// namespace TTag { +// struct EclFlowProblemSimple { +// using InheritsFrom = std::tuple; +// }; +// } SET_TYPE_PROP(EclFlowProblemSimple, IntensiveQuantities, Opm::BlackOilIntensiveQuantities); //SET_TYPE_PROP(EclFlowProblemSimple, LinearSolverBackend, Opm::ISTLSolverEbos); //SET_TAG_PROP(EclFlowProblemSimple, LinearSolverSplice, ParallelBiCGStabLinearSolver); diff --git a/flow/flow_ebos_brine.cpp b/flow/flow_ebos_brine.cpp index ce67eda48..cdc105e1e 100644 --- a/flow/flow_ebos_brine.cpp +++ b/flow/flow_ebos_brine.cpp @@ -31,7 +31,11 @@ namespace Opm { namespace Properties { -NEW_TYPE_TAG(EclFlowBrineProblem, INHERITS_FROM(EclFlowProblem)); +namespace TTag { +struct EclFlowBrineProblem { + using InheritsFrom = std::tuple; +}; +} SET_BOOL_PROP(EclFlowBrineProblem, EnableBrine, true); }} diff --git a/flow/flow_ebos_energy.cpp b/flow/flow_ebos_energy.cpp index bbf886065..117023b06 100644 --- a/flow/flow_ebos_energy.cpp +++ b/flow/flow_ebos_energy.cpp @@ -31,7 +31,11 @@ namespace Opm { namespace Properties { -NEW_TYPE_TAG(EclFlowEnergyProblem, INHERITS_FROM(EclFlowProblem)); +namespace TTag { +struct EclFlowEnergyProblem { + using InheritsFrom = std::tuple; +}; +} SET_BOOL_PROP(EclFlowEnergyProblem, EnableEnergy, true); }} diff --git a/flow/flow_ebos_foam.cpp b/flow/flow_ebos_foam.cpp index 7958fbce4..b0c806bf3 100644 --- a/flow/flow_ebos_foam.cpp +++ b/flow/flow_ebos_foam.cpp @@ -31,7 +31,11 @@ namespace Opm { namespace Properties { -NEW_TYPE_TAG(EclFlowFoamProblem, INHERITS_FROM(EclFlowProblem)); +namespace TTag { +struct EclFlowFoamProblem { + using InheritsFrom = std::tuple; +}; +} SET_BOOL_PROP(EclFlowFoamProblem, EnableFoam, true); }} diff --git a/flow/flow_ebos_gasoil.cpp b/flow/flow_ebos_gasoil.cpp index 1dce3930f..8fb0254b0 100644 --- a/flow/flow_ebos_gasoil.cpp +++ b/flow/flow_ebos_gasoil.cpp @@ -36,7 +36,11 @@ namespace Opm { namespace Properties { -NEW_TYPE_TAG(EclFlowGasOilProblem, INHERITS_FROM(EclFlowProblem)); +namespace TTag { +struct EclFlowGasOilProblem { + using InheritsFrom = std::tuple; +}; +} //! The indices required by the model SET_PROP(EclFlowGasOilProblem, Indices) diff --git a/flow/flow_ebos_oilwater.cpp b/flow/flow_ebos_oilwater.cpp index 1949560b5..407115b65 100644 --- a/flow/flow_ebos_oilwater.cpp +++ b/flow/flow_ebos_oilwater.cpp @@ -36,7 +36,11 @@ namespace Opm { namespace Properties { -NEW_TYPE_TAG(EclFlowOilWaterProblem, INHERITS_FROM(EclFlowProblem)); +namespace TTag { +struct EclFlowOilWaterProblem { + using InheritsFrom = std::tuple; +}; +} //! The indices required by the model SET_PROP(EclFlowOilWaterProblem, Indices) diff --git a/flow/flow_ebos_oilwater_brine.cpp b/flow/flow_ebos_oilwater_brine.cpp index 6fefd7f62..157418cbf 100644 --- a/flow/flow_ebos_oilwater_brine.cpp +++ b/flow/flow_ebos_oilwater_brine.cpp @@ -36,7 +36,11 @@ namespace Opm { namespace Properties { -NEW_TYPE_TAG(EclFlowOilWaterBrineProblem, INHERITS_FROM(EclFlowProblem)); +namespace TTag { +struct EclFlowOilWaterBrineProblem { + using InheritsFrom = std::tuple; +}; +} SET_BOOL_PROP(EclFlowOilWaterBrineProblem, EnableBrine, true); //! The indices required by the model SET_PROP(EclFlowOilWaterBrineProblem, Indices) diff --git a/flow/flow_ebos_oilwater_polymer.cpp b/flow/flow_ebos_oilwater_polymer.cpp index ad3fe6698..94e9311af 100644 --- a/flow/flow_ebos_oilwater_polymer.cpp +++ b/flow/flow_ebos_oilwater_polymer.cpp @@ -36,7 +36,11 @@ namespace Opm { namespace Properties { -NEW_TYPE_TAG(EclFlowOilWaterPolymerProblem, INHERITS_FROM(EclFlowProblem)); +namespace TTag { +struct EclFlowOilWaterPolymerProblem { + using InheritsFrom = std::tuple; +}; +} SET_BOOL_PROP(EclFlowOilWaterPolymerProblem, EnablePolymer, true); //! The indices required by the model //! The indices required by the model diff --git a/flow/flow_ebos_oilwater_polymer_injectivity.cpp b/flow/flow_ebos_oilwater_polymer_injectivity.cpp index 14e9be2f4..31efd5efa 100644 --- a/flow/flow_ebos_oilwater_polymer_injectivity.cpp +++ b/flow/flow_ebos_oilwater_polymer_injectivity.cpp @@ -36,7 +36,11 @@ namespace Opm { namespace Properties { -NEW_TYPE_TAG(EclFlowOilWaterPolymerInjectivityProblem, INHERITS_FROM(EclFlowProblem)); +namespace TTag { +struct EclFlowOilWaterPolymerInjectivityProblem { + using InheritsFrom = std::tuple; +}; +} SET_BOOL_PROP(EclFlowOilWaterPolymerInjectivityProblem, EnablePolymer, true); SET_BOOL_PROP(EclFlowOilWaterPolymerInjectivityProblem, EnablePolymerMW, true); //! The indices required by the model diff --git a/flow/flow_ebos_polymer.cpp b/flow/flow_ebos_polymer.cpp index a18c56688..a50fb1cbc 100644 --- a/flow/flow_ebos_polymer.cpp +++ b/flow/flow_ebos_polymer.cpp @@ -31,7 +31,11 @@ namespace Opm { namespace Properties { -NEW_TYPE_TAG(EclFlowPolymerProblem, INHERITS_FROM(EclFlowProblem)); +namespace TTag { +struct EclFlowPolymerProblem { + using InheritsFrom = std::tuple; +}; +} SET_BOOL_PROP(EclFlowPolymerProblem, EnablePolymer, true); }} diff --git a/flow/flow_ebos_solvent.cpp b/flow/flow_ebos_solvent.cpp index 29b370c3a..655448296 100644 --- a/flow/flow_ebos_solvent.cpp +++ b/flow/flow_ebos_solvent.cpp @@ -31,7 +31,11 @@ namespace Opm { namespace Properties { -NEW_TYPE_TAG(EclFlowSolventProblem, INHERITS_FROM(EclFlowProblem)); +namespace TTag { +struct EclFlowSolventProblem { + using InheritsFrom = std::tuple; +}; +} SET_BOOL_PROP(EclFlowSolventProblem, EnableSolvent, true); }} diff --git a/flow/flow_onephase.cpp b/flow/flow_onephase.cpp index 298dd8cbb..b6c3c6a98 100644 --- a/flow/flow_onephase.cpp +++ b/flow/flow_onephase.cpp @@ -25,7 +25,11 @@ namespace Opm::Properties { -NEW_TYPE_TAG(EclFlowProblemSimple, INHERITS_FROM(EclFlowProblem)); +namespace TTag { +struct EclFlowProblemSimple { + using InheritsFrom = std::tuple; +}; +} //! The indices required by the model SET_PROP(EclFlowProblemSimple, Indices) { diff --git a/flow/flow_onephase_energy.cpp b/flow/flow_onephase_energy.cpp index 0197a1bde..dc749763a 100644 --- a/flow/flow_onephase_energy.cpp +++ b/flow/flow_onephase_energy.cpp @@ -24,7 +24,11 @@ namespace Opm::Properties { -NEW_TYPE_TAG(EclFlowProblemSimple, INHERITS_FROM(EclFlowProblem)); +namespace TTag { +struct EclFlowProblemSimple { + using InheritsFrom = std::tuple; +}; +} SET_BOOL_PROP(EclFlowProblemSimple, EnableEnergy, true); //! The indices required by the model SET_PROP(EclFlowProblemSimple, Indices) diff --git a/opm/simulators/flow/BlackoilModelEbos.hpp b/opm/simulators/flow/BlackoilModelEbos.hpp index 78d2daf46..a01bbfe12 100644 --- a/opm/simulators/flow/BlackoilModelEbos.hpp +++ b/opm/simulators/flow/BlackoilModelEbos.hpp @@ -71,7 +71,12 @@ namespace Opm::Properties { -NEW_TYPE_TAG(EclFlowProblem, INHERITS_FROM(BlackOilModel, EclBaseProblem, FlowNonLinearSolver, FlowModelParameters, FlowTimeSteppingParameters)); +namespace TTag { +struct EclFlowProblem { + using InheritsFrom = std::tuple; +}; +} SET_STRING_PROP(EclFlowProblem, OutputDir, ""); SET_BOOL_PROP(EclFlowProblem, EnableDebuggingChecks, false); // default in flow is to formulate the equations in surface volumes diff --git a/opm/simulators/flow/BlackoilModelParametersEbos.hpp b/opm/simulators/flow/BlackoilModelParametersEbos.hpp index a15dcef47..8a18ba09f 100644 --- a/opm/simulators/flow/BlackoilModelParametersEbos.hpp +++ b/opm/simulators/flow/BlackoilModelParametersEbos.hpp @@ -27,7 +27,9 @@ namespace Opm::Properties { -NEW_TYPE_TAG(FlowModelParameters); +namespace TTag { +struct FlowModelParameters {}; +} NEW_PROP_TAG(DbhpMaxRel); NEW_PROP_TAG(DwellFractionMax); diff --git a/opm/simulators/flow/FlowMainEbos.hpp b/opm/simulators/flow/FlowMainEbos.hpp index 0f79e4040..dd63db85b 100644 --- a/opm/simulators/flow/FlowMainEbos.hpp +++ b/opm/simulators/flow/FlowMainEbos.hpp @@ -69,7 +69,7 @@ namespace Opm class FlowMainEbos { public: - typedef typename GET_PROP(TypeTag, MaterialLaw)::EclMaterialLawManager MaterialLawManager; + using MaterialLawManager = typename GetProp::EclMaterialLawManager; using EbosSimulator = GetPropType; using Grid = GetPropType; using GridView = GetPropType; @@ -89,7 +89,7 @@ namespace Opm // Read the command line parameters. Throws an exception if something goes wrong. static int setupParameters_(int argc, char** argv) { - using ParamsMeta = typename GET_PROP(TypeTag, ParameterMetaData); + using ParamsMeta = GetProp; if (!ParamsMeta::registrationOpen()) { // We have already successfully run setupParameters_(). // For the dynamically chosen runs (as from the main flow diff --git a/opm/simulators/flow/Main.hpp b/opm/simulators/flow/Main.hpp index 6633fab68..100118323 100644 --- a/opm/simulators/flow/Main.hpp +++ b/opm/simulators/flow/Main.hpp @@ -67,7 +67,11 @@ namespace Opm::Properties { // this is a dummy type tag that is used to setup the parameters before the actual // simulator. -NEW_TYPE_TAG(FlowEarlyBird, INHERITS_FROM(EclFlowProblem)); +namespace TTag { +struct FlowEarlyBird { + using InheritsFrom = std::tuple; +}; +} } // namespace Opm::Properties diff --git a/opm/simulators/flow/NonlinearSolverEbos.hpp b/opm/simulators/flow/NonlinearSolverEbos.hpp index 33abafb71..9f0bc6d66 100644 --- a/opm/simulators/flow/NonlinearSolverEbos.hpp +++ b/opm/simulators/flow/NonlinearSolverEbos.hpp @@ -36,7 +36,9 @@ namespace Opm::Properties { -NEW_TYPE_TAG(FlowNonLinearSolver); +namespace TTag { +struct FlowNonLinearSolver {}; +} NEW_PROP_TAG(NewtonMaxRelax); NEW_PROP_TAG(FlowNewtonMaxIterations); diff --git a/opm/simulators/linalg/FlowLinearSolverParameters.hpp b/opm/simulators/linalg/FlowLinearSolverParameters.hpp index 05c334010..3f3057464 100644 --- a/opm/simulators/linalg/FlowLinearSolverParameters.hpp +++ b/opm/simulators/linalg/FlowLinearSolverParameters.hpp @@ -41,7 +41,9 @@ class ISTLSolverEbos; namespace Opm::Properties { -NEW_TYPE_TAG(FlowIstlSolverParams); +namespace TTag { +struct FlowIstlSolverParams {}; +} NEW_PROP_TAG(LinearSolverReduction); NEW_PROP_TAG(IluRelaxation); diff --git a/opm/simulators/linalg/ISTLSolverEbos.hpp b/opm/simulators/linalg/ISTLSolverEbos.hpp index ea9404b4f..9093a0f3a 100644 --- a/opm/simulators/linalg/ISTLSolverEbos.hpp +++ b/opm/simulators/linalg/ISTLSolverEbos.hpp @@ -56,7 +56,11 @@ namespace Opm::Properties { -NEW_TYPE_TAG(FlowIstlSolver, INHERITS_FROM(FlowIstlSolverParams)); +namespace TTag { +struct FlowIstlSolver { + using InheritsFrom = std::tuple; +}; +} template struct EclWellModel; diff --git a/opm/simulators/linalg/ISTLSolverEbosFlexible.hpp b/opm/simulators/linalg/ISTLSolverEbosFlexible.hpp index 82d6d8484..d6994b781 100644 --- a/opm/simulators/linalg/ISTLSolverEbosFlexible.hpp +++ b/opm/simulators/linalg/ISTLSolverEbosFlexible.hpp @@ -35,7 +35,11 @@ namespace Opm::Properties { -NEW_TYPE_TAG(FlowIstlSolverFlexible, INHERITS_FROM(FlowIstlSolverParams)); +namespace TTag { +struct FlowIstlSolverFlexible { + using InheritsFrom = std::tuple; +}; +} } // namespace Opm::Properties diff --git a/opm/simulators/timestepping/AdaptiveTimeSteppingEbos.hpp b/opm/simulators/timestepping/AdaptiveTimeSteppingEbos.hpp index 4e9e5b9ce..563a29152 100644 --- a/opm/simulators/timestepping/AdaptiveTimeSteppingEbos.hpp +++ b/opm/simulators/timestepping/AdaptiveTimeSteppingEbos.hpp @@ -19,7 +19,9 @@ namespace Opm::Properties { -NEW_TYPE_TAG(FlowTimeSteppingParameters); +namespace TTag { +struct FlowTimeSteppingParameters {}; +} NEW_PROP_TAG(SolverRestartFactor); NEW_PROP_TAG(SolverGrowthFactor); diff --git a/tests/test_ecl_output.cc b/tests/test_ecl_output.cc index 2804cd8ed..9c209e790 100644 --- a/tests/test_ecl_output.cc +++ b/tests/test_ecl_output.cc @@ -76,13 +76,16 @@ } -BEGIN_PROPERTIES - -NEW_TYPE_TAG(TestEclOutputTypeTag, INHERITS_FROM(BlackOilModel, EclBaseProblem)); +namespace Opm::Properties { +namespace TTag { +struct TestEclOutputTypeTag { + using InheritsFrom = std::tuple; +}; +} SET_BOOL_PROP(TestEclOutputTypeTag, EnableGravity, false); SET_BOOL_PROP(TestEclOutputTypeTag, EnableAsyncEclOutput, false); -END_PROPERTIES +} // namespace Opm::Properties namespace { std::unique_ptr readsum(const std::string& base) diff --git a/tests/test_equil.cc b/tests/test_equil.cc index 1a9ad83bc..6c676f6f7 100644 --- a/tests/test_equil.cc +++ b/tests/test_equil.cc @@ -70,11 +70,13 @@ throw std::runtime_error("Test condition failed"); \ } -BEGIN_PROPERTIES - -NEW_TYPE_TAG(TestEquilTypeTag, INHERITS_FROM(BlackOilModel, EclBaseProblem)); - -END_PROPERTIES +namespace Opm::Properties { +namespace TTag { +struct TestEquilTypeTag { + using InheritsFrom = std::tuple; +}; +} +} // namespace Opm::Properties template std::unique_ptr>