diff --git a/ebos/ebos_altidx.cc b/ebos/ebos_altidx.cc index 54aa92001..b7432ea58 100644 --- a/ebos/ebos_altidx.cc +++ b/ebos/ebos_altidx.cc @@ -58,7 +58,7 @@ NEW_TYPE_TAG(EbosAltIdxTypeTag, INHERITS_FROM(EbosTypeTag)); // use a fluid system with different indices than the default SET_PROP(EbosAltIdxTypeTag, FluidSystem) { - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; + using Scalar = GetPropType; public: typedef Opm::BlackOilFluidSystem type; @@ -68,6 +68,6 @@ public: int main(int argc, char **argv) { - typedef TTAG(EbosAltIdxTypeTag) ProblemTypeTag; + using ProblemTypeTag = Opm::Properties::TTag::EbosAltIdxTypeTag; return Opm::startEbos(argc, argv); } diff --git a/ebos/ebos_blackoil.cc b/ebos/ebos_blackoil.cc index 8ee9e5bd0..0f1e570a3 100644 --- a/ebos/ebos_blackoil.cc +++ b/ebos/ebos_blackoil.cc @@ -34,30 +34,30 @@ namespace Opm { bool ebosBlackOilDeckFileNameIsSet(int argc, char** argv) { - typedef TTAG(EbosTypeTag) ProblemTypeTag; + using ProblemTypeTag = Properties::TTag::EbosTypeTag; // use the ewoms parameter machinery and the blackoil vanguard to handle the grunt of // the work - EWOMS_RESET_PARAMS_(ProblemTypeTag); + Parameters::reset(); Opm::setupParameters_(argc, const_cast(argv), /*doRegistration=*/true, /*allowUnused=*/true, /*handleHelp=*/false); bool result = EWOMS_PARAM_IS_SET(ProblemTypeTag, std::string, EclDeckFileName); - EWOMS_RESET_PARAMS_(ProblemTypeTag); + Parameters::reset(); return result; } std::string ebosBlackOilGetDeckFileName(int argc, char** argv) { - typedef TTAG(EbosTypeTag) ProblemTypeTag; - typedef GET_PROP_TYPE(ProblemTypeTag, Vanguard) Vanguard; + using ProblemTypeTag = Properties::TTag::EbosTypeTag; + using Vanguard = GetPropType; // use the ewoms parameter machinery and the blackoil vanguard to handle the grunt of // the work - EWOMS_RESET_PARAMS_(ProblemTypeTag); + Parameters::reset(); Opm::setupParameters_(argc, const_cast(argv), /*doRegistration=*/true, @@ -65,26 +65,26 @@ std::string ebosBlackOilGetDeckFileName(int argc, char** argv) /*handleHelp=*/false); std::string rawDeckFileName = EWOMS_GET_PARAM(ProblemTypeTag, std::string, EclDeckFileName); std::string result = Vanguard::canonicalDeckPath(rawDeckFileName).string(); - EWOMS_RESET_PARAMS_(ProblemTypeTag); + Parameters::reset(); return result; } std::unique_ptr ebosBlackOilCreateParseContext(int argc, char** argv) { - typedef TTAG(EbosTypeTag) ProblemTypeTag; - typedef GET_PROP_TYPE(ProblemTypeTag, Vanguard) Vanguard; + using ProblemTypeTag = Properties::TTag::EbosTypeTag; + using Vanguard = GetPropType; // use the ewoms parameter machinery and the blackoil vanguard to handle the grunt of // the work - EWOMS_RESET_PARAMS_(ProblemTypeTag); + Parameters::reset(); Opm::setupParameters_(argc, const_cast(argv), /*doRegistration=*/true, /*allowUnused=*/true, /*handleHelp=*/false); std::unique_ptr result = Vanguard::createParseContext(); - EWOMS_RESET_PARAMS_(ProblemTypeTag); + Parameters::reset(); return result; } @@ -94,8 +94,8 @@ void ebosBlackOilSetDeck(Opm::Deck* deck, Opm::ErrorGuard* errorGuard, double externalSetupTime) { - typedef TTAG(EbosTypeTag) ProblemTypeTag; - typedef GET_PROP_TYPE(ProblemTypeTag, Vanguard) Vanguard; + using ProblemTypeTag = Properties::TTag::EbosTypeTag; + using Vanguard = GetPropType; Vanguard::setExternalSetupTime(externalSetupTime); Vanguard::setExternalParseContext(parseContext); @@ -105,7 +105,7 @@ void ebosBlackOilSetDeck(Opm::Deck* deck, int ebosBlackOilMain(int argc, char **argv) { - typedef TTAG(EbosTypeTag) ProblemTypeTag; + using ProblemTypeTag = Properties::TTag::EbosTypeTag; return Opm::startEbos(argc, argv); } diff --git a/ebos/ebos_brine.cc b/ebos/ebos_brine.cc index 2a6177726..aa9db4718 100644 --- a/ebos/ebos_brine.cc +++ b/ebos/ebos_brine.cc @@ -46,8 +46,8 @@ void ebosBrineSetDeck(Opm::Deck* deck, Opm::ErrorGuard* errorGuard, double externalSetupTime) { - typedef TTAG(EbosBrineTypeTag) ProblemTypeTag; - typedef GET_PROP_TYPE(ProblemTypeTag, Vanguard) Vanguard; + using ProblemTypeTag = Properties::TTag::EbosBrineTypeTag; + using Vanguard = GetPropType; Vanguard::setExternalSetupTime(externalSetupTime); Vanguard::setExternalParseContext(parseContext); @@ -57,7 +57,7 @@ void ebosBrineSetDeck(Opm::Deck* deck, int ebosBrineMain(int argc, char **argv) { - typedef TTAG(EbosBrineTypeTag) ProblemTypeTag; + using ProblemTypeTag = Properties::TTag::EbosBrineTypeTag; return Opm::startEbos(argc, argv); } diff --git a/ebos/ebos_foam.cc b/ebos/ebos_foam.cc index c19192113..08fc1b9a9 100644 --- a/ebos/ebos_foam.cc +++ b/ebos/ebos_foam.cc @@ -46,8 +46,8 @@ void ebosFoamSetDeck(Opm::Deck* deck, Opm::ErrorGuard* errorGuard, double externalSetupTime) { - typedef TTAG(EbosFoamTypeTag) ProblemTypeTag; - typedef GET_PROP_TYPE(ProblemTypeTag, Vanguard) Vanguard; + using ProblemTypeTag = Properties::TTag::EbosFoamTypeTag; + using Vanguard = GetPropType; Vanguard::setExternalSetupTime(externalSetupTime); Vanguard::setExternalParseContext(parseContext); @@ -57,7 +57,7 @@ void ebosFoamSetDeck(Opm::Deck* deck, int ebosFoamMain(int argc, char **argv) { - typedef TTAG(EbosFoamTypeTag) ProblemTypeTag; + using ProblemTypeTag = Properties::TTag::EbosFoamTypeTag; return Opm::startEbos(argc, argv); } diff --git a/ebos/ebos_gasoil.cc b/ebos/ebos_gasoil.cc index 9e5423e76..86e7656e5 100644 --- a/ebos/ebos_gasoil.cc +++ b/ebos/ebos_gasoil.cc @@ -41,7 +41,7 @@ private: // it is unfortunately not possible to simply use 'TypeTag' here because this leads // to cyclic definitions of some properties. if this happens the compiler error // messages unfortunately are *really* confusing and not really helpful. - typedef typename GET_PROP_TYPE(TTAG(EbosTypeTag), FluidSystem) FluidSystem; + using FluidSystem = GetPropType; public: typedef Opm::BlackOilTwoPhaseIndices; Vanguard::setExternalSetupTime(externalSetupTime); Vanguard::setExternalParseContext(parseContext); @@ -73,7 +73,7 @@ void ebosGasOilSetDeck(Opm::Deck* deck, int ebosGasOilMain(int argc, char **argv) { - typedef TTAG(EbosGasOilTypeTag) ProblemTypeTag; + using ProblemTypeTag = Properties::TTag::EbosGasOilTypeTag; return Opm::startEbos(argc, argv); } diff --git a/ebos/ebos_oilwater.cc b/ebos/ebos_oilwater.cc index 18df22cb2..3e52ff831 100644 --- a/ebos/ebos_oilwater.cc +++ b/ebos/ebos_oilwater.cc @@ -41,7 +41,7 @@ private: // it is unfortunately not possible to simply use 'TypeTag' here because this leads // to cyclic definitions of some properties. if this happens the compiler error // messages unfortunately are *really* confusing and not really helpful. - typedef typename GET_PROP_TYPE(TTAG(EbosTypeTag), FluidSystem) FluidSystem; + using FluidSystem = GetPropType; public: typedef Opm::BlackOilTwoPhaseIndices; Vanguard::setExternalSetupTime(externalSetupTime); Vanguard::setExternalParseContext(parseContext); @@ -73,7 +73,7 @@ void ebosOilWaterSetDeck(Opm::Deck* deck, int ebosOilWaterMain(int argc, char **argv) { - typedef TTAG(EbosOilWaterTypeTag) ProblemTypeTag; + using ProblemTypeTag = Properties::TTag::EbosOilWaterTypeTag; return Opm::startEbos(argc, argv); } diff --git a/ebos/ebos_oilwaterpolymer.cc b/ebos/ebos_oilwaterpolymer.cc index 2e71e5ae2..ec31b49a1 100644 --- a/ebos/ebos_oilwaterpolymer.cc +++ b/ebos/ebos_oilwaterpolymer.cc @@ -43,7 +43,7 @@ private: // it is unfortunately not possible to simply use 'TypeTag' here because this leads // to cyclic definitions of some properties. if this happens the compiler error // messages unfortunately are *really* confusing and not really helpful. - typedef typename GET_PROP_TYPE(TTAG(EbosTypeTag), FluidSystem) FluidSystem; + using FluidSystem = GetPropType; public: typedef Opm::BlackOilTwoPhaseIndices; Vanguard::setExternalSetupTime(externalSetupTime); Vanguard::setExternalParseContext(parseContext); @@ -75,7 +75,7 @@ void ebosOilWaterPolymerSetDeck(Opm::Deck* deck, int ebosOilWaterPolymerMain(int argc, char **argv) { - typedef TTAG(EbosOilWaterPolymerTypeTag) ProblemTypeTag; + using ProblemTypeTag = Properties::TTag::EbosOilWaterPolymerTypeTag; return Opm::startEbos(argc, argv); } diff --git a/ebos/ebos_plain.cc b/ebos/ebos_plain.cc index ab16342d8..815afd2b3 100644 --- a/ebos/ebos_plain.cc +++ b/ebos/ebos_plain.cc @@ -39,6 +39,6 @@ NEW_TYPE_TAG(EbosPlainTypeTag, INHERITS_FROM(BlackOilModel, EclBaseProblem)); int main(int argc, char **argv) { - typedef TTAG(EbosPlainTypeTag) ProblemTypeTag; + using ProblemTypeTag = Opm::Properties::TTag::EbosPlainTypeTag; return Opm::start(argc, argv); } diff --git a/ebos/ebos_polymer.cc b/ebos/ebos_polymer.cc index e447c704b..a269466e9 100644 --- a/ebos/ebos_polymer.cc +++ b/ebos/ebos_polymer.cc @@ -46,8 +46,8 @@ void ebosPolymerSetDeck(Opm::Deck* deck, Opm::ErrorGuard* errorGuard, double externalSetupTime) { - typedef TTAG(EbosPolymerTypeTag) ProblemTypeTag; - typedef GET_PROP_TYPE(ProblemTypeTag, Vanguard) Vanguard; + using ProblemTypeTag = Properties::TTag::EbosPolymerTypeTag; + using Vanguard = GetPropType; Vanguard::setExternalSetupTime(externalSetupTime); Vanguard::setExternalParseContext(parseContext); @@ -57,7 +57,7 @@ void ebosPolymerSetDeck(Opm::Deck* deck, int ebosPolymerMain(int argc, char **argv) { - typedef TTAG(EbosPolymerTypeTag) ProblemTypeTag; + using ProblemTypeTag = Properties::TTag::EbosPolymerTypeTag; return Opm::startEbos(argc, argv); } diff --git a/ebos/ebos_solvent.cc b/ebos/ebos_solvent.cc index 77557a036..5e2a1c18b 100644 --- a/ebos/ebos_solvent.cc +++ b/ebos/ebos_solvent.cc @@ -46,8 +46,8 @@ void ebosSolventSetDeck(Opm::Deck* deck, Opm::ErrorGuard* errorGuard, double externalSetupTime) { - typedef TTAG(EbosSolventTypeTag) ProblemTypeTag; - typedef GET_PROP_TYPE(ProblemTypeTag, Vanguard) Vanguard; + using ProblemTypeTag = Properties::TTag::EbosSolventTypeTag; + using Vanguard = GetPropType; Vanguard::setExternalSetupTime(externalSetupTime); Vanguard::setExternalParseContext(parseContext); @@ -57,7 +57,7 @@ void ebosSolventSetDeck(Opm::Deck* deck, int ebosSolventMain(int argc, char **argv) { - typedef TTAG(EbosSolventTypeTag) ProblemTypeTag; + using ProblemTypeTag = Properties::TTag::EbosSolventTypeTag; return Opm::startEbos(argc, argv); } diff --git a/ebos/ebos_thermal.cc b/ebos/ebos_thermal.cc index f936a9dd7..6e702278a 100644 --- a/ebos/ebos_thermal.cc +++ b/ebos/ebos_thermal.cc @@ -46,8 +46,8 @@ void ebosThermalSetDeck(Opm::Deck* deck, Opm::ErrorGuard* errorGuard, double externalSetupTime) { - typedef TTAG(EbosThermalTypeTag) ProblemTypeTag; - typedef GET_PROP_TYPE(ProblemTypeTag, Vanguard) Vanguard; + using ProblemTypeTag = Properties::TTag::EbosThermalTypeTag; + using Vanguard = GetPropType; Vanguard::setExternalSetupTime(externalSetupTime); Vanguard::setExternalParseContext(parseContext); @@ -57,7 +57,7 @@ void ebosThermalSetDeck(Opm::Deck* deck, int ebosThermalMain(int argc, char **argv) { - typedef TTAG(EbosThermalTypeTag) ProblemTypeTag; + using ProblemTypeTag = Properties::TTag::EbosThermalTypeTag; return Opm::startEbos(argc, argv); } diff --git a/ebos/eclalugridvanguard.hh b/ebos/eclalugridvanguard.hh index d28b63ca4..f04392cd0 100644 --- a/ebos/eclalugridvanguard.hh +++ b/ebos/eclalugridvanguard.hh @@ -66,13 +66,13 @@ class EclAluGridVanguard : public EclBaseVanguard friend class EclBaseVanguard; typedef EclBaseVanguard ParentType; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator; + using Scalar = GetPropType; + using Simulator = GetPropType; public: - typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid; - typedef typename GET_PROP_TYPE(TypeTag, EquilGrid) EquilGrid; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; + using Grid = GetPropType; + using EquilGrid = GetPropType; + using GridView = GetPropType; private: typedef Opm::AluCartesianIndexMapper CartesianIndexMapper; diff --git a/ebos/eclbaseaquifermodel.hh b/ebos/eclbaseaquifermodel.hh index c27e875e3..c2cc95deb 100644 --- a/ebos/eclbaseaquifermodel.hh +++ b/ebos/eclbaseaquifermodel.hh @@ -48,8 +48,8 @@ namespace Opm { template class EclBaseAquiferModel { - typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator; - typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector; + using Simulator = GetPropType; + using RateVector = GetPropType; public: EclBaseAquiferModel(Simulator& simulator) diff --git a/ebos/eclbasevanguard.hh b/ebos/eclbasevanguard.hh index 8351cf81b..0fa36a611 100644 --- a/ebos/eclbasevanguard.hh +++ b/ebos/eclbasevanguard.hh @@ -100,16 +100,16 @@ namespace Opm { template class EclBaseVanguard : public BaseVanguard { - typedef BaseVanguard ParentType; - typedef typename GET_PROP_TYPE(TypeTag, Vanguard) Implementation; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator; + using ParentType = BaseVanguard; + using Implementation = GetPropType; + using Scalar = GetPropType; + using Simulator = GetPropType; enum { enableExperiments = GET_PROP_VALUE(TypeTag, EnableExperiments) }; public: - typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; + using Grid = GetPropType; + using GridView = GetPropType; protected: static const int dimension = Grid::dimension; diff --git a/ebos/eclcpgridvanguard.hh b/ebos/eclcpgridvanguard.hh index 26d163b3f..bcbf0fc97 100644 --- a/ebos/eclcpgridvanguard.hh +++ b/ebos/eclcpgridvanguard.hh @@ -54,7 +54,7 @@ NEW_TYPE_TAG(EclCpGridVanguard, INHERITS_FROM(EclBaseVanguard)); // declare the properties SET_TYPE_PROP(EclCpGridVanguard, Vanguard, Opm::EclCpGridVanguard); SET_TYPE_PROP(EclCpGridVanguard, Grid, Dune::CpGrid); -SET_TYPE_PROP(EclCpGridVanguard, EquilGrid, typename GET_PROP_TYPE(TypeTag, Grid)); +SET_TYPE_PROP(EclCpGridVanguard, EquilGrid, GetPropType); } // namespace Opm::Properties @@ -73,14 +73,14 @@ class EclCpGridVanguard : public EclBaseVanguard friend class EclBaseVanguard; typedef EclBaseVanguard ParentType; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator; - typedef typename GET_PROP_TYPE(TypeTag, ElementMapper) ElementMapper; + using Scalar = GetPropType; + using Simulator = GetPropType; + using ElementMapper = GetPropType; public: - typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid; - typedef typename GET_PROP_TYPE(TypeTag, EquilGrid) EquilGrid; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; + using Grid = GetPropType; + using EquilGrid = GetPropType; + using GridView = GetPropType; private: typedef Dune::CartesianIndexMapper CartesianIndexMapper; diff --git a/ebos/ecldummygradientcalculator.hh b/ebos/ecldummygradientcalculator.hh index 57b516ac0..c5c6c59cd 100644 --- a/ebos/ecldummygradientcalculator.hh +++ b/ebos/ecldummygradientcalculator.hh @@ -48,10 +48,9 @@ namespace Opm { template class EclDummyGradientCalculator { - - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext; + using GridView = GetPropType; + using Scalar = GetPropType; + using ElementContext = GetPropType; enum { dimWorld = GridView::dimensionworld }; diff --git a/ebos/eclequilinitializer.hh b/ebos/eclequilinitializer.hh index 460f5c269..d3604acfc 100644 --- a/ebos/eclequilinitializer.hh +++ b/ebos/eclequilinitializer.hh @@ -53,12 +53,12 @@ namespace Opm { template class EclEquilInitializer { - typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw; - typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; + using Simulator = GetPropType; + using FluidSystem = GetPropType; + using GridView = GetPropType; + using Scalar = GetPropType; + using MaterialLaw = GetPropType; + using Indices = GetPropType; enum { numPhases = FluidSystem::numPhases }; enum { oilPhaseIdx = FluidSystem::oilPhaseIdx }; diff --git a/ebos/eclfluxmodule.hh b/ebos/eclfluxmodule.hh index eb8f7d372..04e342c7f 100644 --- a/ebos/eclfluxmodule.hh +++ b/ebos/eclfluxmodule.hh @@ -86,7 +86,7 @@ class EclTransBaseProblem template class EclTransIntensiveQuantities { - typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext; + using ElementContext = GetPropType; protected: void update_(const ElementContext& elemCtx OPM_UNUSED, unsigned dofIdx OPM_UNUSED, unsigned timeIdx OPM_UNUSED) { } @@ -99,14 +99,14 @@ protected: template class EclTransExtensiveQuantities { - typedef typename GET_PROP_TYPE(TypeTag, ExtensiveQuantities) Implementation; + using Implementation = GetPropType; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; - typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw; + using FluidSystem = GetPropType; + using ElementContext = GetPropType; + using Scalar = GetPropType; + using Evaluation = GetPropType; + using GridView = GetPropType; + using MaterialLaw = GetPropType; enum { dimWorld = GridView::dimensionworld }; enum { gasPhaseIdx = FluidSystem::gasPhaseIdx }; diff --git a/ebos/eclnewtonmethod.hh b/ebos/eclnewtonmethod.hh index 66c98ef1b..795294728 100644 --- a/ebos/eclnewtonmethod.hh +++ b/ebos/eclnewtonmethod.hh @@ -54,18 +54,18 @@ template class EclNewtonMethod : public BlackOilNewtonMethod { typedef BlackOilNewtonMethod ParentType; - typedef typename GET_PROP_TYPE(TypeTag, DiscNewtonMethod) DiscNewtonMethod; + using DiscNewtonMethod = GetPropType; - typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; - typedef typename GET_PROP_TYPE(TypeTag, SolutionVector) SolutionVector; - typedef typename GET_PROP_TYPE(TypeTag, GlobalEqVector) GlobalEqVector; - typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables; - typedef typename GET_PROP_TYPE(TypeTag, EqVector) EqVector; - typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, Linearizer) Linearizer; - typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext; + using Simulator = GetPropType; + using FluidSystem = GetPropType; + using SolutionVector = GetPropType; + using GlobalEqVector = GetPropType; + using PrimaryVariables = GetPropType; + using EqVector = GetPropType; + using Indices = GetPropType; + using Scalar = GetPropType; + using Linearizer = GetPropType; + using ElementContext = GetPropType; static const unsigned numEq = GET_PROP_VALUE(TypeTag, NumEq); diff --git a/ebos/ecloutputblackoilmodule.hh b/ebos/ecloutputblackoilmodule.hh index 851ec98f4..5d0346f1f 100644 --- a/ebos/ecloutputblackoilmodule.hh +++ b/ebos/ecloutputblackoilmodule.hh @@ -70,18 +70,17 @@ class EcfvDiscretization; template class EclOutputBlackOilModule { - - typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator; - typedef typename GET_PROP_TYPE(TypeTag, Discretization) Discretization; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation; - typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext; - typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw; - typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - typedef typename GridView::template Codim<0>::Entity Element; - typedef typename GridView::template Codim<0>::Iterator ElementIterator; + using Simulator = GetPropType; + using Discretization = GetPropType; + using Scalar = GetPropType; + using Evaluation = GetPropType; + using ElementContext = GetPropType; + using MaterialLaw = GetPropType; + using MaterialLawParams = GetPropType; + using FluidSystem = GetPropType; + using GridView = GetPropType; + using Element = typename GridView::template Codim<0>::Entity; + using ElementIterator = typename GridView::template Codim<0>::Iterator; enum { numPhases = FluidSystem::numPhases }; enum { oilPhaseIdx = FluidSystem::oilPhaseIdx }; diff --git a/ebos/eclpeacemanwell.hh b/ebos/eclpeacemanwell.hh index eee337d9f..b9e2aa278 100644 --- a/ebos/eclpeacemanwell.hh +++ b/ebos/eclpeacemanwell.hh @@ -73,22 +73,22 @@ class EcfvDiscretization; template class EclPeacemanWell : public BaseAuxiliaryModule { - typedef BaseAuxiliaryModule AuxModule; + using AuxModule = BaseAuxiliaryModule; - typedef typename AuxModule::NeighborSet NeighborSet; - typedef typename GET_PROP_TYPE(TypeTag, SparseMatrixAdapter) SparseMatrixAdapter; - typedef typename GET_PROP_TYPE(TypeTag, SolutionVector) SolutionVector; - typedef typename GET_PROP_TYPE(TypeTag, GlobalEqVector) GlobalEqVector; + using NeighborSet = typename AuxModule::NeighborSet; + using SparseMatrixAdapter = GetPropType; + using SolutionVector = GetPropType; + using GlobalEqVector = GetPropType; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation; - typedef typename GET_PROP_TYPE(TypeTag, Discretization) Discretization; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; - typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator; - typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext; - typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) IntensiveQuantities; - typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; + using Scalar = GetPropType; + using Evaluation = GetPropType; + using Discretization = GetPropType; + using FluidSystem = GetPropType; + using Simulator = GetPropType; + using ElementContext = GetPropType; + using IntensiveQuantities = GetPropType; + using RateVector = GetPropType; + using GridView = GetPropType; typedef Opm::MathToolbox Toolbox; @@ -115,8 +115,8 @@ class EclPeacemanWell : public BaseAuxiliaryModule static const unsigned gasCompIdx = FluidSystem::gasCompIdx; static const unsigned numModelEq = GET_PROP_VALUE(TypeTag, NumEq); - static const unsigned conti0EqIdx = GET_PROP_TYPE(TypeTag, Indices)::conti0EqIdx; - static const unsigned contiEnergyEqIdx = GET_PROP_TYPE(TypeTag, Indices)::contiEnergyEqIdx; + static const unsigned conti0EqIdx = GetPropType::conti0EqIdx; + static const unsigned contiEnergyEqIdx = GetPropType::contiEnergyEqIdx; static constexpr unsigned historySize = GET_PROP_VALUE(TypeTag, TimeDiscHistorySize); diff --git a/ebos/eclpolyhedralgridvanguard.hh b/ebos/eclpolyhedralgridvanguard.hh index 8c373ddea..4697a30bb 100644 --- a/ebos/eclpolyhedralgridvanguard.hh +++ b/ebos/eclpolyhedralgridvanguard.hh @@ -44,7 +44,7 @@ NEW_TYPE_TAG(EclPolyhedralGridVanguard, INHERITS_FROM(EclBaseVanguard)); // declare the properties SET_TYPE_PROP(EclPolyhedralGridVanguard, Vanguard, Opm::EclPolyhedralGridVanguard); SET_TYPE_PROP(EclPolyhedralGridVanguard, Grid, Dune::PolyhedralGrid<3, 3>); -SET_TYPE_PROP(EclPolyhedralGridVanguard, EquilGrid, typename GET_PROP_TYPE(TypeTag, Grid)); +SET_TYPE_PROP(EclPolyhedralGridVanguard, EquilGrid, GetPropType); } // namespace Opm::Properties @@ -63,13 +63,13 @@ class EclPolyhedralGridVanguard : public EclBaseVanguard friend class EclBaseVanguard; typedef EclBaseVanguard ParentType; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator; + using Scalar = GetPropType; + using Simulator = GetPropType; public: - typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid; - typedef typename GET_PROP_TYPE(TypeTag, EquilGrid) EquilGrid; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; + using Grid = GetPropType; + using EquilGrid = GetPropType; + using GridView = GetPropType; private: typedef Grid* GridPointer; diff --git a/ebos/eclproblem.hh b/ebos/eclproblem.hh index ae4241c0e..da791a5d5 100644 --- a/ebos/eclproblem.hh +++ b/ebos/eclproblem.hh @@ -176,8 +176,8 @@ SET_TAG_PROP(EclBaseProblem, LocalLinearizerSplice, AutoDiffLocalLinearizer); SET_PROP(EclBaseProblem, MaterialLaw) { private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; + using Scalar = GetPropType; + using FluidSystem = GetPropType; typedef Opm::ThreePhaseMaterialTraits; + using FluidSystem = GetPropType; public: typedef Opm::EclThermalLawManager EclThermalLawManager; @@ -207,8 +207,8 @@ public: SET_PROP(EclBaseProblem, ThermalConductionLaw) { private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; + using Scalar = GetPropType; + using FluidSystem = GetPropType; public: typedef Opm::EclThermalLawManager EclThermalLawManager; @@ -221,8 +221,8 @@ public: SET_PROP(EclBaseProblem, Stencil) { private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; + using Scalar = GetPropType; + using GridView = GetPropType; public: typedef Opm::EcfvStencil -class EclProblem : public GET_PROP_TYPE(TypeTag, BaseProblem) +class EclProblem : public GetPropType { - typedef typename GET_PROP_TYPE(TypeTag, BaseProblem) ParentType; - typedef typename GET_PROP_TYPE(TypeTag, Problem) Implementation; + using ParentType = GetPropType; + using Implementation = GetPropType; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - typedef typename GET_PROP_TYPE(TypeTag, Stencil) Stencil; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; - typedef typename GET_PROP_TYPE(TypeTag, GlobalEqVector) GlobalEqVector; - typedef typename GET_PROP_TYPE(TypeTag, EqVector) EqVector; + using Scalar = GetPropType; + using GridView = GetPropType; + using Stencil = GetPropType; + using FluidSystem = GetPropType; + using GlobalEqVector = GetPropType; + using EqVector = GetPropType; // Grid and world dimension @@ -424,24 +424,24 @@ class EclProblem : public GET_PROP_TYPE(TypeTag, BaseProblem) enum { oilCompIdx = FluidSystem::oilCompIdx }; enum { waterCompIdx = FluidSystem::waterCompIdx }; - typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables; - typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector; - typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector; - typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator; - typedef typename GridView::template Codim<0>::Entity Element; - typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext; - typedef typename GET_PROP(TypeTag, MaterialLaw)::EclMaterialLawManager EclMaterialLawManager; - typedef typename GET_PROP(TypeTag, SolidEnergyLaw)::EclThermalLawManager EclThermalLawManager; - typedef typename EclMaterialLawManager::MaterialLawParams MaterialLawParams; - typedef typename EclThermalLawManager::SolidEnergyLawParams SolidEnergyLawParams; - typedef typename EclThermalLawManager::ThermalConductionLawParams ThermalConductionLawParams; - typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw; - typedef typename GET_PROP_TYPE(TypeTag, DofMapper) DofMapper; - typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation; - typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; - typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) IntensiveQuantities; - typedef typename GET_PROP_TYPE(TypeTag, EclWellModel) EclWellModel; - typedef typename GET_PROP_TYPE(TypeTag, EclAquiferModel) EclAquiferModel; + using PrimaryVariables = GetPropType; + using RateVector = GetPropType; + using BoundaryRateVector = 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 MaterialLawParams = typename EclMaterialLawManager::MaterialLawParams; + using SolidEnergyLawParams = typename EclThermalLawManager::SolidEnergyLawParams; + using ThermalConductionLawParams = typename EclThermalLawManager::ThermalConductionLawParams; + using MaterialLaw = GetPropType; + using DofMapper = GetPropType; + using Evaluation = GetPropType; + using Indices = GetPropType; + using IntensiveQuantities = GetPropType; + using EclWellModel = GetPropType; + using EclAquiferModel = GetPropType; typedef BlackOilSolventModule SolventModule; typedef BlackOilPolymerModule PolymerModule; diff --git a/ebos/eclthresholdpressure.hh b/ebos/eclthresholdpressure.hh index fae8f0f3e..057f14a42 100644 --- a/ebos/eclthresholdpressure.hh +++ b/ebos/eclthresholdpressure.hh @@ -64,11 +64,11 @@ namespace Opm { template class EclThresholdPressure { - typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation; - typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; + using Simulator = GetPropType; + using Scalar = GetPropType; + using Evaluation = GetPropType; + using ElementContext = GetPropType; + using FluidSystem = GetPropType; enum { enableExperiments = GET_PROP_VALUE(TypeTag, EnableExperiments) }; enum { numPhases = FluidSystem::numPhases }; diff --git a/ebos/ecltracermodel.hh b/ebos/ecltracermodel.hh index f066e5bd4..c42238079 100644 --- a/ebos/ecltracermodel.hh +++ b/ebos/ecltracermodel.hh @@ -60,15 +60,15 @@ namespace Opm { template class EclTracerModel { - typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, Stencil) Stencil; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; - typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext; - typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector; - typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; + using Simulator = GetPropType; + using GridView = GetPropType; + using Grid = GetPropType; + using Scalar = GetPropType; + using Stencil = GetPropType; + using FluidSystem = GetPropType; + using ElementContext = GetPropType; + using RateVector = GetPropType; + using Indices = GetPropType; typedef Opm::DenseAd::Evaluation TracerEvaluation; diff --git a/ebos/ecltransmissibility.hh b/ebos/ecltransmissibility.hh index 8ff0cf193..a11a933f5 100644 --- a/ebos/ecltransmissibility.hh +++ b/ebos/ecltransmissibility.hh @@ -66,12 +66,12 @@ namespace Opm { template class EclTransmissibility { - typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, Vanguard) Vanguard; - typedef typename GET_PROP_TYPE(TypeTag, ElementMapper) ElementMapper; - typedef typename GridView::Intersection Intersection; + using Grid = GetPropType; + using GridView = GetPropType; + using Scalar = GetPropType; + using Vanguard = GetPropType; + using ElementMapper = GetPropType; + using Intersection = typename GridView::Intersection; static const bool enableEnergy = GET_PROP_VALUE(TypeTag, EnableEnergy); diff --git a/ebos/eclwellmanager.hh b/ebos/eclwellmanager.hh index 9036e445e..32a439e62 100644 --- a/ebos/eclwellmanager.hh +++ b/ebos/eclwellmanager.hh @@ -65,14 +65,14 @@ namespace Opm { template class EclWellManager { - typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; - typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext; - typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector; + using Simulator = GetPropType; + using GridView = GetPropType; + using Grid = GetPropType; + using Scalar = GetPropType; + using Evaluation = GetPropType; + using FluidSystem = GetPropType; + using ElementContext = GetPropType; + using RateVector = GetPropType; enum { numEq = GET_PROP_VALUE(TypeTag, NumEq) }; enum { numPhases = FluidSystem::numPhases }; diff --git a/ebos/eclwriter.hh b/ebos/eclwriter.hh index 1e6ce7ecb..035673876 100644 --- a/ebos/eclwriter.hh +++ b/ebos/eclwriter.hh @@ -149,16 +149,16 @@ bool directVerticalNeighbors(const std::array& cartDims, template class EclWriter { - typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator; - typedef typename GET_PROP_TYPE(TypeTag, Vanguard) Vanguard; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid; - typedef typename GET_PROP_TYPE(TypeTag, EquilGrid) EquilGrid; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; - typedef typename GridView::template Codim<0>::Entity Element; - typedef typename GridView::template Codim<0>::Iterator ElementIterator; + using Simulator = GetPropType; + using Vanguard = GetPropType; + using GridView = GetPropType; + using Grid = GetPropType; + using EquilGrid = GetPropType; + using Scalar = GetPropType; + using ElementContext = GetPropType; + using FluidSystem = GetPropType; + using Element = typename GridView::template Codim<0>::Entity; + using ElementIterator = typename GridView::template Codim<0>::Iterator; typedef CollectDataToIORank CollectDataToIORankType; diff --git a/ebos/equil/initstateequil.hh b/ebos/equil/initstateequil.hh index 0a30ecb0c..e5c6b04e6 100644 --- a/ebos/equil/initstateequil.hh +++ b/ebos/equil/initstateequil.hh @@ -1571,9 +1571,9 @@ equilnum(const Opm::EclipseState& eclipseState, template class InitialStateComputer { - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; - typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator; - typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid; + using FluidSystem = GetPropType; + using Simulator = GetPropType; + using Grid = GetPropType; public: template diff --git a/ebos/vtkecltracermodule.hh b/ebos/vtkecltracermodule.hh index 81a51ee34..09f583b6e 100644 --- a/ebos/vtkecltracermodule.hh +++ b/ebos/vtkecltracermodule.hh @@ -64,13 +64,13 @@ namespace Opm { { typedef BaseOutputModule ParentType; - typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation; - typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext; + using Simulator = GetPropType; + using Scalar = GetPropType; + using Evaluation = GetPropType; + using ElementContext = GetPropType; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; + using GridView = GetPropType; + using FluidSystem = GetPropType; static const int vtkFormat = GET_PROP_VALUE(TypeTag, VtkOutputFormat); typedef Opm::VtkMultiWriter VtkMultiWriter; diff --git a/flow/flow_blackoil_dunecpr.cpp b/flow/flow_blackoil_dunecpr.cpp index 7940a3aeb..64b10cd2e 100644 --- a/flow/flow_blackoil_dunecpr.cpp +++ b/flow/flow_blackoil_dunecpr.cpp @@ -44,9 +44,8 @@ namespace Opm { SET_PROP(EclFlowProblemSimple, FluidSystem) { private: - //typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation; + using Scalar = GetPropType; + using Evaluation = GetPropType; public: typedef Opm::BlackOilFluidSystem type; @@ -70,7 +69,7 @@ namespace Opm { int main(int argc, char** argv) { - using TypeTag = TTAG(EclFlowProblemSimple); + using TypeTag = Opm::Properties::TTag::EclFlowProblemSimple; auto mainObject = Opm::Main(argc, argv); return mainObject.runStatic(); } diff --git a/flow/flow_ebos_blackoil.cpp b/flow/flow_ebos_blackoil.cpp index c12b18eb3..3fa450e77 100644 --- a/flow/flow_ebos_blackoil.cpp +++ b/flow/flow_ebos_blackoil.cpp @@ -36,8 +36,8 @@ namespace Opm { void flowEbosBlackoilSetDeck(double setupTime, Deck *deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig) { - typedef TTAG(EclFlowProblem) TypeTag; - typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard; + using TypeTag = Properties::TTag::EclFlowProblem; + using Vanguard = GetPropType; Vanguard::setExternalSetupTime(setupTime); Vanguard::setExternalDeck(deck); @@ -46,7 +46,7 @@ void flowEbosBlackoilSetDeck(double setupTime, Deck *deck, EclipseState& eclStat Vanguard::setExternalSummaryConfig(&summaryConfig); } -std::unique_ptr> +std::unique_ptr> flowEbosBlackoilMainInit(int argc, char** argv, bool outputCout, bool outputFiles) { // we always want to use the default locale, and thus spare us the trouble @@ -59,7 +59,7 @@ flowEbosBlackoilMainInit(int argc, char** argv, bool outputCout, bool outputFile Dune::MPIHelper::instance(argc, argv); #endif - return std::make_unique>( + return std::make_unique>( argc, argv, outputCout, outputFiles); } diff --git a/flow/flow_ebos_blackoil.hpp b/flow/flow_ebos_blackoil.hpp index 3ca378919..16bc33794 100644 --- a/flow/flow_ebos_blackoil.hpp +++ b/flow/flow_ebos_blackoil.hpp @@ -28,7 +28,7 @@ void flowEbosBlackoilSetDeck(double setupTime, Deck *deck, EclipseState& eclStat int flowEbosBlackoilMain(int argc, char** argv, bool outputCout, bool outputFiles); -std::unique_ptr> +std::unique_ptr> flowEbosBlackoilMainInit(int argc, char** argv, bool outputCout, bool outputFiles); } diff --git a/flow/flow_ebos_brine.cpp b/flow/flow_ebos_brine.cpp index 5c6c0d13c..b2dc938e4 100644 --- a/flow/flow_ebos_brine.cpp +++ b/flow/flow_ebos_brine.cpp @@ -38,8 +38,8 @@ SET_BOOL_PROP(EclFlowBrineProblem, EnableBrine, true); namespace Opm { void flowEbosBrineSetDeck(double setupTime, Deck *deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig) { - typedef TTAG(EclFlowBrineProblem) TypeTag; - typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard; + using TypeTag = Properties::TTag::EclFlowBrineProblem; + using Vanguard = GetPropType; Vanguard::setExternalSetupTime(setupTime); Vanguard::setExternalDeck(deck); @@ -63,7 +63,7 @@ int flowEbosBrineMain(int argc, char** argv, bool outputCout, bool outputFiles) Dune::MPIHelper::instance(argc, argv).rank(); #endif - Opm::FlowMainEbos + Opm::FlowMainEbos mainfunc {argc, argv, outputCout, outputFiles}; return mainfunc.execute(); } diff --git a/flow/flow_ebos_energy.cpp b/flow/flow_ebos_energy.cpp index 5d82791ee..b4748455c 100644 --- a/flow/flow_ebos_energy.cpp +++ b/flow/flow_ebos_energy.cpp @@ -38,8 +38,8 @@ SET_BOOL_PROP(EclFlowEnergyProblem, EnableEnergy, true); namespace Opm { void flowEbosEnergySetDeck(double setupTime, Deck *deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig) { - typedef TTAG(EclFlowEnergyProblem) TypeTag; - typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard; + using TypeTag = Properties::TTag::EclFlowEnergyProblem; + using Vanguard = GetPropType; Vanguard::setExternalSetupTime(setupTime); Vanguard::setExternalDeck(deck); @@ -62,7 +62,7 @@ int flowEbosEnergyMain(int argc, char** argv, bool outputCout, bool outputFiles) Dune::MPIHelper::instance(argc, argv).rank(); #endif - Opm::FlowMainEbos + Opm::FlowMainEbos mainfunc {argc, argv, outputCout, outputFiles}; return mainfunc.execute(); } diff --git a/flow/flow_ebos_foam.cpp b/flow/flow_ebos_foam.cpp index be9a4da60..bf3b48b49 100644 --- a/flow/flow_ebos_foam.cpp +++ b/flow/flow_ebos_foam.cpp @@ -38,8 +38,8 @@ SET_BOOL_PROP(EclFlowFoamProblem, EnableFoam, true); namespace Opm { void flowEbosFoamSetDeck(double setupTime, Deck *deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig) { - typedef TTAG(EclFlowFoamProblem) TypeTag; - typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard; + using TypeTag = Properties::TTag::EclFlowFoamProblem; + using Vanguard = GetPropType; Vanguard::setExternalSetupTime(setupTime); Vanguard::setExternalDeck(deck); @@ -63,7 +63,7 @@ int flowEbosFoamMain(int argc, char** argv, bool outputCout, bool outputFiles) Dune::MPIHelper::instance(argc, argv).rank(); #endif - Opm::FlowMainEbos + Opm::FlowMainEbos mainfunc {argc, argv, outputCout, outputFiles}; return mainfunc.execute(); } diff --git a/flow/flow_ebos_gasoil.cpp b/flow/flow_ebos_gasoil.cpp index c17395239..f9846c7a6 100644 --- a/flow/flow_ebos_gasoil.cpp +++ b/flow/flow_ebos_gasoil.cpp @@ -45,8 +45,8 @@ private: // it is unfortunately not possible to simply use 'TypeTag' here because this leads // to cyclic definitions of some properties. if this happens the compiler error // messages unfortunately are *really* confusing and not really helpful. - typedef TTAG(EclFlowProblem) BaseTypeTag; - typedef typename GET_PROP_TYPE(BaseTypeTag, FluidSystem) FluidSystem; + using BaseTypeTag = TTag::EclFlowProblem; + using FluidSystem = GetPropType; public: typedef Opm::BlackOilTwoPhaseIndices; Vanguard::setExternalSetupTime(setupTime); Vanguard::setExternalDeck(deck); @@ -86,7 +86,7 @@ int flowEbosGasOilMain(int argc, char** argv, bool outputCout, bool outputFiles) Dune::MPIHelper::instance(argc, argv); #endif - Opm::FlowMainEbos + Opm::FlowMainEbos mainfunc {argc, argv, outputCout, outputFiles} ; return mainfunc.execute(); } diff --git a/flow/flow_ebos_oilwater.cpp b/flow/flow_ebos_oilwater.cpp index d1b9a6d6c..a0cb47505 100644 --- a/flow/flow_ebos_oilwater.cpp +++ b/flow/flow_ebos_oilwater.cpp @@ -45,8 +45,8 @@ private: // it is unfortunately not possible to simply use 'TypeTag' here because this leads // to cyclic definitions of some properties. if this happens the compiler error // messages unfortunately are *really* confusing and not really helpful. - typedef TTAG(EclFlowProblem) BaseTypeTag; - typedef typename GET_PROP_TYPE(BaseTypeTag, FluidSystem) FluidSystem; + using BaseTypeTag = TTag::EclFlowProblem; + using FluidSystem = GetPropType; public: typedef Opm::BlackOilTwoPhaseIndices; Vanguard::setExternalSetupTime(setupTime); Vanguard::setExternalDeck(deck); @@ -85,7 +85,7 @@ int flowEbosOilWaterMain(int argc, char** argv, bool outputCout, bool outputFile Dune::MPIHelper::instance(argc, argv); #endif - Opm::FlowMainEbos + Opm::FlowMainEbos mainfunc {argc, argv, outputCout, outputFiles}; return mainfunc.execute(); } diff --git a/flow/flow_ebos_oilwater_brine.cpp b/flow/flow_ebos_oilwater_brine.cpp index 33f8becbb..6c41849e2 100644 --- a/flow/flow_ebos_oilwater_brine.cpp +++ b/flow/flow_ebos_oilwater_brine.cpp @@ -45,8 +45,8 @@ private: // it is unfortunately not possible to simply use 'TypeTag' here because this leads // to cyclic definitions of some properties. if this happens the compiler error // messages unfortunately are *really* confusing and not really helpful. - typedef TTAG(EclFlowProblem) BaseTypeTag; - typedef typename GET_PROP_TYPE(BaseTypeTag, FluidSystem) FluidSystem; + using BaseTypeTag = TTag::EclFlowProblem; + using FluidSystem = GetPropType; public: typedef Opm::BlackOilTwoPhaseIndices; Vanguard::setExternalSetupTime(setupTime); Vanguard::setExternalDeck(deck); @@ -85,7 +85,7 @@ int flowEbosOilWaterBrineMain(int argc, char** argv, bool outputCout, bool outpu Dune::MPIHelper::instance(argc, argv); #endif - Opm::FlowMainEbos + Opm::FlowMainEbos mainfunc {argc, argv, outputCout, outputFiles}; return mainfunc.execute(); } diff --git a/flow/flow_ebos_oilwater_polymer.cpp b/flow/flow_ebos_oilwater_polymer.cpp index 251385d16..a71cf8945 100644 --- a/flow/flow_ebos_oilwater_polymer.cpp +++ b/flow/flow_ebos_oilwater_polymer.cpp @@ -46,8 +46,8 @@ private: // it is unfortunately not possible to simply use 'TypeTag' here because this leads // to cyclic definitions of some properties. if this happens the compiler error // messages unfortunately are *really* confusing and not really helpful. - typedef TTAG(EclFlowProblem) BaseTypeTag; - typedef typename GET_PROP_TYPE(BaseTypeTag, FluidSystem) FluidSystem; + using BaseTypeTag = TTag::EclFlowProblem; + using FluidSystem = GetPropType; public: typedef Opm::BlackOilTwoPhaseIndices; Vanguard::setExternalSetupTime(setupTime); Vanguard::setExternalDeck(deck); @@ -86,7 +86,7 @@ int flowEbosOilWaterPolymerMain(int argc, char** argv, bool outputCout, bool out Dune::MPIHelper::instance(argc, argv); #endif - Opm::FlowMainEbos + Opm::FlowMainEbos mainfunc {argc, argv, outputCout, outputFiles}; return mainfunc.execute(); } diff --git a/flow/flow_ebos_oilwater_polymer_injectivity.cpp b/flow/flow_ebos_oilwater_polymer_injectivity.cpp index dc2dadb71..049ae4def 100644 --- a/flow/flow_ebos_oilwater_polymer_injectivity.cpp +++ b/flow/flow_ebos_oilwater_polymer_injectivity.cpp @@ -48,8 +48,8 @@ private: // it is unfortunately not possible to simply use 'TypeTag' here because this leads // to cyclic definitions of some properties. if this happens the compiler error // messages unfortunately are *really* confusing and not really helpful. - typedef TTAG(EclFlowProblem) BaseTypeTag; - typedef typename GET_PROP_TYPE(BaseTypeTag, FluidSystem) FluidSystem; + using BaseTypeTag = TTag::EclFlowProblem; + using FluidSystem = GetPropType; public: typedef Opm::BlackOilTwoPhaseIndices<0, @@ -65,8 +65,8 @@ public: namespace Opm { /* void flowEbosOilWaterPolymerInjectivitySetDeck(Deck& deck, EclipseState& eclState) { - typedef TTAG(EclFlowOilWaterPolymerInjectivityProblem) TypeTag; - typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard; + using TypeTag = Properties::TTag::EclFlowOilWaterPolymerInjectivityProblem; + using Vanguard = GetPropType; Vanguard::setExternalDeck(&deck, &eclState); } */ @@ -84,7 +84,7 @@ int flowEbosOilWaterPolymerInjectivityMain(int argc, char** argv, bool outputCou Dune::MPIHelper::instance(argc, argv); #endif - Opm::FlowMainEbos + Opm::FlowMainEbos mainfunc {argc, argv, outputCout, outputFiles}; return mainfunc.execute(); } diff --git a/flow/flow_ebos_polymer.cpp b/flow/flow_ebos_polymer.cpp index 157e75b1a..d74158400 100644 --- a/flow/flow_ebos_polymer.cpp +++ b/flow/flow_ebos_polymer.cpp @@ -38,8 +38,8 @@ SET_BOOL_PROP(EclFlowPolymerProblem, EnablePolymer, true); namespace Opm { void flowEbosPolymerSetDeck(double setupTime, Deck *deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig) { - typedef TTAG(EclFlowPolymerProblem) TypeTag; - typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard; + using TypeTag = Properties::TTag::EclFlowPolymerProblem; + using Vanguard = GetPropType; Vanguard::setExternalSetupTime(setupTime); Vanguard::setExternalDeck(deck); @@ -62,7 +62,7 @@ int flowEbosPolymerMain(int argc, char** argv, bool outputCout, bool outputFiles Dune::MPIHelper::instance(argc, argv).rank(); #endif - Opm::FlowMainEbos + Opm::FlowMainEbos mainfunc {argc, argv, outputCout, outputFiles}; return mainfunc.execute(); } diff --git a/flow/flow_ebos_solvent.cpp b/flow/flow_ebos_solvent.cpp index 65c008fe1..5ed229ac9 100644 --- a/flow/flow_ebos_solvent.cpp +++ b/flow/flow_ebos_solvent.cpp @@ -38,8 +38,8 @@ SET_BOOL_PROP(EclFlowSolventProblem, EnableSolvent, true); namespace Opm { void flowEbosSolventSetDeck(double setupTime, Deck *deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig) { - typedef TTAG(EclFlowSolventProblem) TypeTag; - typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard; + using TypeTag = Properties::TTag::EclFlowSolventProblem; + using Vanguard = GetPropType; Vanguard::setExternalSetupTime(setupTime); Vanguard::setExternalDeck(deck); @@ -63,7 +63,7 @@ int flowEbosSolventMain(int argc, char** argv, bool outputCout, bool outputFiles Dune::MPIHelper::instance(argc, argv).rank(); #endif - Opm::FlowMainEbos + Opm::FlowMainEbos mainfunc {argc, argv, outputCout, outputFiles}; return mainfunc.execute(); } diff --git a/flow/flow_onephase.cpp b/flow/flow_onephase.cpp index dd92d613a..0d2f1e3a9 100644 --- a/flow/flow_onephase.cpp +++ b/flow/flow_onephase.cpp @@ -33,8 +33,8 @@ private: // it is unfortunately not possible to simply use 'TypeTag' here because this leads // to cyclic definitions of some properties. if this happens the compiler error // messages unfortunately are *really* confusing and not really helpful. - typedef TTAG(EclFlowProblem) BaseTypeTag; - typedef typename GET_PROP_TYPE(BaseTypeTag, FluidSystem) FluidSystem; + using BaseTypeTag = TTag::EclFlowProblem; + using FluidSystem = GetPropType; public: typedef Opm::BlackOilOnePhaseIndices(); } diff --git a/flow/flow_onephase_energy.cpp b/flow/flow_onephase_energy.cpp index 772fd4cd7..ceff384b0 100644 --- a/flow/flow_onephase_energy.cpp +++ b/flow/flow_onephase_energy.cpp @@ -33,8 +33,8 @@ private: // it is unfortunately not possible to simply use 'TypeTag' here because this leads // to cyclic definitions of some properties. if this happens the compiler error // messages unfortunately are *really* confusing and not really helpful. - typedef TTAG(EclFlowProblem) BaseTypeTag; - typedef typename GET_PROP_TYPE(BaseTypeTag, FluidSystem) FluidSystem; + using BaseTypeTag = TTag::EclFlowProblem; + using FluidSystem = GetPropType; public: typedef Opm::BlackOilOnePhaseIndices(); } diff --git a/opm/simulators/aquifers/AquiferInterface.hpp b/opm/simulators/aquifers/AquiferInterface.hpp index de3a5a3a7..a44b7dc6a 100644 --- a/opm/simulators/aquifers/AquiferInterface.hpp +++ b/opm/simulators/aquifers/AquiferInterface.hpp @@ -44,12 +44,12 @@ template class AquiferInterface { public: - typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator; - typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; - typedef typename GET_PROP_TYPE(TypeTag, Indices) BlackoilIndices; - typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector; - typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) IntensiveQuantities; + using Simulator = GetPropType; + using ElementContext = GetPropType; + using FluidSystem = GetPropType; + using BlackoilIndices = GetPropType; + using RateVector = GetPropType; + using IntensiveQuantities = GetPropType; enum { enableTemperature = GET_PROP_VALUE(TypeTag, EnableTemperature) }; enum { enableEnergy = GET_PROP_VALUE(TypeTag, EnableEnergy) }; diff --git a/opm/simulators/aquifers/BlackoilAquiferModel.hpp b/opm/simulators/aquifers/BlackoilAquiferModel.hpp index 13bd0d9ca..72804ba25 100644 --- a/opm/simulators/aquifers/BlackoilAquiferModel.hpp +++ b/opm/simulators/aquifers/BlackoilAquiferModel.hpp @@ -46,8 +46,8 @@ namespace Opm template class BlackoilAquiferModel { - typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator; - typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector; + using Simulator = GetPropType; + using RateVector = GetPropType; public: explicit BlackoilAquiferModel(Simulator& simulator); @@ -73,8 +73,8 @@ public: protected: // --------- Types --------- - typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; + using ElementContext = GetPropType; + using Scalar = GetPropType; typedef AquiferCarterTracy AquiferCarterTracy_object; typedef AquiferFetkovich AquiferFetkovich_object; diff --git a/opm/simulators/flow/BlackoilModelEbos.hpp b/opm/simulators/flow/BlackoilModelEbos.hpp index be9dbc5a2..b075a13ce 100644 --- a/opm/simulators/flow/BlackoilModelEbos.hpp +++ b/opm/simulators/flow/BlackoilModelEbos.hpp @@ -109,16 +109,16 @@ namespace Opm { typedef WellStateFullyImplicitBlackoil WellState; typedef BlackoilModelParametersEbos ModelParameters; - typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator; - typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid; - typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext; - typedef typename GET_PROP_TYPE(TypeTag, SparseMatrixAdapter) SparseMatrixAdapter; - typedef typename GET_PROP_TYPE(TypeTag, SolutionVector) SolutionVector ; - typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables ; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; - typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; - typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw; - typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams; + using Simulator = GetPropType; + using Grid = GetPropType; + using ElementContext = GetPropType; + using SparseMatrixAdapter = GetPropType; + using SolutionVector = GetPropType; + using PrimaryVariables = GetPropType; + using FluidSystem = GetPropType; + using Indices = GetPropType; + using MaterialLaw = GetPropType; + using MaterialLawParams = GetPropType; typedef double Scalar; static const int numEq = Indices::numEq; diff --git a/opm/simulators/flow/BlackoilModelParametersEbos.hpp b/opm/simulators/flow/BlackoilModelParametersEbos.hpp index 6e828a7d2..a15dcef47 100644 --- a/opm/simulators/flow/BlackoilModelParametersEbos.hpp +++ b/opm/simulators/flow/BlackoilModelParametersEbos.hpp @@ -104,7 +104,7 @@ namespace Opm struct BlackoilModelParametersEbos { private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; + using Scalar = GetPropType; public: /// Max relative change in bhp in single iteration. diff --git a/opm/simulators/flow/FlowMainEbos.hpp b/opm/simulators/flow/FlowMainEbos.hpp index 1e93296bd..0f79e4040 100644 --- a/opm/simulators/flow/FlowMainEbos.hpp +++ b/opm/simulators/flow/FlowMainEbos.hpp @@ -70,12 +70,12 @@ namespace Opm { public: typedef typename GET_PROP(TypeTag, MaterialLaw)::EclMaterialLawManager MaterialLawManager; - typedef typename GET_PROP_TYPE(TypeTag, Simulator) EbosSimulator; - typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - typedef typename GET_PROP_TYPE(TypeTag, Problem) Problem; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; + using EbosSimulator = GetPropType; + using Grid = GetPropType; + using GridView = GetPropType; + using Problem = GetPropType; + using Scalar = GetPropType; + using FluidSystem = GetPropType; typedef Opm::SimulatorFullyImplicitBlackoilEbos Simulator; @@ -419,7 +419,7 @@ namespace Opm omp_set_num_threads(std::min(2, omp_get_num_procs())); #endif - typedef typename GET_PROP_TYPE(TypeTag, ThreadManager) ThreadManager; + using ThreadManager = GetPropType; ThreadManager::init(); } diff --git a/opm/simulators/flow/Main.hpp b/opm/simulators/flow/Main.hpp index 93009318f..7b985c618 100644 --- a/opm/simulators/flow/Main.hpp +++ b/opm/simulators/flow/Main.hpp @@ -80,7 +80,7 @@ namespace Opm { template void flowEbosSetDeck(Deck *deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig) { - using Vanguard = typename GET_PROP_TYPE(TypeTag, Vanguard); + using Vanguard = GetPropType; Vanguard::setExternalDeck(deck); Vanguard::setExternalEclState(&eclState); Vanguard::setExternalSchedule(&schedule); @@ -118,7 +118,7 @@ namespace Opm class Main { private: - using FlowMainEbosType = Opm::FlowMainEbos; + using FlowMainEbosType = Opm::FlowMainEbos; enum class FileOutputMode { //! \brief No output to files. @@ -159,7 +159,7 @@ namespace Opm int runDynamic() { int exitCode = EXIT_SUCCESS; - if (initialize_(exitCode)) { + if (initialize_(exitCode)) { return dispatchDynamic_(); } else { return exitCode; @@ -184,7 +184,7 @@ namespace Opm std::unique_ptr initFlowEbosBlackoil(int& exitCode) { exitCode = EXIT_SUCCESS; - if (initialize_(exitCode)) { + if (initialize_(exitCode)) { // TODO: check that this deck really represents a blackoil // case. E.g. check that number of phases == 3 Opm::flowEbosBlackoilSetDeck( @@ -341,7 +341,7 @@ namespace Opm // simulator object. (Which parses the parameters again, but since this is done in an // identical manner it does not matter.) typedef TypeTagEarlyBird PreTypeTag; - typedef typename GET_PROP_TYPE(PreTypeTag, Problem) PreProblem; + using PreProblem = GetPropType; PreProblem::setBriefDescription("Flow, an advanced reservoir simulator for ECL-decks provided by the Open Porous Media project."); int status = Opm::FlowMainEbos::setupParameters_(argc_, argv_); @@ -374,7 +374,7 @@ namespace Opm deckFilename = EWOMS_GET_PARAM(PreTypeTag, std::string, EclDeckFileName); } - typedef typename GET_PROP_TYPE(PreTypeTag, Vanguard) PreVanguard; + using PreVanguard = GetPropType; try { deckFilename = PreVanguard::canonicalDeckPath(deckFilename).string(); } diff --git a/opm/simulators/flow/NonlinearSolverEbos.hpp b/opm/simulators/flow/NonlinearSolverEbos.hpp index d4fc5736f..33abafb71 100644 --- a/opm/simulators/flow/NonlinearSolverEbos.hpp +++ b/opm/simulators/flow/NonlinearSolverEbos.hpp @@ -58,7 +58,7 @@ namespace Opm { template class NonlinearSolverEbos { - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; + using Scalar = GetPropType; public: // Available relaxation scheme types. diff --git a/opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp b/opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp index e306f5bf0..bcdddd021 100644 --- a/opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp +++ b/opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp @@ -53,15 +53,15 @@ template class SimulatorFullyImplicitBlackoilEbos { public: - typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator; - typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; - typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext; - typedef typename GET_PROP_TYPE(TypeTag, Indices) BlackoilIndices; - typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables; - typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw; - typedef typename GET_PROP_TYPE(TypeTag, SolutionVector) SolutionVector ; - typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams; + using Simulator = GetPropType; + using Grid = GetPropType; + using FluidSystem = GetPropType; + using ElementContext = GetPropType; + using BlackoilIndices = GetPropType; + using PrimaryVariables = GetPropType; + using MaterialLaw = GetPropType; + using SolutionVector = GetPropType; + using MaterialLawParams = GetPropType; typedef AdaptiveTimeSteppingEbos TimeStepper; typedef Opm::BlackOilPolymerModule PolymerModule; diff --git a/opm/simulators/linalg/ISTLSolverEbos.hpp b/opm/simulators/linalg/ISTLSolverEbos.hpp index 8c4231629..24ae2c75e 100644 --- a/opm/simulators/linalg/ISTLSolverEbos.hpp +++ b/opm/simulators/linalg/ISTLSolverEbos.hpp @@ -66,7 +66,7 @@ struct EclWellModel; SET_PROP(FlowIstlSolver, SparseMatrixAdapter) { private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; + using Scalar = GetPropType; enum { numEq = GET_PROP_VALUE(TypeTag, NumEq) }; typedef Opm::MatrixBlock Block; @@ -97,21 +97,21 @@ DenseMatrix transposeDenseMatrix(const DenseMatrix& M) class ISTLSolverEbos { protected: - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, SparseMatrixAdapter) SparseMatrixAdapter; - typedef typename GET_PROP_TYPE(TypeTag, GlobalEqVector) Vector; - typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; - typedef typename GET_PROP_TYPE(TypeTag, EclWellModel) WellModel; - typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator; + using GridView = GetPropType; + using Scalar = GetPropType; + using SparseMatrixAdapter = GetPropType; + using Vector = GetPropType; + using Indices = GetPropType; + using WellModel = GetPropType; + using Simulator = GetPropType; typedef typename SparseMatrixAdapter::IstlMatrix Matrix; typedef typename SparseMatrixAdapter::MatrixBlock MatrixBlockType; typedef typename Vector::block_type BlockVector; - typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation; - typedef typename GET_PROP_TYPE(TypeTag, ThreadManager) ThreadManager; + using Evaluation = GetPropType; + using ThreadManager = GetPropType; typedef typename GridView::template Codim<0>::Entity Element; - typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext; + using ElementContext = GetPropType; using FlexibleSolverType = Dune::FlexibleSolver; using AbstractOperatorType = Dune::AssembledLinearOperator; using WellModelOperator = WellModelAsLinearOperator; diff --git a/opm/simulators/linalg/ISTLSolverEbosFlexible.hpp b/opm/simulators/linalg/ISTLSolverEbosFlexible.hpp index c30748edf..82d6d8484 100644 --- a/opm/simulators/linalg/ISTLSolverEbosFlexible.hpp +++ b/opm/simulators/linalg/ISTLSolverEbosFlexible.hpp @@ -55,13 +55,13 @@ namespace Opm template class ISTLSolverEbosFlexible { - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using SparseMatrixAdapter = typename GET_PROP_TYPE(TypeTag, SparseMatrixAdapter); - using VectorType = typename GET_PROP_TYPE(TypeTag, GlobalEqVector); - using Simulator = typename GET_PROP_TYPE(TypeTag, Simulator); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using GridView = GetPropType; + using SparseMatrixAdapter = GetPropType; + using VectorType = GetPropType; + using Simulator = GetPropType; + using Scalar = GetPropType; using MatrixType = typename SparseMatrixAdapter::IstlMatrix; - using WellModel = typename GET_PROP_TYPE(TypeTag, EclWellModel); + using WellModel = GetPropType; #if HAVE_MPI using Communication = Dune::OwnerOverlapCopyCommunication; #else @@ -72,16 +72,15 @@ class ISTLSolverEbosFlexible using SolverType = Dune::FlexibleSolver; // for quasiImpesWeights - typedef typename GET_PROP_TYPE(TypeTag, GlobalEqVector) Vector; - typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; + using Vector = GetPropType; + using Indices = GetPropType; typedef typename SparseMatrixAdapter::IstlMatrix Matrix; typedef typename SparseMatrixAdapter::MatrixBlock MatrixBlockType; typedef typename Vector::block_type BlockVector; - typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation; - typedef typename GET_PROP_TYPE(TypeTag, ThreadManager) ThreadManager; + using Evaluation = GetPropType; + using ThreadManager = GetPropType; typedef typename GridView::template Codim<0>::Entity Element; - typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext; - + using ElementContext = GetPropType; public: static void registerParameters() diff --git a/opm/simulators/wells/BlackoilWellModel.hpp b/opm/simulators/wells/BlackoilWellModel.hpp index 38cb97647..02a4ee2da 100644 --- a/opm/simulators/wells/BlackoilWellModel.hpp +++ b/opm/simulators/wells/BlackoilWellModel.hpp @@ -78,15 +78,15 @@ namespace Opm { typedef WellStateFullyImplicitBlackoil WellState; typedef BlackoilModelParametersEbos ModelParameters; - typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; - typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext; - typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; - typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector; - typedef typename GET_PROP_TYPE(TypeTag, GlobalEqVector) GlobalEqVector; - typedef typename GET_PROP_TYPE(TypeTag, SparseMatrixAdapter) SparseMatrixAdapter; + using Grid = GetPropType; + using FluidSystem = GetPropType; + using ElementContext = GetPropType; + using Indices = GetPropType; + using Simulator = GetPropType; + using Scalar = GetPropType; + using RateVector = GetPropType; + using GlobalEqVector = GetPropType; + using SparseMatrixAdapter = GetPropType; typedef typename Opm::BaseAuxiliaryModule::NeighborSet NeighborSet; diff --git a/opm/simulators/wells/WellConnectionAuxiliaryModule.hpp b/opm/simulators/wells/WellConnectionAuxiliaryModule.hpp index 45188b7cf..2f934e6a8 100644 --- a/opm/simulators/wells/WellConnectionAuxiliaryModule.hpp +++ b/opm/simulators/wells/WellConnectionAuxiliaryModule.hpp @@ -33,8 +33,8 @@ template class WellConnectionAuxiliaryModule : public Opm::BaseAuxiliaryModule { - typedef typename GET_PROP_TYPE(TypeTag, GlobalEqVector) GlobalEqVector; - typedef typename GET_PROP_TYPE(TypeTag, SparseMatrixAdapter) SparseMatrixAdapter; + using GlobalEqVector = GetPropType; + using SparseMatrixAdapter = GetPropType; public: diff --git a/opm/simulators/wells/WellInterface.hpp b/opm/simulators/wells/WellInterface.hpp index 308c05287..0ffa7bbc5 100644 --- a/opm/simulators/wells/WellInterface.hpp +++ b/opm/simulators/wells/WellInterface.hpp @@ -74,14 +74,14 @@ namespace Opm static const int Oil = BlackoilPhases::Liquid; static const int Gas = BlackoilPhases::Vapour; - typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid; - typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; - typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; - typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) IntensiveQuantities; - typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw; - typedef typename GET_PROP_TYPE(TypeTag, SparseMatrixAdapter) SparseMatrixAdapter; - typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector; + using Grid = GetPropType; + using Simulator = GetPropType; + using FluidSystem = GetPropType; + using Indices = GetPropType; + using IntensiveQuantities = GetPropType; + using MaterialLaw = GetPropType; + using SparseMatrixAdapter = GetPropType; + using RateVector = GetPropType; static const int numEq = Indices::numEq; typedef double Scalar; diff --git a/tests/test_ecl_output.cc b/tests/test_ecl_output.cc index 5273d58db..2804cd8ed 100644 --- a/tests/test_ecl_output.cc +++ b/tests/test_ecl_output.cc @@ -105,10 +105,10 @@ double ecl_sum_get_general_var(const Opm::EclIO::ESmry* smry, } template -std::unique_ptr +std::unique_ptr> initSimulator(const char *filename) { - typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator; + using Simulator = Opm::GetPropType; std::string filenameArg = "--ecl-deck-file-name="; filenameArg += filename; @@ -125,12 +125,12 @@ initSimulator(const char *filename) void test_summary() { - typedef typename TTAG(TestEclOutputTypeTag) TypeTag; + using TypeTag = Opm::Properties::TTag::TestEclOutputTypeTag; const std::string filename = "SUMMARY_DECK_NON_CONSTANT_POROSITY.DATA"; const std::string casename = "SUMMARY_DECK_NON_CONSTANT_POROSITY"; auto simulator = initSimulator(filename.data()); - typedef typename GET_PROP_TYPE(TypeTag, Vanguard) Vanguard; + using Vanguard = Opm::GetPropType; typedef Opm::CollectDataToIORank< Vanguard > CollectDataToIORankType; CollectDataToIORankType collectToIORank(simulator->vanguard()); Opm::EclOutputBlackOilModule eclOutputModule(*simulator, collectToIORank); @@ -270,7 +270,7 @@ int main(int argc, char** argv) Dune::MPIHelper::instance(argc, argv); #endif - typedef TTAG(TestEclOutputTypeTag) TypeTag; + using TypeTag = Opm::Properties::TTag::TestEclOutputTypeTag; Opm::registerAllParameters_(); test_summary(); test_readWriteWells(); diff --git a/tests/test_equil.cc b/tests/test_equil.cc index 42e36f1a4..1a9ad83bc 100644 --- a/tests/test_equil.cc +++ b/tests/test_equil.cc @@ -77,10 +77,10 @@ NEW_TYPE_TAG(TestEquilTypeTag, INHERITS_FROM(BlackOilModel, EclBaseProblem)); END_PROPERTIES template -std::unique_ptr +std::unique_ptr> initSimulator(const char *filename) { - typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator; + using Simulator = Opm::GetPropType; std::string filenameArg = "--ecl-deck-file-name="; filenameArg += filename; @@ -98,7 +98,7 @@ initSimulator(const char *filename) template static void initDefaultFluidSystem() { - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; + using FluidSystem = Opm::GetPropType; std::vector > Bo = { { 101353, 1. }, @@ -179,8 +179,8 @@ void test_PhasePressure() { const auto record = mkEquilRecord( 0, 1e5, 5, 0, 0, 0 ); - using TypeTag = TTAG(TestEquilTypeTag); - using FluidSystem = GET_PROP_TYPE(TypeTag, FluidSystem); + using TypeTag = Opm::Properties::TTag::TestEquilTypeTag; + using FluidSystem = Opm::GetPropType; using TabulatedFunction = Opm::Tabulated1DFunction; std::vector x = {0.0,100.0}; @@ -228,8 +228,8 @@ void test_CellSubset() { using PVal = std::vector; using PPress = std::vector; - using TypeTag = TTAG(TestEquilTypeTag); - using FluidSystem = GET_PROP_TYPE(TypeTag, FluidSystem); + using TypeTag = Opm::Properties::TTag::TestEquilTypeTag; + using FluidSystem = Opm::GetPropType; auto simulator = initSimulator("equil_base.DATA"); const auto& eclipseState = simulator->vanguard().eclState(); @@ -339,8 +339,8 @@ void test_RegMapping() using PVal = std::vector; using PPress = std::vector; - using TypeTag = TTAG(TestEquilTypeTag); - using FluidSystem = GET_PROP_TYPE(TypeTag, FluidSystem); + using TypeTag = Opm::Properties::TTag::TestEquilTypeTag; + using FluidSystem = Opm::GetPropType; auto simulator = initSimulator("equil_base.DATA"); initDefaultFluidSystem(); @@ -439,8 +439,8 @@ void test_RegMapping() void test_DeckAllDead() { - typedef TTAG(TestEquilTypeTag) TypeTag; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; + using TypeTag = Opm::Properties::TTag::TestEquilTypeTag; + using FluidSystem = Opm::GetPropType; auto simulator = initSimulator("equil_deadfluids.DATA"); const auto& eclipseState = simulator->vanguard().eclState(); Opm::GridManager gm(eclipseState.getInputGrid()); @@ -465,10 +465,11 @@ void test_DeckAllDead() void test_CapillaryInversion() { // Test setup. - typedef typename TTAG(TestEquilTypeTag) TypeTag; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; - typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw; - typedef typename GET_PROP(TypeTag, MaterialLaw)::EclMaterialLawManager MaterialLawManager; + using TypeTag = Opm::Properties::TTag::TestEquilTypeTag; + using FluidSystem = Opm::GetPropType; + using MaterialLaw = Opm::GetPropType; + using MaterialLawManager = typename Opm::GetProp::EclMaterialLawManager; + auto simulator = initSimulator("equil_capillary.DATA"); // Test the capillary inversion for oil-water. @@ -515,8 +516,8 @@ void test_CapillaryInversion() void test_DeckWithCapillary() { - typedef typename TTAG(TestEquilTypeTag) TypeTag; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; + using TypeTag = Opm::Properties::TTag::TestEquilTypeTag; + using FluidSystem = Opm::GetPropType; auto simulator = initSimulator("equil_capillary.DATA"); auto& eclipseState = simulator->vanguard().eclState(); Opm::GridManager gm(eclipseState.getInputGrid()); @@ -553,8 +554,8 @@ void test_DeckWithCapillary() void test_DeckWithCapillaryOverlap() { - typedef typename TTAG(TestEquilTypeTag) TypeTag; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; + using TypeTag = Opm::Properties::TTag::TestEquilTypeTag; + using FluidSystem = Opm::GetPropType; auto simulator = initSimulator("equil_capillary_overlap.DATA"); const auto& eclipseState = simulator->vanguard().eclState(); Opm::GridManager gm(eclipseState.getInputGrid()); @@ -611,8 +612,8 @@ void test_DeckWithCapillaryOverlap() void test_DeckWithLiveOil() { - typedef typename TTAG(TestEquilTypeTag) TypeTag; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; + using TypeTag = Opm::Properties::TTag::TestEquilTypeTag; + using FluidSystem = Opm::GetPropType; auto simulator = initSimulator("equil_liveoil.DATA"); const auto& eclipseState = simulator->vanguard().eclState(); Opm::GridManager gm(eclipseState.getInputGrid()); @@ -687,8 +688,8 @@ void test_DeckWithLiveOil() void test_DeckWithLiveGas() { - typedef typename TTAG(TestEquilTypeTag) TypeTag; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; + using TypeTag = Opm::Properties::TTag::TestEquilTypeTag; + using FluidSystem = Opm::GetPropType; auto simulator = initSimulator("equil_livegas.DATA"); const auto& eclipseState = simulator->vanguard().eclState(); Opm::GridManager gm(eclipseState.getInputGrid()); @@ -765,8 +766,8 @@ void test_DeckWithLiveGas() void test_DeckWithRSVDAndRVVD() { - typedef typename TTAG(TestEquilTypeTag) TypeTag; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; + using TypeTag = Opm::Properties::TTag::TestEquilTypeTag; + using FluidSystem = Opm::GetPropType; auto simulator = initSimulator("equil_rsvd_and_rvvd.DATA"); const auto& eclipseState = simulator->vanguard().eclState(); Opm::GridManager gm(eclipseState.getInputGrid()); @@ -863,8 +864,8 @@ void test_DeckWithRSVDAndRVVD() void test_DeckWithPBVDAndPDVD() { - typedef typename TTAG(TestEquilTypeTag) TypeTag; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; + using TypeTag = Opm::Properties::TTag::TestEquilTypeTag; + using FluidSystem = Opm::GetPropType; auto simulator = initSimulator("equil_pbvd_and_pdvd.DATA"); const auto& eclipseState = simulator->vanguard().eclState(); Opm::GridManager gm(eclipseState.getInputGrid()); @@ -954,7 +955,7 @@ void test_DeckWithPBVDAndPDVD() void test_DeckWithSwatinit() { #if 0 - typedef typename TTAG(TestEquilTypeTag) TypeTag; + using TypeTag = Opm::Properties::TTag::TestEquilTypeTag; auto simulator = initSimulator("equil_capillary_swatinit.DATA"); const auto& eclipseState = simulator->vanguard().eclState(); Opm::GridManager gm(eclipseState.getInputGrid()); @@ -1106,7 +1107,7 @@ try { Dune::MPIHelper::instance(argc, argv); #endif - typedef TTAG(TestEquilTypeTag) TypeTag; + using TypeTag = Opm::Properties::TTag::TestEquilTypeTag; Opm::registerAllParameters_(); test_PhasePressure(); diff --git a/tests/test_wellmodel.cpp b/tests/test_wellmodel.cpp index 62bb981d4..85fac0329 100644 --- a/tests/test_wellmodel.cpp +++ b/tests/test_wellmodel.cpp @@ -57,7 +57,7 @@ -using StandardWell = Opm::StandardWell; +using StandardWell = Opm::StandardWell; struct SetupTest { @@ -100,7 +100,7 @@ struct GlobalFixture { Dune::MPIHelper::instance(argcDummy, argvDummy); #endif - Opm::FlowMainEbos::setupParameters_(argcDummy, argvDummy); + Opm::FlowMainEbos::setupParameters_(argcDummy, argvDummy); } }; @@ -111,7 +111,7 @@ BOOST_AUTO_TEST_CASE(TestStandardWellInput) { const auto& wells_ecl = setup_test.schedule->getWells(setup_test.current_timestep); BOOST_CHECK_EQUAL( wells_ecl.size(), 2); const Opm::Well& well = wells_ecl[1]; - const Opm::BlackoilModelParametersEbos param; + const Opm::BlackoilModelParametersEbos param; // For the conversion between the surface volume rate and resrevoir voidage rate typedef Opm::BlackOilFluidSystem FluidSystem; @@ -139,7 +139,7 @@ BOOST_AUTO_TEST_CASE(TestBehavoir) { { const int nw = wells_ecl.size(); - const Opm::BlackoilModelParametersEbos param; + const Opm::BlackoilModelParametersEbos param; for (int w = 0; w < nw; ++w) { // For the conversion between the surface volume rate and resrevoir voidage rate