From a85366c175c4cf0fdcf0b7f5f3bb3afac2fc09e3 Mon Sep 17 00:00:00 2001 From: Bernd Flemisch <bernd@iws.uni-stuttgart.de> Date: Sat, 16 Dec 2017 19:47:42 +0100 Subject: [PATCH] [test] replace typedef by using --- test/common/spline/test_spline.cc | 2 +- test/io/gridcreator/test_gridcreator_cake.cc | 2 +- test/io/gridcreator/test_gridcreator_gmsh.cc | 2 +- .../material/fluidsystems/checkfluidsystem.hh | 2 +- .../fluidsystems/test_fluidsystems.cc | 78 ++++++++-------- .../immiscibleflash/test_immiscibleflash.cc | 20 ++--- test/material/ncpflash/test_ncpflash.cc | 28 +++--- .../pengrobinson/test_pengrobinson.cc | 24 ++--- test/material/tabulation/test_tabulation.cc | 6 +- .../1p2c_richards2c/richardstestproblem.hh | 4 +- .../embedded/1p2c_richards2c/schursolver.hh | 24 ++--- .../embedded/1p2c_richards2c/test_rosi2c.cc | 2 +- .../embedded/1p_1p/1d3dtestproblem.hh | 4 +- .../embedded/1p_1p/test_1p_1p.cc | 2 +- .../1p_richards/richardstestproblem.hh | 4 +- .../embedded/1p_richards/test_rosi.cc | 2 +- .../1p2c_1p2c/test_fracture_1p2c_1p2c.cc | 2 +- .../1p2c_1p2c/test_fracture_1p2cni_1p2cni.cc | 2 +- .../facet/1p_1p/test_fracture_1p_1p.cc | 2 +- .../1p/implicit/1ptestproblem.hh | 4 +- .../1p/sequential/resultevaluation.hh | 12 +-- .../1p/sequential/resultevaluation3d.hh | 48 +++++----- .../porousmediumflow/1p/sequential/test_1p.cc | 2 +- .../1p/sequential/test_1pproblem.hh | 24 ++--- .../1p/sequential/test_1pspatialparams.hh | 18 ++-- .../1p/sequential/test_diffusion.cc | 8 +- .../1p/sequential/test_diffusionproblem.hh | 22 ++--- .../1p/sequential/test_diffusionproblem3d.hh | 26 +++--- .../sequential/test_diffusionspatialparams.hh | 30 +++---- .../test_diffusionspatialparams3d.hh | 26 +++--- .../1pncmin/implicit/test_box1pncmin.cc | 2 +- .../1pncmin/implicit/test_cc1pncmin.cc | 2 +- .../buckleyleverettanalyticsolution.hh | 22 ++--- .../sequential/mcwhorteranalyticsolution.hh | 26 +++--- .../2p/sequential/test_3d2pproblem.hh | 36 ++++---- .../2p/sequential/test_3d2pspatialparams.hh | 30 +++---- .../2p/sequential/test_impes.cc | 2 +- .../2p/sequential/test_impesadaptive.cc | 2 +- .../sequential/test_impesadaptiveproblem.hh | 24 ++--- .../sequential/test_impesadaptiverestart.cc | 2 +- .../test_impesadaptivespatialparams.hh | 24 ++--- .../2p/sequential/test_impesproblem.hh | 20 ++--- .../2p/sequential/test_impesspatialparams.hh | 24 ++--- .../2p/sequential/test_impeswithamg.cc | 2 +- .../2p/sequential/test_mpfa2pproblem.hh | 22 ++--- .../2p/sequential/test_mpfa2pspatialparams.hh | 26 +++--- .../2p/sequential/test_transport.cc | 2 +- .../2p/sequential/test_transportproblem.hh | 20 ++--- .../sequential/test_transportspatialparams.hh | 20 ++--- .../implicit/steaminjectionspatialparams.hh | 6 +- .../2p2c/sequential/test_adaptive2p2c2d.cc | 2 +- .../sequential/test_adaptive2p2c2dproblem.hh | 27 +++--- .../2p2c/sequential/test_adaptive2p2c3d.cc | 2 +- .../sequential/test_adaptive2p2c3dproblem.hh | 33 ++++--- .../2p2c/sequential/test_dec2p2c.cc | 2 +- .../sequential/test_dec2p2c_spatialparams.hh | 20 ++--- .../2p2c/sequential/test_dec2p2cproblem.hh | 23 +++-- .../2p2c/sequential/test_multiphysics2p2c.cc | 8 +- .../test_multiphysics2p2cproblem.hh | 23 +++-- .../implicit/3pwateroilsagdproblem.hh | 30 +++---- .../implicit/3pwateroilsagdspatialparams.hh | 36 ++++---- .../3pwateroil/implicit/test_box3pwateroil.cc | 2 +- .../heterogeneousspatialparameters.hh | 2 +- .../mpnc/implicit/combustionproblem1c.hh | 72 +++++++-------- .../mpnc/implicit/combustionspatialparams.hh | 40 ++++----- .../implicit/evaporationatmosphereproblem.hh | 64 ++++++------- .../evaporationatmospherespatialparams.hh | 90 +++++++++---------- .../mpnc/implicit/forchheimer1pproblem.hh | 42 ++++----- .../mpnc/implicit/forchheimer2pproblem.hh | 42 ++++----- .../mpnc/implicit/forchheimerspatialparams.hh | 34 +++---- .../mpnc/implicit/obstacleproblem.hh | 40 ++++----- .../mpnc/implicit/obstaclespatialparams.hh | 34 +++---- .../mpnc/implicit/plotoverline2d.hh | 24 ++--- .../mpnc/implicit/test_boxmpnc.cc | 2 +- .../mpnc/implicit/test_boxmpnckinetic.cc | 2 +- .../implicit/test_boxmpncthermalnonequil.cc | 2 +- .../mpnc/implicit/test_ccmpnc.cc | 2 +- .../mpnc/implicit/test_forchheimer1p.cc | 2 +- .../mpnc/implicit/test_forchheimer2p.cc | 2 +- .../richardsanalyticalspatialparams.hh | 6 +- .../implicit/richardsniconductionproblem.hh | 8 +- .../implicit/richardsniconvectionproblem.hh | 8 +- .../implicit/richardsnispatialparams.hh | 8 +- 83 files changed, 738 insertions(+), 742 deletions(-) diff --git a/test/common/spline/test_spline.cc b/test/common/spline/test_spline.cc index 775e5cb7b8..3b25a040b6 100644 --- a/test/common/spline/test_spline.cc +++ b/test/common/spline/test_spline.cc @@ -213,7 +213,7 @@ void plot() { const int numSamples = 5; const int n = numSamples - 1; - typedef Dune::FieldVector<double, numSamples> FV; + using FV = Dune::FieldVector<double, numSamples>; double x_[] = { 0, 5, 7.5, 8.75, 9.375 }; double y_[] = { 10, 0, 10, 0, 10 }; diff --git a/test/io/gridcreator/test_gridcreator_cake.cc b/test/io/gridcreator/test_gridcreator_cake.cc index 40289ca5b2..41ef55e5e6 100644 --- a/test/io/gridcreator/test_gridcreator_cake.cc +++ b/test/io/gridcreator/test_gridcreator_cake.cc @@ -56,7 +56,7 @@ int main(int argc, char** argv) try // initialize MPI, finalize is done automatically on exit Dune::MPIHelper::instance(argc, argv); - // Some typedefs + // using declarations using TypeTag = TTAG(GridCreatorCakeTest); using Grid = typename GET_PROP_TYPE(TypeTag, Grid); using GridCreator = typename Dumux::CakeGridCreator<Grid>; diff --git a/test/io/gridcreator/test_gridcreator_gmsh.cc b/test/io/gridcreator/test_gridcreator_gmsh.cc index 64405dc09f..eef7ece4f3 100644 --- a/test/io/gridcreator/test_gridcreator_gmsh.cc +++ b/test/io/gridcreator/test_gridcreator_gmsh.cc @@ -112,7 +112,7 @@ int main(int argc, char** argv) try // initialize MPI, finalize is done automatically on exit Dune::MPIHelper::instance(argc, argv); - // Some typedefs + // using declarations using TypeTag = TTAG(GridCreatorGmshTest); using Grid = typename GET_PROP_TYPE(TypeTag, Grid); using GridCreator = typename Dumux::GridCreator<TypeTag>; diff --git a/test/material/fluidsystems/checkfluidsystem.hh b/test/material/fluidsystems/checkfluidsystem.hh index 2bce457de2..4869bd8eda 100644 --- a/test/material/fluidsystems/checkfluidsystem.hh +++ b/test/material/fluidsystems/checkfluidsystem.hh @@ -425,7 +425,7 @@ int checkFluidSystem() fs.restrictToPhase(-1); // check whether the parameter cache adheres to the API - typedef typename FluidSystem::ParameterCache PC; + using PC = typename FluidSystem::ParameterCache; PC paramCache; try { diff --git a/test/material/fluidsystems/test_fluidsystems.cc b/test/material/fluidsystems/test_fluidsystems.cc index 5e5cfa3077..d7f2901eb0 100644 --- a/test/material/fluidsystems/test_fluidsystems.cc +++ b/test/material/fluidsystems/test_fluidsystems.cc @@ -58,12 +58,12 @@ int main() { - typedef double Scalar; - typedef Dumux::H2O<Scalar> H2O; - typedef Dumux::N2<Scalar> N2; + using Scalar = double; + using H2O = Dumux::H2O<Scalar>; + using N2 = Dumux::N2<Scalar>; - typedef Dumux::FluidSystems::LiquidPhase<Scalar, H2O> Liquid; - typedef Dumux::FluidSystems::GasPhase<Scalar, N2> Gas; + using Liquid = Dumux::FluidSystems::LiquidPhase<Scalar, H2O>; + using Gas = Dumux::FluidSystems::GasPhase<Scalar, N2>; int success = 0; std::vector<std::string> collectedExceptions; @@ -71,8 +71,8 @@ int main() ///////////////////////// // check all fluid states { - typedef Dumux::FluidSystems::H2ON2<Scalar, /*enableComplexRelations=*/false> FluidSystem; - typedef Dumux::CompositionalFluidState<Scalar, FluidSystem> BaseFluidState; + using FluidSystem = Dumux::FluidSystems::H2ON2<Scalar, /*enableComplexRelations=*/false>; + using BaseFluidState = Dumux::CompositionalFluidState<Scalar, FluidSystem>; BaseFluidState baseFs; // TwoPTwoCFluidState TODO: doesn't fulfill interface! @@ -121,101 +121,101 @@ int main() // check all fluid systems // 1p - { typedef Dumux::FluidSystems::OneP<Scalar, Liquid> FluidSystem; + { using FluidSystem = Dumux::FluidSystems::OneP<Scalar, Liquid>; success += Dumux::checkFluidSystem<Scalar, FluidSystem>(); } - { typedef Dumux::FluidSystems::OneP<Scalar, Gas> FluidSystem; + { using FluidSystem = Dumux::FluidSystems::OneP<Scalar, Gas>; success += Dumux::checkFluidSystem<Scalar, FluidSystem>(); } // 2p-immiscible - { typedef Dumux::FluidSystems::TwoPImmiscible<Scalar, Liquid, Liquid> FluidSystem; + { using FluidSystem = Dumux::FluidSystems::TwoPImmiscible<Scalar, Liquid, Liquid>; success += Dumux::checkFluidSystem<Scalar, FluidSystem>(); } - { typedef Dumux::FluidSystems::TwoPImmiscible<Scalar, Liquid, Gas> FluidSystem; + { using FluidSystem = Dumux::FluidSystems::TwoPImmiscible<Scalar, Liquid, Gas>; success += Dumux::checkFluidSystem<Scalar, FluidSystem>(); } - { typedef Dumux::FluidSystems::TwoPImmiscible<Scalar, Gas, Liquid> FluidSystem; + { using FluidSystem = Dumux::FluidSystems::TwoPImmiscible<Scalar, Gas, Liquid>; success += Dumux::checkFluidSystem<Scalar, FluidSystem>(); } // base // Brine -- Air - { typedef Dumux::SimpleH2O<Scalar> H2OType; + { using H2OType = Dumux::SimpleH2O<Scalar>; const bool enableComplexRelations=false; - typedef Dumux::FluidSystems::BrineAir<Scalar, H2OType, enableComplexRelations> FluidSystem; + using FluidSystem = Dumux::FluidSystems::BrineAir<Scalar, H2OType, enableComplexRelations>; success += Dumux::checkFluidSystem<Scalar, FluidSystem>(); } - { typedef Dumux::SimpleH2O<Scalar> H2OType; + { using H2OType = Dumux::SimpleH2O<Scalar>; const bool enableComplexRelations=true; - typedef Dumux::FluidSystems::BrineAir<Scalar, H2OType, enableComplexRelations> FluidSystem; + using FluidSystem = Dumux::FluidSystems::BrineAir<Scalar, H2OType, enableComplexRelations>; success += Dumux::checkFluidSystem<Scalar, FluidSystem>(); } // Brine -- CO2 // H2O -- Air - { typedef Dumux::SimpleH2O<Scalar> H2OType; + { using H2OType = Dumux::SimpleH2O<Scalar>; const bool enableComplexRelations=false; - typedef Dumux::FluidSystems::H2OAir<Scalar, H2OType, enableComplexRelations> FluidSystem; + using FluidSystem = Dumux::FluidSystems::H2OAir<Scalar, H2OType, enableComplexRelations>; success += Dumux::checkFluidSystem<Scalar, FluidSystem>(); } - { typedef Dumux::SimpleH2O<Scalar> H2OType; + { using H2OType = Dumux::SimpleH2O<Scalar>; const bool enableComplexRelations=true; - typedef Dumux::FluidSystems::H2OAir<Scalar, H2OType, enableComplexRelations> FluidSystem; + using FluidSystem = Dumux::FluidSystems::H2OAir<Scalar, H2OType, enableComplexRelations>; success += Dumux::checkFluidSystem<Scalar, FluidSystem>(); } - { typedef Dumux::H2O<Scalar> H2OType; + { using H2OType = Dumux::H2O<Scalar>; const bool enableComplexRelations=false; - typedef Dumux::FluidSystems::H2OAir<Scalar, H2OType, enableComplexRelations> FluidSystem; + using FluidSystem = Dumux::FluidSystems::H2OAir<Scalar, H2OType, enableComplexRelations>; success += Dumux::checkFluidSystem<Scalar, FluidSystem>(); } - { typedef Dumux::H2O<Scalar> H2OType; + { using H2OType = Dumux::H2O<Scalar>; const bool enableComplexRelations=true; - typedef Dumux::FluidSystems::H2OAir<Scalar, H2OType, enableComplexRelations> FluidSystem; + using FluidSystem = Dumux::FluidSystems::H2OAir<Scalar, H2OType, enableComplexRelations>; success += Dumux::checkFluidSystem<Scalar, FluidSystem>(); } { using H2OType = Dumux::TabulatedComponent<Scalar, Dumux::H2O<Scalar>>; const bool enableComplexRelations=false; - typedef Dumux::FluidSystems::H2OAir<Scalar, H2OType, enableComplexRelations> FluidSystem; + using FluidSystem = Dumux::FluidSystems::H2OAir<Scalar, H2OType, enableComplexRelations>; success += Dumux::checkFluidSystem<Scalar, FluidSystem>(); } { using H2OType = Dumux::TabulatedComponent<Scalar, Dumux::H2O<Scalar>>; const bool enableComplexRelations=true; - typedef Dumux::FluidSystems::H2OAir<Scalar, H2OType, enableComplexRelations> FluidSystem; + using FluidSystem = Dumux::FluidSystems::H2OAir<Scalar, H2OType, enableComplexRelations>; success += Dumux::checkFluidSystem<Scalar, FluidSystem>(); } // gas phase - { typedef Dumux::FluidSystems::GasPhase<Scalar, H2O> FluidSystem; + { using FluidSystem = Dumux::FluidSystems::GasPhase<Scalar, H2O>; success += Dumux::checkFluidSystem<Scalar, FluidSystem>(); } // H2O -- Air -- Mesitylene - { typedef Dumux::FluidSystems::H2OAirMesitylene<Scalar> FluidSystem; + { using FluidSystem = Dumux::FluidSystems::H2OAirMesitylene<Scalar>; success += Dumux::checkFluidSystem<Scalar, FluidSystem>(); } // H2O -- Air -- Xylene - { typedef Dumux::FluidSystems::H2OAirXylene<Scalar> FluidSystem; + { using FluidSystem = Dumux::FluidSystems::H2OAirXylene<Scalar>; success += Dumux::checkFluidSystem<Scalar, FluidSystem>(); } // H2O -- N2 - { typedef Dumux::FluidSystems::H2ON2<Scalar, /*enableComplexRelations=*/false> FluidSystem; + { using FluidSystem = Dumux::FluidSystems::H2ON2<Scalar, /*enableComplexRelations=*/false>; success += Dumux::checkFluidSystem<Scalar, FluidSystem>(); } - { typedef Dumux::FluidSystems::H2ON2<Scalar, /*enableComplexRelations=*/true> FluidSystem; + { using FluidSystem = Dumux::FluidSystems::H2ON2<Scalar, /*enableComplexRelations=*/true>; success += Dumux::checkFluidSystem<Scalar, FluidSystem>(); } // H2O -- N2 -- kinetic - { typedef Dumux::FluidSystems::H2ON2Kinetic<Scalar, /*enableComplexRelations=*/false> FluidSystem; + { using FluidSystem = Dumux::FluidSystems::H2ON2Kinetic<Scalar, /*enableComplexRelations=*/false>; success += Dumux::checkFluidSystem<Scalar, FluidSystem>(); } - { typedef Dumux::FluidSystems::H2ON2Kinetic<Scalar, /*enableComplexRelations=*/true> FluidSystem; + { using FluidSystem = Dumux::FluidSystems::H2ON2Kinetic<Scalar, /*enableComplexRelations=*/true>; success += Dumux::checkFluidSystem<Scalar, FluidSystem>(); } // H2O -- N2 -- o2 - { typedef Dumux::FluidSystems::H2ON2O2<Scalar, /*enableComplexRelations=*/false> FluidSystem; + { using FluidSystem = Dumux::FluidSystems::H2ON2O2<Scalar, /*enableComplexRelations=*/false>; success += Dumux::checkFluidSystem<Scalar, FluidSystem>(); } - { typedef Dumux::FluidSystems::H2ON2O2<Scalar, /*enableComplexRelations=*/true> FluidSystem; + { using FluidSystem = Dumux::FluidSystems::H2ON2O2<Scalar, /*enableComplexRelations=*/true>; success += Dumux::checkFluidSystem<Scalar, FluidSystem>(); } // liquid phase - { typedef Dumux::FluidSystems::LiquidPhase<Scalar, H2O> FluidSystem; + { using FluidSystem = Dumux::FluidSystems::LiquidPhase<Scalar, H2O>; success += Dumux::checkFluidSystem<Scalar, FluidSystem>(); } // pure water simple - { typedef Dumux::FluidSystems::PureWaterSimpleFluidSystem<Scalar, /*enableComplexRelations=*/false> FluidSystem; + { using FluidSystem = Dumux::FluidSystems::PureWaterSimpleFluidSystem<Scalar, /*enableComplexRelations=*/false>; success += Dumux::checkFluidSystem<Scalar, FluidSystem>(); } - { typedef Dumux::FluidSystems::PureWaterSimpleFluidSystem<Scalar, /*enableComplexRelations=*/true> FluidSystem; + { using FluidSystem = Dumux::FluidSystems::PureWaterSimpleFluidSystem<Scalar, /*enableComplexRelations=*/true>; success += Dumux::checkFluidSystem<Scalar, FluidSystem>(); } // spe5 - { typedef Dumux::FluidSystems::Spe5<Scalar> FluidSystem; + { using FluidSystem = Dumux::FluidSystems::Spe5<Scalar>; success += Dumux::checkFluidSystem<Scalar, FluidSystem>(); } return success; diff --git a/test/material/immiscibleflash/test_immiscibleflash.cc b/test/material/immiscibleflash/test_immiscibleflash.cc index 821ee18857..a89a85e7d7 100644 --- a/test/material/immiscibleflash/test_immiscibleflash.cc +++ b/test/material/immiscibleflash/test_immiscibleflash.cc @@ -88,7 +88,7 @@ void checkImmiscibleFlash(const FluidState &fsRef, { enum { numPhases = FluidSystem::numPhases }; enum { numComponents = FluidSystem::numComponents }; - typedef Dune::FieldVector<Scalar, numComponents> ComponentVector; + using ComponentVector = Dune::FieldVector<Scalar, numComponents>; // calculate the total amount of stuff in the reference fluid // phase @@ -101,7 +101,7 @@ void checkImmiscibleFlash(const FluidState &fsRef, } // initialize the fluid state for the flash calculation - typedef Dumux::ImmiscibleFlash<Scalar, FluidSystem> ImmiscibleFlash; + using ImmiscibleFlash = Dumux::ImmiscibleFlash<Scalar, FluidSystem>; FluidState fsFlash; fsFlash.setTemperature(fsRef.temperature(/*phaseIdx=*/0)); @@ -123,7 +123,7 @@ void completeReferenceFluidState(FluidState &fs, { enum { numPhases = FluidSystem::numPhases }; - typedef Dune::FieldVector<Scalar, numPhases> PhaseVector; + using PhaseVector = Dune::FieldVector<Scalar, numPhases>; int otherPhaseIdx = 1 - refPhaseIdx; @@ -149,19 +149,19 @@ void completeReferenceFluidState(FluidState &fs, int main() { - typedef double Scalar; - typedef Dumux::FluidSystems::H2ON2<Scalar> FluidSystem; - typedef Dumux::ImmiscibleFluidState<Scalar, FluidSystem> ImmiscibleFluidState; + using Scalar = double; + using FluidSystem = Dumux::FluidSystems::H2ON2<Scalar>; + using ImmiscibleFluidState = Dumux::ImmiscibleFluidState<Scalar, FluidSystem>; enum { numPhases = FluidSystem::numPhases }; enum { numComponents = FluidSystem::numComponents }; enum { wPhaseIdx = FluidSystem::wPhaseIdx }; enum { nPhaseIdx = FluidSystem::nPhaseIdx }; - typedef Dumux::RegularizedBrooksCorey<Scalar> EffMaterialLaw; - typedef Dumux::EffToAbsLaw<EffMaterialLaw> TwoPMaterialLaw; - typedef Dumux::TwoPAdapter<wPhaseIdx, TwoPMaterialLaw> MaterialLaw; - typedef MaterialLaw::Params MaterialLawParams; + using EffMaterialLaw = Dumux::RegularizedBrooksCorey<Scalar>; + using TwoPMaterialLaw = Dumux::EffToAbsLaw<EffMaterialLaw>; + using MaterialLaw = Dumux::TwoPAdapter<wPhaseIdx, TwoPMaterialLaw>; + using MaterialLawParams = MaterialLaw::Params; Scalar T = 273.15 + 25; diff --git a/test/material/ncpflash/test_ncpflash.cc b/test/material/ncpflash/test_ncpflash.cc index a4b718dae3..20dbca2a24 100644 --- a/test/material/ncpflash/test_ncpflash.cc +++ b/test/material/ncpflash/test_ncpflash.cc @@ -88,7 +88,7 @@ void checkNcpFlash(const FluidState &fsRef, { enum { numPhases = FluidSystem::numPhases }; enum { numComponents = FluidSystem::numComponents }; - typedef Dune::FieldVector<Scalar, numComponents> ComponentVector; + using ComponentVector = Dune::FieldVector<Scalar, numComponents>; // calculate the total amount of stuff in the reference fluid // phase @@ -101,7 +101,7 @@ void checkNcpFlash(const FluidState &fsRef, } // initialize the fluid state for the flash calculation - typedef Dumux::NcpFlash<Scalar, FluidSystem> NcpFlash; + using NcpFlash = Dumux::NcpFlash<Scalar, FluidSystem>; FluidState fsFlash; fsFlash.setTemperature(fsRef.temperature(/*phaseIdx=*/0)); @@ -123,8 +123,8 @@ void completeReferenceFluidState(FluidState &fs, { enum { numPhases = FluidSystem::numPhases }; - typedef Dumux::ComputeFromReferencePhase<Scalar, FluidSystem> ComputeFromReferencePhase; - typedef Dune::FieldVector<Scalar, numPhases> PhaseVector; + using ComputeFromReferencePhase = Dumux::ComputeFromReferencePhase<Scalar, FluidSystem>; + using PhaseVector = Dune::FieldVector<Scalar, numPhases>; int otherPhaseIdx = 1 - refPhaseIdx; @@ -151,9 +151,9 @@ void completeReferenceFluidState(FluidState &fs, int main() { - typedef double Scalar; - typedef Dumux::FluidSystems::H2ON2<Scalar, false> FluidSystem; - typedef Dumux::CompositionalFluidState<Scalar, FluidSystem> CompositionalFluidState; + using Scalar = double; + using FluidSystem = Dumux::FluidSystems::H2ON2<Scalar, false>; + using CompositionalFluidState = Dumux::CompositionalFluidState<Scalar, FluidSystem>; enum { numPhases = FluidSystem::numPhases }; enum { numComponents = FluidSystem::numComponents }; @@ -163,10 +163,10 @@ int main() enum { H2OIdx = FluidSystem::H2OIdx }; enum { N2Idx = FluidSystem::N2Idx }; - typedef Dumux::RegularizedBrooksCorey<Scalar> EffMaterialLaw; - typedef Dumux::EffToAbsLaw<EffMaterialLaw> TwoPMaterialLaw; - typedef Dumux::TwoPAdapter<wPhaseIdx, TwoPMaterialLaw> MaterialLaw; - typedef MaterialLaw::Params MaterialLawParams; + using EffMaterialLaw = Dumux::RegularizedBrooksCorey<Scalar>; + using TwoPMaterialLaw = Dumux::EffToAbsLaw<EffMaterialLaw>; + using MaterialLaw = Dumux::TwoPAdapter<wPhaseIdx, TwoPMaterialLaw>; + using MaterialLawParams = MaterialLaw::Params; Scalar T = 273.15 + 25; @@ -250,7 +250,7 @@ int main() fsRef.setPressure(nPhaseIdx, 1e6); FluidSystem::ParameterCache paramCache; - typedef Dumux::MiscibleMultiPhaseComposition<Scalar, FluidSystem> MiscibleMultiPhaseComposition; + using MiscibleMultiPhaseComposition = Dumux::MiscibleMultiPhaseComposition<Scalar, FluidSystem>; MiscibleMultiPhaseComposition::solve(fsRef, paramCache, /*setViscosity=*/false, /*setEnthalpy=*/false); @@ -276,14 +276,14 @@ int main() fsRef.setPressure(wPhaseIdx, 1e6); // calulate the capillary pressure - typedef Dune::FieldVector<Scalar, numPhases> PhaseVector; + using PhaseVector = Dune::FieldVector<Scalar, numPhases>; PhaseVector pc; MaterialLaw::capillaryPressures(pc, matParams2, fsRef); fsRef.setPressure(nPhaseIdx, fsRef.pressure(wPhaseIdx) + (pc[nPhaseIdx] - pc[wPhaseIdx])); - typedef Dumux::MiscibleMultiPhaseComposition<Scalar, FluidSystem> MiscibleMultiPhaseComposition; + using MiscibleMultiPhaseComposition = Dumux::MiscibleMultiPhaseComposition<Scalar, FluidSystem>; MiscibleMultiPhaseComposition::solve(fsRef, paramCache, /*setViscosity=*/false, /*setEnthalpy=*/false); diff --git a/test/material/pengrobinson/test_pengrobinson.cc b/test/material/pengrobinson/test_pengrobinson.cc index d00ba053cd..b3e28857fa 100644 --- a/test/material/pengrobinson/test_pengrobinson.cc +++ b/test/material/pengrobinson/test_pengrobinson.cc @@ -41,10 +41,10 @@ Scalar bringOilToSurface(FluidState &surfaceFluidState, Scalar alpha, const Flui numComponents = FluidSystem::numComponents }; - typedef Dumux::NcpFlash<Scalar, FluidSystem> Flash; - typedef Dumux::MpLinearMaterial<numPhases, Scalar> MaterialLaw; - typedef typename MaterialLaw::Params MaterialLawParams; - typedef Dune::FieldVector<Scalar, numComponents> ComponentVector; + using Flash = Dumux::NcpFlash<Scalar, FluidSystem>; + using MaterialLaw = Dumux::MpLinearMaterial<numPhases, Scalar>; + using MaterialLawParams = typename MaterialLaw::Params; + using ComponentVector = Dune::FieldVector<Scalar, numComponents>; const Scalar refPressure = 1.0135e5; // [Pa] @@ -121,8 +121,8 @@ Scalar bringOilToSurface(FluidState &surfaceFluidState, Scalar alpha, const Flui int main(int argc, char** argv) { - typedef double Scalar; - typedef Dumux::FluidSystems::Spe5<Scalar> FluidSystem; + using Scalar = double; + using FluidSystem = Dumux::FluidSystems::Spe5<Scalar>; enum { numPhases = FluidSystem::numPhases, @@ -140,14 +140,14 @@ int main(int argc, char** argv) C20Idx = FluidSystem::C20Idx }; - typedef Dumux::NcpFlash<Scalar, FluidSystem> Flash; - typedef Dune::FieldVector<Scalar, numComponents> ComponentVector; - typedef Dumux::CompositionalFluidState<Scalar, FluidSystem> FluidState; + using Flash = Dumux::NcpFlash<Scalar, FluidSystem>; + using ComponentVector = Dune::FieldVector<Scalar, numComponents>; + using FluidState = Dumux::CompositionalFluidState<Scalar, FluidSystem>; - typedef Dumux::MpLinearMaterial<numPhases, Scalar> MaterialLaw; - typedef MaterialLaw::Params MaterialLawParams; + using MaterialLaw = Dumux::MpLinearMaterial<numPhases, Scalar>; + using MaterialLawParams = MaterialLaw::Params; - typedef FluidSystem::ParameterCache ParameterCache; + using ParameterCache = FluidSystem::ParameterCache; //////////// // Initialize the fluid system and create the capillary pressure diff --git a/test/material/tabulation/test_tabulation.cc b/test/material/tabulation/test_tabulation.cc index 4fa6d19e93..18d3e6b9da 100644 --- a/test/material/tabulation/test_tabulation.cc +++ b/test/material/tabulation/test_tabulation.cc @@ -45,9 +45,9 @@ void isSame(const char *str, Scalar v, Scalar vRef, Scalar tol=1e-3) int main() { - typedef double Scalar; - typedef Dumux::H2O<Scalar> IapwsH2O; - typedef Dumux::TabulatedComponent<Scalar, IapwsH2O> TabulatedH2O; + using Scalar = double; + using IapwsH2O = Dumux::H2O<Scalar>; + using TabulatedH2O = Dumux::TabulatedComponent<Scalar, IapwsH2O>; Scalar tempMin = 274.15; Scalar tempMax = 622.15; diff --git a/test/mixeddimension/embedded/1p2c_richards2c/richardstestproblem.hh b/test/mixeddimension/embedded/1p2c_richards2c/richardstestproblem.hh index e7e7cdcaca..f07997fef8 100644 --- a/test/mixeddimension/embedded/1p2c_richards2c/richardstestproblem.hh +++ b/test/mixeddimension/embedded/1p2c_richards2c/richardstestproblem.hh @@ -104,8 +104,8 @@ SET_BOOL_PROP(RichardsTestProblem, UseMoles, true); * <tt>./test_cc1p -parameterFile test_cc1p.input</tt> * * The same parameter file can be also used for 3d simulation but you need to change line - * <tt>typedef Dune::SGrid<2,2> type;</tt> to - * <tt>typedef Dune::SGrid<3,3> type;</tt> in the problem file + * <tt>using type = Dune::SGrid<2, 2>;</tt> to + * <tt>using type = Dune::SGrid<3, 3>;</tt> in the problem file * and use <tt>1p_3d.dgf</tt> in the parameter file. */ template <class TypeTag> diff --git a/test/mixeddimension/embedded/1p2c_richards2c/schursolver.hh b/test/mixeddimension/embedded/1p2c_richards2c/schursolver.hh index e404154433..5bf3d797e2 100644 --- a/test/mixeddimension/embedded/1p2c_richards2c/schursolver.hh +++ b/test/mixeddimension/embedded/1p2c_richards2c/schursolver.hh @@ -49,10 +49,10 @@ class SchurComplement : public Dune::LinearOperator<X,Y> { public: // export types - // typedef DType matrix_type; - typedef X domain_type; - typedef Y range_type; - typedef typename X::field_type field_type; + // using matrix_type = DType; + using domain_type = X; + using range_type = Y; + using field_type = typename X::field_type; //! constructor: just store a reference to a matrix explicit SchurComplement (const AType& A, const BType& B, @@ -116,13 +116,13 @@ class SchurComplementPreconditioner : public Dune::Preconditioner<X, Y> { public: //! \brief The matrix type the preconditioner is for. - // typedef M matrix_type; + // using matrix_type = M; //! \brief The domain type of the preconditioner. - typedef X domain_type; + using domain_type = X; //! \brief The range type of the preconditioner. - typedef Y range_type; + using range_type = Y; //! \brief The field type of the preconditioner. - typedef typename X::field_type field_type; + using field_type = typename X::field_type; using BulkVector = typename GET_PROP(TypeTag, SolutionVector)::SolutionVectorBulk; using EmbeddedVector = typename GET_PROP(TypeTag, SolutionVector)::SolutionVectorLowDim; @@ -254,13 +254,13 @@ class BlockILU0Preconditioner : public Dune::Preconditioner<X, Y> { public: //! \brief The matrix type the preconditioner is for. - // typedef typename std::remove_const<M>::type matrix_type; + // using matrix_type = typename std::remove_const<M>::type; //! \brief The domain type of the preconditioner. - typedef X domain_type; + using domain_type = X; //! \brief The range type of the preconditioner. - typedef Y range_type; + using range_type = Y; //! \brief The field type of the preconditioner. - typedef typename X::field_type field_type; + using field_type = typename X::field_type; /*! \brief Constructor. diff --git a/test/mixeddimension/embedded/1p2c_richards2c/test_rosi2c.cc b/test/mixeddimension/embedded/1p2c_richards2c/test_rosi2c.cc index f0272d2a8d..f8671fc4cd 100644 --- a/test/mixeddimension/embedded/1p2c_richards2c/test_rosi2c.cc +++ b/test/mixeddimension/embedded/1p2c_richards2c/test_rosi2c.cc @@ -40,6 +40,6 @@ void usage(const char *progName, const std::string &errorMsg) int main(int argc, char** argv) { - typedef TTAG(RosiTestProblem) ProblemTypeTag; + using ProblemTypeTag = TTAG(RosiTestProblem); return Dumux::start<ProblemTypeTag>(argc, argv, usage); } diff --git a/test/mixeddimension/embedded/1p_1p/1d3dtestproblem.hh b/test/mixeddimension/embedded/1p_1p/1d3dtestproblem.hh index 752c4b21bd..d876be4bd8 100644 --- a/test/mixeddimension/embedded/1p_1p/1d3dtestproblem.hh +++ b/test/mixeddimension/embedded/1p_1p/1d3dtestproblem.hh @@ -153,7 +153,7 @@ public: continue; hMax = std::max(geometryDiameter(geometry), hMax); - typedef Dune::QuadratureRule<Scalar, GridView::dimension> Quad; + using Quad = Dune::QuadratureRule<Scalar, GridView::dimension>; const Quad &quad = Dune::QuadratureRules<Scalar, GridView::dimension>::rule(geometry.type(), order); for(auto&& qp : quad) { @@ -192,7 +192,7 @@ public: if (int(GridView::dimension) == 3 && excludeInnerBulk_ && std::sqrt(center[0]*center[0] + center[1]*center[1]) < GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, SpatialParams, Radius)) continue; - typedef Dune::QuadratureRule<Scalar, GridView::dimension> Quad; + using Quad = Dune::QuadratureRule<Scalar, GridView::dimension>; const Quad &quad = Dune::QuadratureRules<Scalar, GridView::dimension>::rule(geometry.type(), order); for(auto&& qp : quad) { diff --git a/test/mixeddimension/embedded/1p_1p/test_1p_1p.cc b/test/mixeddimension/embedded/1p_1p/test_1p_1p.cc index d9a1e2cdaa..0f377bc9e9 100644 --- a/test/mixeddimension/embedded/1p_1p/test_1p_1p.cc +++ b/test/mixeddimension/embedded/1p_1p/test_1p_1p.cc @@ -40,6 +40,6 @@ void usage(const char *progName, const std::string &errorMsg) int main(int argc, char** argv) { - typedef TTAG(TestOneDThreeDCCProblem) ProblemTypeTag; + using ProblemTypeTag = TTAG(TestOneDThreeDCCProblem); return Dumux::start<ProblemTypeTag>(argc, argv, usage); } diff --git a/test/mixeddimension/embedded/1p_richards/richardstestproblem.hh b/test/mixeddimension/embedded/1p_richards/richardstestproblem.hh index 3fa42f3195..c4c1685688 100644 --- a/test/mixeddimension/embedded/1p_richards/richardstestproblem.hh +++ b/test/mixeddimension/embedded/1p_richards/richardstestproblem.hh @@ -94,8 +94,8 @@ SET_STRING_PROP(RichardsTestProblem, GridParameterGroup, "SoilGrid"); * <tt>./test_cc1p -parameterFile test_cc1p.input</tt> * * The same parameter file can be also used for 3d simulation but you need to change line - * <tt>typedef Dune::SGrid<2,2> type;</tt> to - * <tt>typedef Dune::SGrid<3,3> type;</tt> in the problem file + * <tt>using type = Dune::SGrid<2, 2>;</tt> to + * <tt>using type = Dune::SGrid<3, 3>;</tt> in the problem file * and use <tt>1p_3d.dgf</tt> in the parameter file. */ template <class TypeTag> diff --git a/test/mixeddimension/embedded/1p_richards/test_rosi.cc b/test/mixeddimension/embedded/1p_richards/test_rosi.cc index 794c457437..c6afa3a50a 100644 --- a/test/mixeddimension/embedded/1p_richards/test_rosi.cc +++ b/test/mixeddimension/embedded/1p_richards/test_rosi.cc @@ -40,6 +40,6 @@ void usage(const char *progName, const std::string &errorMsg) int main(int argc, char** argv) { - typedef TTAG(RosiTestProblem) ProblemTypeTag; + using ProblemTypeTag = TTAG(RosiTestProblem); return Dumux::start<ProblemTypeTag>(argc, argv, usage); } diff --git a/test/mixeddimension/facet/1p2c_1p2c/test_fracture_1p2c_1p2c.cc b/test/mixeddimension/facet/1p2c_1p2c/test_fracture_1p2c_1p2c.cc index 40bba0e65f..2cb680427e 100644 --- a/test/mixeddimension/facet/1p2c_1p2c/test_fracture_1p2c_1p2c.cc +++ b/test/mixeddimension/facet/1p2c_1p2c/test_fracture_1p2c_1p2c.cc @@ -40,6 +40,6 @@ void usage(const char *progName, const std::string &errorMsg) int main(int argc, char** argv) { - typedef TTAG(OnePTwoCIFacetCoupling) ProblemTypeTag; + using ProblemTypeTag = TTAG(OnePTwoCIFacetCoupling); return Dumux::start<ProblemTypeTag>(argc, argv, usage); } diff --git a/test/mixeddimension/facet/1p2c_1p2c/test_fracture_1p2cni_1p2cni.cc b/test/mixeddimension/facet/1p2c_1p2c/test_fracture_1p2cni_1p2cni.cc index 4dac2687e9..26ca772642 100644 --- a/test/mixeddimension/facet/1p2c_1p2c/test_fracture_1p2cni_1p2cni.cc +++ b/test/mixeddimension/facet/1p2c_1p2c/test_fracture_1p2cni_1p2cni.cc @@ -40,6 +40,6 @@ void usage(const char *progName, const std::string &errorMsg) int main(int argc, char** argv) { - typedef TTAG(OnePTwoCNIFacetCoupling) ProblemTypeTag; + using ProblemTypeTag = TTAG(OnePTwoCNIFacetCoupling); return Dumux::start<ProblemTypeTag>(argc, argv, usage); } diff --git a/test/mixeddimension/facet/1p_1p/test_fracture_1p_1p.cc b/test/mixeddimension/facet/1p_1p/test_fracture_1p_1p.cc index 2aed429e42..23f7457e32 100644 --- a/test/mixeddimension/facet/1p_1p/test_fracture_1p_1p.cc +++ b/test/mixeddimension/facet/1p_1p/test_fracture_1p_1p.cc @@ -40,6 +40,6 @@ void usage(const char *progName, const std::string &errorMsg) int main(int argc, char** argv) { - typedef TTAG(OnePFacetCoupling) ProblemTypeTag; + using ProblemTypeTag = TTAG(OnePFacetCoupling); return Dumux::start<ProblemTypeTag>(argc, argv, usage); } diff --git a/test/porousmediumflow/1p/implicit/1ptestproblem.hh b/test/porousmediumflow/1p/implicit/1ptestproblem.hh index 632bcb93af..81c6a9aebf 100644 --- a/test/porousmediumflow/1p/implicit/1ptestproblem.hh +++ b/test/porousmediumflow/1p/implicit/1ptestproblem.hh @@ -85,8 +85,8 @@ SET_TYPE_PROP(OnePTestProblem, SpatialParams, OnePTestSpatialParams<TypeTag> ); * <tt>./test_cc1p -parameterFile test_cc1p.input</tt> * * The same parameter file can be also used for 3d simulation but you need to change line - * <tt>typedef Dune::YaspGrid<2> type;</tt> to - * <tt>typedef Dune::YaspGrid<3> type;</tt> in the problem file + * <tt>using type = Dune::YaspGrid<2>;</tt> to + * <tt>using type = Dune::YaspGrid<3>;</tt> in the problem file * and use <tt>test_1p_3d.dgf</tt> in the parameter file. */ template <class TypeTag> diff --git a/test/porousmediumflow/1p/sequential/resultevaluation.hh b/test/porousmediumflow/1p/sequential/resultevaluation.hh index e196f156bb..89db871152 100644 --- a/test/porousmediumflow/1p/sequential/resultevaluation.hh +++ b/test/porousmediumflow/1p/sequential/resultevaluation.hh @@ -71,12 +71,12 @@ public: void evaluate(const GridView& gridView, Problem& problem, bool consecutiveNumbering = false) { - typedef typename GridView::Grid Grid; - typedef typename Grid::ctype Scalar; + using Grid = typename GridView::Grid; + using Scalar = typename Grid::ctype; enum {dim=Grid::dimension}; - typedef typename Grid::template Codim<0>::Entity Element; - typedef typename Element::Geometry Geometry; - typedef typename Geometry::JacobianInverseTransposed JacobianInverseTransposed; + using Element = typename Grid::template Codim<0>::Entity; + using Geometry = typename Element::Geometry; + using JacobianInverseTransposed = typename Geometry::JacobianInverseTransposed; uMin = 1e100; uMax = -1e100; @@ -103,7 +103,7 @@ public: // element geometry const Geometry& geometry = element.geometry(); Dune::GeometryType geomType = geometry.type(); - typedef typename Dune::ReferenceElements<Scalar, dim> ReferenceElements; + using ReferenceElements = Dune::ReferenceElements<Scalar, dim>; const Dune::FieldVector<Scalar,dim>& local = ReferenceElements::general(geomType).position(0, 0); Dune::FieldVector<Scalar,dim> globalPos = geometry.global(local); diff --git a/test/porousmediumflow/1p/sequential/resultevaluation3d.hh b/test/porousmediumflow/1p/sequential/resultevaluation3d.hh index 9aef347870..1595aed2d7 100644 --- a/test/porousmediumflow/1p/sequential/resultevaluation3d.hh +++ b/test/porousmediumflow/1p/sequential/resultevaluation3d.hh @@ -82,18 +82,18 @@ public: void evaluate(const Grid& grid, ProblemType& problem, SolutionType& solution, bool pureNeumann = false) { - typedef typename Grid::Traits::template Codim<0>::Entity Entity; - typedef typename Entity::Geometry Geometry; - typedef typename Grid::LevelGridView GV; - typedef typename GV::IndexSet IS; - typedef Dune::MultipleCodimMultipleGeomTypeMapper<GV,Dune::MCMGElementLayout> ElementMapper; - typedef Dune::MultipleCodimMultipleGeomTypeMapper<GV,FaceLayout> FaceMapper; - typedef typename Grid::ctype ct; + using Entity = typename Grid::Traits::template Codim<0>::Entity; + using Geometry = typename Entity::Geometry; + using GV = typename Grid::LevelGridView; + using IS = typename GV::IndexSet; + using ElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GV, Dune::MCMGElementLayout>; + using FaceMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GV, FaceLayout>; + using ct = typename Grid::ctype; enum{dim = Grid::dimension}; - typedef typename Geometry::JacobianInverseTransposed JacobianInverseTransposed; - typedef typename Dune::ReferenceElements<ct, dim> ReferenceElements; + using JacobianInverseTransposed = typename Geometry::JacobianInverseTransposed; + using ReferenceElements = Dune::ReferenceElements<ct, dim>; const GV& gridview(grid.levelGridView(grid.maxLevel())); const IS& indexset(gridview.indexSet()); ElementMapper elementMapper(gridview); @@ -418,15 +418,15 @@ public: void evaluate(const GridView& gridView, Problem& problem, bool consecutiveNumbering = false) { - typedef typename GridView::Grid Grid; - typedef typename Grid::ctype Scalar; + using Grid = typename GridView::Grid; + using Scalar = typename Grid::ctype; enum {dim=Grid::dimension}; - typedef typename Grid::template Codim<0>::Entity Element; - typedef typename Element::Geometry Geometry; - typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGElementLayout> ElementMapper; - typedef Dune::BlockVector<Dune::FieldVector<Scalar, 1> > SolVector; - typedef typename Geometry::JacobianInverseTransposed JacobianInverseTransposed; - typedef typename Dune::ReferenceElements<Scalar, dim> ReferenceElements; + using Element = typename Grid::template Codim<0>::Entity; + using Geometry = typename Element::Geometry; + using ElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGElementLayout>; + using SolVector = Dune::BlockVector<Dune::FieldVector<Scalar, 1> >; + using JacobianInverseTransposed = typename Geometry::JacobianInverseTransposed; + using ReferenceElements = Dune::ReferenceElements<Scalar, dim>; ElementMapper elementMapper(gridView); SolVector exactSol(gridView.size(0)); @@ -704,14 +704,14 @@ public: void evaluateCP(const GridView& gridView, Problem& problem, const SolVector& solution, const VelVector& velocity, bool switchNormals = false) { - typedef typename GridView::Grid Grid; - typedef typename Grid::ctype Scalar; + using Grid = typename GridView::Grid; + using Scalar = typename Grid::ctype; enum {dim=Grid::dimension, maxIntersections = 12}; - typedef typename Grid::template Codim<0>::Entity Element; - typedef typename Element::Geometry Geometry; - typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGElementLayout> ElementMapper; - typedef typename Dune::ReferenceElements<Scalar, dim> ReferenceElements; - typedef typename Dune::ReferenceElements<Scalar, dim-1> ReferenceFaces; + using Element = typename Grid::template Codim<0>::Entity; + using Geometry = typename Element::Geometry; + using ElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGElementLayout>; + using ReferenceElements = Dune::ReferenceElements<Scalar, dim>; + using ReferenceFaces = Dune::ReferenceElements<Scalar, dim-1>; ElementMapper elementMapper(gridView); diff --git a/test/porousmediumflow/1p/sequential/test_1p.cc b/test/porousmediumflow/1p/sequential/test_1p.cc index 017e61e72e..944e06aedc 100644 --- a/test/porousmediumflow/1p/sequential/test_1p.cc +++ b/test/porousmediumflow/1p/sequential/test_1p.cc @@ -60,7 +60,7 @@ void usage(const char *progName, const std::string &errorMsg) //////////////////////// int main(int argc, char** argv) { - typedef TTAG(TestProblemOneP) ProblemTypeTag; + using ProblemTypeTag = TTAG(TestProblemOneP); return Dumux::start<ProblemTypeTag>(argc, argv, usage); } diff --git a/test/porousmediumflow/1p/sequential/test_1pproblem.hh b/test/porousmediumflow/1p/sequential/test_1pproblem.hh index b239f2e0bf..ce12305a1e 100644 --- a/test/porousmediumflow/1p/sequential/test_1pproblem.hh +++ b/test/porousmediumflow/1p/sequential/test_1pproblem.hh @@ -72,28 +72,28 @@ SET_TYPE_PROP(TestProblemOneP, Problem, TestProblemOneP<TypeTag>); template<class TypeTag> class TestProblemOneP: public DiffusionProblem1P<TypeTag > { - typedef DiffusionProblem1P<TypeTag> ParentType; - typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; + using ParentType = DiffusionProblem1P<TypeTag>; + using TimeManager = typename GET_PROP_TYPE(TypeTag, TimeManager); - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem)::Fluid Fluid; + using Fluid = typename GET_PROP_TYPE(TypeTag, FluidSystem)::Fluid; - typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables; - typedef typename GET_PROP_TYPE(TypeTag, BoundaryTypes) BoundaryTypes; + using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); + using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld }; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - typedef typename GridView::Traits::template Codim<0>::Entity Element; - typedef typename GridView::Intersection Intersection; - typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; - typedef Dune::FieldVector<Scalar, dim> LocalPosition; - typedef typename GET_PROP_TYPE(TypeTag, GridCreator) GridCreator; + using Element = typename GridView::Traits::template Codim<0>::Entity; + using Intersection = typename GridView::Intersection; + using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>; + using LocalPosition = Dune::FieldVector<Scalar, dim>; + using GridCreator = typename GET_PROP_TYPE(TypeTag, GridCreator); public: diff --git a/test/porousmediumflow/1p/sequential/test_1pspatialparams.hh b/test/porousmediumflow/1p/sequential/test_1pspatialparams.hh index 7a36811f02..0d13ca6bf3 100644 --- a/test/porousmediumflow/1p/sequential/test_1pspatialparams.hh +++ b/test/porousmediumflow/1p/sequential/test_1pspatialparams.hh @@ -36,19 +36,19 @@ namespace Dumux template<class TypeTag> class TestOnePSpatialParams: public SequentialFVSpatialParamsOneP<TypeTag> { - typedef SequentialFVSpatialParamsOneP<TypeTag> ParentType; - typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - typedef typename GridView::IndexSet IndexSet; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename Grid::ctype CoordScalar; + using ParentType = SequentialFVSpatialParamsOneP<TypeTag>; + using Grid = typename GET_PROP_TYPE(TypeTag, Grid); + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using IndexSet = typename GridView::IndexSet; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using CoordScalar = typename Grid::ctype; enum {dim=Grid::dimension, dimWorld=Grid::dimensionworld}; - typedef typename Grid::Traits::template Codim<0>::Entity Element; + using Element = typename Grid::Traits::template Codim<0>::Entity; - typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition; - typedef Dune::FieldMatrix<Scalar,dim,dim> FieldMatrix; + using GlobalPosition = Dune::FieldVector<CoordScalar, dimWorld>; + using FieldMatrix = Dune::FieldMatrix<Scalar, dim, dim>; public: diff --git a/test/porousmediumflow/1p/sequential/test_diffusion.cc b/test/porousmediumflow/1p/sequential/test_diffusion.cc index 27956cb54f..35364fe8b7 100644 --- a/test/porousmediumflow/1p/sequential/test_diffusion.cc +++ b/test/porousmediumflow/1p/sequential/test_diffusion.cc @@ -51,7 +51,7 @@ void usage(const char *progName, const std::string &errorMsg) int main(int argc, char** argv) { try { - typedef TTAG(FVVelocity2PTestProblem) TypeTag; + using TypeTag = TTAG(FVVelocity2PTestProblem); // initialize MPI, finalize is done automatically on exit Dune::MPIHelper::instance(argc, argv); @@ -74,7 +74,7 @@ int main(int argc, char** argv) Dune::Timer timer; bool consecutiveNumbering = true; - typedef GET_PROP_TYPE(TTAG(FVVelocity2PTestProblem), Problem) FVProblem; + using FVProblem = GET_PROP_TYPE(TTAG(FVVelocity2PTestProblem), Problem); FVProblem fvProblem(grid.leafGridView()); fvProblem.setName("fvdiffusion"); timer.reset(); @@ -85,7 +85,7 @@ int main(int argc, char** argv) Dumux::ResultEvaluation fvResult; fvResult.evaluate(grid.leafGridView(), fvProblem, consecutiveNumbering); - typedef GET_PROP_TYPE(TTAG(FVMPFAOVelocity2PTestProblem), Problem) MPFAOProblem; + using MPFAOProblem = GET_PROP_TYPE(TTAG(FVMPFAOVelocity2PTestProblem), Problem); MPFAOProblem mpfaProblem(grid.leafGridView()); mpfaProblem.setName("fvmpfaodiffusion"); timer.reset(); @@ -95,7 +95,7 @@ int main(int argc, char** argv) Dumux::ResultEvaluation mpfaResult; mpfaResult.evaluate(grid.leafGridView(), mpfaProblem, consecutiveNumbering); - typedef GET_PROP_TYPE(TTAG(MimeticPressure2PTestProblem), Problem) MimeticProblem; + using MimeticProblem = GET_PROP_TYPE(TTAG(MimeticPressure2PTestProblem), Problem); MimeticProblem mimeticProblem(grid.leafGridView()); mimeticProblem.setName("mimeticdiffusion"); timer.reset(); diff --git a/test/porousmediumflow/1p/sequential/test_diffusionproblem.hh b/test/porousmediumflow/1p/sequential/test_diffusionproblem.hh index ce58140c44..e796916345 100644 --- a/test/porousmediumflow/1p/sequential/test_diffusionproblem.hh +++ b/test/porousmediumflow/1p/sequential/test_diffusionproblem.hh @@ -149,14 +149,14 @@ SET_PROP(MimeticPressure2PTestProblem, FluidSystem) template<class TypeTag> class TestDiffusionProblem: public DiffusionProblem2P<TypeTag> { - typedef DiffusionProblem2P<TypeTag> ParentType; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; + using ParentType = DiffusionProblem2P<TypeTag>; + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; + using Indices = typename GET_PROP_TYPE(TypeTag, Indices); using WettingPhase = typename GET_PROP(TypeTag, FluidSystem)::WettingPhase; - typedef typename GET_PROP_TYPE(TypeTag, BoundaryTypes) BoundaryTypes; + using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); enum { @@ -170,16 +170,16 @@ class TestDiffusionProblem: public DiffusionProblem2P<TypeTag> swIdx = Indices::swIdx }; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - typedef typename GridView::Traits::template Codim<0>::Entity Element; - typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; - typedef Dune::FieldVector<Scalar, dim> LocalPosition; + using Element = typename GridView::Traits::template Codim<0>::Entity; + using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>; + using LocalPosition = Dune::FieldVector<Scalar, dim>; public: - typedef typename GET_PROP(TypeTag, SolutionTypes) SolutionTypes; - typedef typename SolutionTypes::PrimaryVariables PrimaryVariables; - typedef typename SolutionTypes::ScalarSolution ScalarSolution; + using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using PrimaryVariables = typename SolutionTypes::PrimaryVariables; + using ScalarSolution = typename SolutionTypes::ScalarSolution; TestDiffusionProblem(const GridView &gridView) : ParentType(gridView), velocity_(*this) diff --git a/test/porousmediumflow/1p/sequential/test_diffusionproblem3d.hh b/test/porousmediumflow/1p/sequential/test_diffusionproblem3d.hh index 19ec42c74c..b1e275aaf2 100644 --- a/test/porousmediumflow/1p/sequential/test_diffusionproblem3d.hh +++ b/test/porousmediumflow/1p/sequential/test_diffusionproblem3d.hh @@ -96,15 +96,15 @@ NEW_TYPE_TAG(MimeticTestProblem, INHERITS_FROM(MimeticPressureTwoP, DiffusionTes template<class TypeTag> class TestDiffusion3DProblem: public DiffusionProblem2P<TypeTag> { - typedef DiffusionProblem2P<TypeTag> ParentType; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; + using ParentType = DiffusionProblem2P<TypeTag>; + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; + using Indices = typename GET_PROP_TYPE(TypeTag, Indices); - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; - typedef typename GET_PROP_TYPE(TypeTag, FluidState) FluidState; + using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); + using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); - typedef typename GET_PROP_TYPE(TypeTag, BoundaryTypes) BoundaryTypes; + using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); enum { @@ -120,16 +120,16 @@ class TestDiffusion3DProblem: public DiffusionProblem2P<TypeTag> pressureEqIdx = Indices::pressureEqIdx, }; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - typedef typename GridView::Traits::template Codim<0>::Entity Element; - typedef typename GridView::Intersection Intersection; - typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; + using Element = typename GridView::Traits::template Codim<0>::Entity; + using Intersection = typename GridView::Intersection; + using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>; public: - typedef typename GET_PROP(TypeTag, SolutionTypes) SolutionTypes; - typedef typename SolutionTypes::PrimaryVariables PrimaryVariables; - typedef typename SolutionTypes::ScalarSolution ScalarSolution; + using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using PrimaryVariables = typename SolutionTypes::PrimaryVariables; + using ScalarSolution = typename SolutionTypes::ScalarSolution; TestDiffusion3DProblem(const GridView &gridView) : ParentType(gridView), velocity_(*this) diff --git a/test/porousmediumflow/1p/sequential/test_diffusionspatialparams.hh b/test/porousmediumflow/1p/sequential/test_diffusionspatialparams.hh index a0e4d4d6f3..988c67e18d 100644 --- a/test/porousmediumflow/1p/sequential/test_diffusionspatialparams.hh +++ b/test/porousmediumflow/1p/sequential/test_diffusionspatialparams.hh @@ -48,10 +48,10 @@ SET_TYPE_PROP(TestDiffusionSpatialParams, SpatialParams, TestDiffusionSpatialPar SET_PROP(TestDiffusionSpatialParams, MaterialLaw) { private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef LinearMaterial<Scalar> RawMaterialLaw; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using RawMaterialLaw = LinearMaterial<Scalar>; public: - typedef EffToAbsLaw<RawMaterialLaw> type; + using type = EffToAbsLaw<RawMaterialLaw>; }; } @@ -62,25 +62,25 @@ public: template<class TypeTag> class TestDiffusionSpatialParams: public SequentialFVSpatialParams<TypeTag> { - typedef SequentialFVSpatialParams<TypeTag> ParentType; - typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - typedef typename GridView::IndexSet IndexSet; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename Grid::ctype CoordScalar; + using ParentType = SequentialFVSpatialParams<TypeTag>; + using Grid = typename GET_PROP_TYPE(TypeTag, Grid); + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using IndexSet = typename GridView::IndexSet; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using CoordScalar = typename Grid::ctype; ///@cond false - typedef typename GET_PROP(TypeTag, SolutionTypes)::ScalarSolution ScalarSolution; + using ScalarSolution = typename GET_PROP(TypeTag, SolutionTypes)::ScalarSolution; ///@endcond enum {dim=Grid::dimension, dimWorld=Grid::dimensionworld}; - typedef typename Grid::Traits::template Codim<0>::Entity Element; + using Element = typename Grid::Traits::template Codim<0>::Entity; - typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition; - typedef Dune::FieldMatrix<Scalar,dim,dim> FieldMatrix; + using GlobalPosition = Dune::FieldVector<CoordScalar, dimWorld>; + using FieldMatrix = Dune::FieldMatrix<Scalar, dim, dim>; public: - typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw; - typedef typename MaterialLaw::Params MaterialLawParams; + using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw); + using MaterialLawParams = typename MaterialLaw::Params; const FieldMatrix& intrinsicPermeability (const Element& element) const { diff --git a/test/porousmediumflow/1p/sequential/test_diffusionspatialparams3d.hh b/test/porousmediumflow/1p/sequential/test_diffusionspatialparams3d.hh index c628a9f1c0..860ae3384a 100644 --- a/test/porousmediumflow/1p/sequential/test_diffusionspatialparams3d.hh +++ b/test/porousmediumflow/1p/sequential/test_diffusionspatialparams3d.hh @@ -47,10 +47,10 @@ SET_TYPE_PROP(TestDiffusionSpatialParams3d, SpatialParams, TestDiffusionSpatialP SET_PROP(TestDiffusionSpatialParams3d, MaterialLaw) { private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef LinearMaterial<Scalar> RawMaterialLaw; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using RawMaterialLaw = LinearMaterial<Scalar>; public: - typedef EffToAbsLaw<RawMaterialLaw> type; + using type = EffToAbsLaw<RawMaterialLaw>; }; } @@ -61,22 +61,22 @@ public: template<class TypeTag> class TestDiffusionSpatialParams3d: public SequentialFVSpatialParams<TypeTag> { - typedef SequentialFVSpatialParams<TypeTag> ParentType; - 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 Grid::ctype CoordScalar; + using ParentType = SequentialFVSpatialParams<TypeTag>; + using Grid = typename GET_PROP_TYPE(TypeTag, Grid); + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using CoordScalar = typename Grid::ctype; enum {dim=Grid::dimension, dimWorld=Grid::dimensionworld, numEq=1}; - typedef typename Grid::Traits::template Codim<0>::Entity Element; + using Element = typename Grid::Traits::template Codim<0>::Entity; - typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition; - typedef Dune::FieldMatrix<Scalar,dim,dim> FieldMatrix; + using GlobalPosition = Dune::FieldVector<CoordScalar, dimWorld>; + using FieldMatrix = Dune::FieldMatrix<Scalar, dim, dim>; public: - typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw; - typedef typename MaterialLaw::Params MaterialLawParams; + using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw); + using MaterialLawParams = typename MaterialLaw::Params; const FieldMatrix& intrinsicPermeabilityAtPos (const GlobalPosition& globalPos) const { diff --git a/test/porousmediumflow/1pncmin/implicit/test_box1pncmin.cc b/test/porousmediumflow/1pncmin/implicit/test_box1pncmin.cc index fc844ca2b9..834140b1f6 100644 --- a/test/porousmediumflow/1pncmin/implicit/test_box1pncmin.cc +++ b/test/porousmediumflow/1pncmin/implicit/test_box1pncmin.cc @@ -50,6 +50,6 @@ void usage(const char *progName, const std::string &errorMsg) int main(int argc, char** argv) { - typedef TTAG(ThermoChemBoxProblem) ProblemTypeTag; + using ProblemTypeTag = TTAG(ThermoChemBoxProblem); return Dumux::start<ProblemTypeTag>(argc, argv, usage); } diff --git a/test/porousmediumflow/1pncmin/implicit/test_cc1pncmin.cc b/test/porousmediumflow/1pncmin/implicit/test_cc1pncmin.cc index 953a59ddf4..ce0ef2af1b 100644 --- a/test/porousmediumflow/1pncmin/implicit/test_cc1pncmin.cc +++ b/test/porousmediumflow/1pncmin/implicit/test_cc1pncmin.cc @@ -50,6 +50,6 @@ void usage(const char *progName, const std::string &errorMsg) int main(int argc, char** argv) { - typedef TTAG(ThermoChemCCProblem) ProblemTypeTag; + using ProblemTypeTag = TTAG(ThermoChemCCProblem); return Dumux::start<ProblemTypeTag>(argc, argv, usage); } diff --git a/test/porousmediumflow/2p/sequential/buckleyleverettanalyticsolution.hh b/test/porousmediumflow/2p/sequential/buckleyleverettanalyticsolution.hh index e25451dd4d..3fc390793c 100644 --- a/test/porousmediumflow/2p/sequential/buckleyleverettanalyticsolution.hh +++ b/test/porousmediumflow/2p/sequential/buckleyleverettanalyticsolution.hh @@ -64,18 +64,18 @@ struct CheckMaterialLaw<Scalar, EffToAbsLaw< LinearMaterial<Scalar> > > template<class TypeTag> class BuckleyLeverettAnalytic { - typedef typename GET_PROP_TYPE(TypeTag, Problem) Problem; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; + using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - typedef typename GET_PROP_TYPE(TypeTag, SpatialParams) SpatialParams; - typedef typename SpatialParams::MaterialLaw MaterialLaw; - typedef typename MaterialLaw::Params MaterialLawParams; + using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + using MaterialLaw = typename SpatialParams::MaterialLaw; + using MaterialLawParams = typename MaterialLaw::Params; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; - typedef typename GET_PROP_TYPE(TypeTag, FluidState) FluidState; + using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); + using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); - typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; + using Indices = typename GET_PROP_TYPE(TypeTag, Indices); enum { @@ -87,8 +87,8 @@ template<class TypeTag> class BuckleyLeverettAnalytic nPhaseIdx = Indices::nPhaseIdx }; - typedef Dune::BlockVector<Dune::FieldVector<Scalar, 1> > BlockVector; - typedef Dune::FieldVector<Scalar, dimworld> GlobalPosition; + using BlockVector = Dune::BlockVector<Dune::FieldVector<Scalar, 1> >; + using GlobalPosition = Dune::FieldVector<Scalar, dimworld>; private: diff --git a/test/porousmediumflow/2p/sequential/mcwhorteranalyticsolution.hh b/test/porousmediumflow/2p/sequential/mcwhorteranalyticsolution.hh index 2a3f277e7d..63649ca7bc 100644 --- a/test/porousmediumflow/2p/sequential/mcwhorteranalyticsolution.hh +++ b/test/porousmediumflow/2p/sequential/mcwhorteranalyticsolution.hh @@ -42,21 +42,21 @@ namespace Dumux template<typename TypeTag> class McWhorterAnalytic { - typedef typename GET_PROP_TYPE(TypeTag, Problem) Problem; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; + using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - typedef typename GET_PROP_TYPE(TypeTag, SpatialParams) SpatialParams; - typedef typename SpatialParams::MaterialLaw MaterialLaw; - typedef typename MaterialLaw::Params MaterialLawParams; + using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + using MaterialLaw = typename SpatialParams::MaterialLaw; + using MaterialLawParams = typename MaterialLaw::Params; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; - typedef typename GET_PROP_TYPE(TypeTag, FluidState) FluidState; + using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); + using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); - typedef typename GET_PROP(TypeTag, SolutionTypes) SolutionTypes; - typedef typename SolutionTypes::PrimaryVariables PrimaryVariables; + using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using PrimaryVariables = typename SolutionTypes::PrimaryVariables; - typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; + using Indices = typename GET_PROP_TYPE(TypeTag, Indices); enum { @@ -69,8 +69,8 @@ class McWhorterAnalytic saturationIdx = Indices::saturationIdx }; - typedef Dune::BlockVector<Dune::FieldVector<Scalar, 1> > BlockVector; - typedef Dune::FieldVector<Scalar, dimworld> GlobalPosition; + using BlockVector = Dune::BlockVector<Dune::FieldVector<Scalar, 1> >; + using GlobalPosition = Dune::FieldVector<Scalar, dimworld>; private: diff --git a/test/porousmediumflow/2p/sequential/test_3d2pproblem.hh b/test/porousmediumflow/2p/sequential/test_3d2pproblem.hh index 43c613cd85..e94242e6c8 100644 --- a/test/porousmediumflow/2p/sequential/test_3d2pproblem.hh +++ b/test/porousmediumflow/2p/sequential/test_3d2pproblem.hh @@ -81,11 +81,11 @@ SET_INT_PROP(ThreeDTwoPTestProblem, Formulation, SequentialTwoPCommonIndices::pn SET_PROP(ThreeDTwoPTestProblem, SpatialParams) { private: - typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; + using Grid = typename GET_PROP_TYPE(TypeTag, Grid); + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); public: - typedef Test3d2pSpatialParams<TypeTag> type; + using type = Test3d2pSpatialParams<TypeTag>; }; #if PROBLEM == 1 @@ -119,19 +119,19 @@ NEW_TYPE_TAG(MimeticAdaptiveTwoPTestProblem, INHERITS_FROM(MimeticPressureTwoPAd template<class TypeTag> class Test3D2PProblem: public IMPESProblem2P<TypeTag> { -typedef Test3D2PProblem<TypeTag> ThisType; -typedef IMPESProblem2P<TypeTag> ParentType; -typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; +using ThisType = Test3D2PProblem<TypeTag>; +using ParentType = IMPESProblem2P<TypeTag>; +using GridView = typename GET_PROP_TYPE(TypeTag, GridView); -typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; +using Indices = typename GET_PROP_TYPE(TypeTag, Indices); -typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; -typedef typename GET_PROP_TYPE(TypeTag, FluidState) FluidState; +using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); +using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); -typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; +using TimeManager = typename GET_PROP_TYPE(TypeTag, TimeManager); -typedef typename GET_PROP_TYPE(TypeTag, BoundaryTypes) BoundaryTypes; -typedef typename GET_PROP(TypeTag, SolutionTypes)::PrimaryVariables PrimaryVariables; +using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); +using PrimaryVariables = typename GET_PROP(TypeTag, SolutionTypes)::PrimaryVariables; enum { @@ -152,14 +152,14 @@ enum satEqIdx = Indices::satEqIdx }; -typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; +using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); -typedef typename GridView::Traits::template Codim<0>::Entity Element; -typedef typename GridView::Intersection Intersection; -typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; -typedef Dune::FieldVector<Scalar, dim> LocalPosition; +using Element = typename GridView::Traits::template Codim<0>::Entity; +using Intersection = typename GridView::Intersection; +using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>; +using LocalPosition = Dune::FieldVector<Scalar, dim>; -typedef typename GET_PROP_TYPE(TypeTag, GridCreator) GridCreator; +using GridCreator = typename GET_PROP_TYPE(TypeTag, GridCreator); public: diff --git a/test/porousmediumflow/2p/sequential/test_3d2pspatialparams.hh b/test/porousmediumflow/2p/sequential/test_3d2pspatialparams.hh index ac27897cca..d6bb15f2e8 100644 --- a/test/porousmediumflow/2p/sequential/test_3d2pspatialparams.hh +++ b/test/porousmediumflow/2p/sequential/test_3d2pspatialparams.hh @@ -47,11 +47,11 @@ SET_TYPE_PROP(Test3d2pSpatialParams, SpatialParams, Test3d2pSpatialParams<TypeTa SET_PROP(Test3d2pSpatialParams, MaterialLaw) { private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef RegularizedBrooksCorey<Scalar> RawMaterialLaw; -// typedef LinearMaterial<Scalar> RawMaterialLaw; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using RawMaterialLaw = RegularizedBrooksCorey<Scalar>; +// using RawMaterialLaw = LinearMaterial<Scalar>; public: - typedef EffToAbsLaw<RawMaterialLaw> type; + using type = EffToAbsLaw<RawMaterialLaw>; }; } @@ -63,23 +63,23 @@ public: template<class TypeTag> class Test3d2pSpatialParams: public SequentialFVSpatialParams<TypeTag> { - typedef SequentialFVSpatialParams<TypeTag> ParentType; - 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 Grid::ctype CoordScalar; + using ParentType = SequentialFVSpatialParams<TypeTag>; + using Grid = typename GET_PROP_TYPE(TypeTag, Grid); + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using CoordScalar = typename Grid::ctype; enum {dim=Grid::dimension, dimWorld=Grid::dimensionworld, numEq=1}; - typedef typename Grid::Traits::template Codim<0>::Entity Element; + using Element = typename Grid::Traits::template Codim<0>::Entity; - typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition; - typedef Dune::FieldVector<CoordScalar, dim> LocalPosition; - typedef Dune::FieldMatrix<Scalar,dim,dim> FieldMatrix; + using GlobalPosition = Dune::FieldVector<CoordScalar, dimWorld>; + using LocalPosition = Dune::FieldVector<CoordScalar, dim>; + using FieldMatrix = Dune::FieldMatrix<Scalar, dim, dim>; public: - typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw; - typedef typename MaterialLaw::Params MaterialLawParams; + using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw); + using MaterialLawParams = typename MaterialLaw::Params; void update (Scalar saturationW, const Element& element) { diff --git a/test/porousmediumflow/2p/sequential/test_impes.cc b/test/porousmediumflow/2p/sequential/test_impes.cc index 35f67d1e99..43bbdb1ed5 100644 --- a/test/porousmediumflow/2p/sequential/test_impes.cc +++ b/test/porousmediumflow/2p/sequential/test_impes.cc @@ -58,6 +58,6 @@ void usage(const char *progName, const std::string &errorMsg) //////////////////////// int main(int argc, char** argv) { - typedef TTAG(IMPESTestProblem) ProblemTypeTag; + using ProblemTypeTag = TTAG(IMPESTestProblem); return Dumux::start<ProblemTypeTag>(argc, argv, usage); } diff --git a/test/porousmediumflow/2p/sequential/test_impesadaptive.cc b/test/porousmediumflow/2p/sequential/test_impesadaptive.cc index 83be9e1584..f8c1f03d89 100644 --- a/test/porousmediumflow/2p/sequential/test_impesadaptive.cc +++ b/test/porousmediumflow/2p/sequential/test_impesadaptive.cc @@ -53,7 +53,7 @@ void usage(const char *progName, const std::string &errorMsg) int main(int argc, char** argv) { - typedef TTAG(TestIMPESAdaptiveProblem) ProblemTypeTag; + using ProblemTypeTag = TTAG(TestIMPESAdaptiveProblem); return Dumux::start<ProblemTypeTag>(argc, argv, usage); } #else diff --git a/test/porousmediumflow/2p/sequential/test_impesadaptiveproblem.hh b/test/porousmediumflow/2p/sequential/test_impesadaptiveproblem.hh index 28b3ccd084..d2b2db86de 100644 --- a/test/porousmediumflow/2p/sequential/test_impesadaptiveproblem.hh +++ b/test/porousmediumflow/2p/sequential/test_impesadaptiveproblem.hh @@ -92,15 +92,15 @@ SET_SCALAR_PROP(TestIMPESAdaptiveProblem, ImpetCFLFactor, 0.95); template<class TypeTag> class TestIMPESAdaptiveProblem: public IMPESProblem2P<TypeTag> { - typedef IMPESProblem2P<TypeTag> ParentType; - typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; + using ParentType = IMPESProblem2P<TypeTag>; + using Grid = typename GET_PROP_TYPE(TypeTag, Grid); + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; + using Indices = typename GET_PROP_TYPE(TypeTag, Indices); using WettingPhase = typename GET_PROP(TypeTag, FluidSystem)::WettingPhase; - typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; + using TimeManager = typename GET_PROP_TYPE(TypeTag, TimeManager); enum { @@ -116,15 +116,15 @@ class TestIMPESAdaptiveProblem: public IMPESProblem2P<TypeTag> eqIdxSat = Indices::satEqIdx }; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - typedef typename GridView::Traits::template Codim<0>::Entity Element; - typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; + using Element = typename GridView::Traits::template Codim<0>::Entity; + using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>; - typedef typename GET_PROP_TYPE(TypeTag, BoundaryTypes) BoundaryTypes; - typedef typename GET_PROP(TypeTag, SolutionTypes) SolutionTypes; - typedef typename SolutionTypes::PrimaryVariables PrimaryVariables; - typedef typename GET_PROP_TYPE(TypeTag, GridCreator) GridCreator; + using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); + using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using PrimaryVariables = typename SolutionTypes::PrimaryVariables; + using GridCreator = typename GET_PROP_TYPE(TypeTag, GridCreator); public: TestIMPESAdaptiveProblem(TimeManager &timeManager, const GridView &gridView) : diff --git a/test/porousmediumflow/2p/sequential/test_impesadaptiverestart.cc b/test/porousmediumflow/2p/sequential/test_impesadaptiverestart.cc index 0cddd5bc88..cfc7600c05 100644 --- a/test/porousmediumflow/2p/sequential/test_impesadaptiverestart.cc +++ b/test/porousmediumflow/2p/sequential/test_impesadaptiverestart.cc @@ -51,7 +51,7 @@ void usage(const char *progName, const std::string &errorMsg) int main(int argc, char** argv) { - typedef TTAG(TestIMPESAdaptiveRestartProblem) ProblemTypeTag; + using ProblemTypeTag = TTAG(TestIMPESAdaptiveRestartProblem); return Dumux::start<ProblemTypeTag>(argc, argv, usage); } #else diff --git a/test/porousmediumflow/2p/sequential/test_impesadaptivespatialparams.hh b/test/porousmediumflow/2p/sequential/test_impesadaptivespatialparams.hh index 66ef114781..b379565131 100644 --- a/test/porousmediumflow/2p/sequential/test_impesadaptivespatialparams.hh +++ b/test/porousmediumflow/2p/sequential/test_impesadaptivespatialparams.hh @@ -48,10 +48,10 @@ SET_TYPE_PROP(TestIMPESAdaptiveSpatialParams, SpatialParams, TestIMPESAdaptiveSp SET_PROP(TestIMPESAdaptiveSpatialParams, MaterialLaw) { private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef RegularizedBrooksCorey<Scalar> RawMaterialLaw; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using RawMaterialLaw = RegularizedBrooksCorey<Scalar>; public: - typedef EffToAbsLaw<RawMaterialLaw> type; + using type = EffToAbsLaw<RawMaterialLaw>; }; } @@ -63,21 +63,21 @@ public: template<class TypeTag> class TestIMPESAdaptiveSpatialParams: public SequentialFVSpatialParams<TypeTag> { - 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 SequentialFVSpatialParams<TypeTag> ParentType; - typedef typename Grid::ctype CoordScalar; + using Grid = typename GET_PROP_TYPE(TypeTag, Grid); + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using ParentType = SequentialFVSpatialParams<TypeTag>; + using CoordScalar = typename Grid::ctype; enum {dimWorld=Grid::dimensionworld}; - typedef typename Grid::Traits::template Codim<0>::Entity Element; + using Element = typename Grid::Traits::template Codim<0>::Entity; - typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition; + using GlobalPosition = Dune::FieldVector<CoordScalar, dimWorld>; public: - typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw; - typedef typename MaterialLaw::Params MaterialLawParams; + using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw); + using MaterialLawParams = typename MaterialLaw::Params; Scalar intrinsicPermeability (const Element& element) const diff --git a/test/porousmediumflow/2p/sequential/test_impesproblem.hh b/test/porousmediumflow/2p/sequential/test_impesproblem.hh index 6a81e75d49..fb0090aa54 100644 --- a/test/porousmediumflow/2p/sequential/test_impesproblem.hh +++ b/test/porousmediumflow/2p/sequential/test_impesproblem.hh @@ -120,14 +120,14 @@ SET_TYPE_PROP(IMPESTestProblemWithAMG, GridCreator, GridCreator<TypeTag>); template<class TypeTag> class IMPESTestProblem: public IMPESProblem2P<TypeTag> { -typedef IMPESProblem2P<TypeTag> ParentType; -typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; +using ParentType = IMPESProblem2P<TypeTag>; +using GridView = typename GET_PROP_TYPE(TypeTag, GridView); -typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; +using Indices = typename GET_PROP_TYPE(TypeTag, Indices); using WettingPhase = typename GET_PROP(TypeTag, FluidSystem)::WettingPhase; -typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; +using TimeManager = typename GET_PROP_TYPE(TypeTag, TimeManager); enum { @@ -143,14 +143,14 @@ enum eqIdxSat = Indices::satEqIdx }; -typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; +using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); -typedef typename GridView::Traits::template Codim<0>::Entity Element; -typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; +using Element = typename GridView::Traits::template Codim<0>::Entity; +using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>; -typedef typename GET_PROP_TYPE(TypeTag, BoundaryTypes) BoundaryTypes; -typedef typename GET_PROP(TypeTag, SolutionTypes) SolutionTypes; - typedef typename SolutionTypes::PrimaryVariables PrimaryVariables; +using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); +using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using PrimaryVariables = typename SolutionTypes::PrimaryVariables; public: IMPESTestProblem(TimeManager &timeManager, const GridView &gridView) : diff --git a/test/porousmediumflow/2p/sequential/test_impesspatialparams.hh b/test/porousmediumflow/2p/sequential/test_impesspatialparams.hh index a4f025a789..3ad979fcb0 100644 --- a/test/porousmediumflow/2p/sequential/test_impesspatialparams.hh +++ b/test/porousmediumflow/2p/sequential/test_impesspatialparams.hh @@ -48,10 +48,10 @@ SET_TYPE_PROP(TestIMPESSpatialParams, SpatialParams, TestIMPESSpatialParams<Type SET_PROP(TestIMPESSpatialParams, MaterialLaw) { private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef RegularizedBrooksCorey<Scalar> RawMaterialLaw; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using RawMaterialLaw = RegularizedBrooksCorey<Scalar>; public: - typedef EffToAbsLaw<RawMaterialLaw> type; + using type = EffToAbsLaw<RawMaterialLaw>; }; } @@ -63,21 +63,21 @@ public: template<class TypeTag> class TestIMPESSpatialParams: public SequentialFVSpatialParams<TypeTag> { - 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 SequentialFVSpatialParams<TypeTag> ParentType; - typedef typename Grid::ctype CoordScalar; + using Grid = typename GET_PROP_TYPE(TypeTag, Grid); + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using ParentType = SequentialFVSpatialParams<TypeTag>; + using CoordScalar = typename Grid::ctype; enum {dimWorld=Grid::dimensionworld}; - typedef typename Grid::Traits::template Codim<0>::Entity Element; + using Element = typename Grid::Traits::template Codim<0>::Entity; - typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition; + using GlobalPosition = Dune::FieldVector<CoordScalar, dimWorld>; public: - typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw; - typedef typename MaterialLaw::Params MaterialLawParams; + using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw); + using MaterialLawParams = typename MaterialLaw::Params; Scalar intrinsicPermeability (const Element& element) const diff --git a/test/porousmediumflow/2p/sequential/test_impeswithamg.cc b/test/porousmediumflow/2p/sequential/test_impeswithamg.cc index 46df28730b..ddbfa1a512 100644 --- a/test/porousmediumflow/2p/sequential/test_impeswithamg.cc +++ b/test/porousmediumflow/2p/sequential/test_impeswithamg.cc @@ -59,6 +59,6 @@ void usage(const char *progName, const std::string &errorMsg) //////////////////////// int main(int argc, char** argv) { - typedef TTAG(IMPESTestProblemWithAMG) ProblemTypeTag; + using ProblemTypeTag = TTAG(IMPESTestProblemWithAMG); return Dumux::start<ProblemTypeTag>(argc, argv, usage); } diff --git a/test/porousmediumflow/2p/sequential/test_mpfa2pproblem.hh b/test/porousmediumflow/2p/sequential/test_mpfa2pproblem.hh index 3566b3b7d4..5827d8b910 100644 --- a/test/porousmediumflow/2p/sequential/test_mpfa2pproblem.hh +++ b/test/porousmediumflow/2p/sequential/test_mpfa2pproblem.hh @@ -125,20 +125,20 @@ NEW_TYPE_TAG(MPFALAdaptiveTwoPTestProblem, INHERITS_FROM(FvMpfaL2dPressureTwoPAd template<class TypeTag> class MPFATwoPTestProblem: public IMPESProblem2P<TypeTag> { -typedef IMPESProblem2P<TypeTag> ParentType; -typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; +using ParentType = IMPESProblem2P<TypeTag>; +using GridView = typename GET_PROP_TYPE(TypeTag, GridView); -typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; +using Indices = typename GET_PROP_TYPE(TypeTag, Indices); using WettingPhase = typename GET_PROP(TypeTag, FluidSystem)::WettingPhase; -typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; +using TimeManager = typename GET_PROP_TYPE(TypeTag, TimeManager); -typedef typename GET_PROP_TYPE(TypeTag, BoundaryTypes) BoundaryTypes; -typedef typename GET_PROP(TypeTag, SolutionTypes) SolutionTypes; -typedef typename SolutionTypes::PrimaryVariables PrimaryVariables; +using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); +using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); +using PrimaryVariables = typename SolutionTypes::PrimaryVariables; -typedef typename GET_PROP_TYPE(TypeTag, GridCreator) GridCreator; +using GridCreator = typename GET_PROP_TYPE(TypeTag, GridCreator); enum { @@ -158,10 +158,10 @@ enum eqIdxSat = Indices::satEqIdx }; -typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; +using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); -typedef typename GridView::Traits::template Codim<0>::Entity Element; -typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; +using Element = typename GridView::Traits::template Codim<0>::Entity; +using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>; public: MPFATwoPTestProblem(TimeManager &timeManager,const GridView &gridView) : diff --git a/test/porousmediumflow/2p/sequential/test_mpfa2pspatialparams.hh b/test/porousmediumflow/2p/sequential/test_mpfa2pspatialparams.hh index 223a76eb67..66a52132db 100644 --- a/test/porousmediumflow/2p/sequential/test_mpfa2pspatialparams.hh +++ b/test/porousmediumflow/2p/sequential/test_mpfa2pspatialparams.hh @@ -46,10 +46,10 @@ SET_TYPE_PROP(Test2PSpatialParams, SpatialParams, Test2PSpatialParams<TypeTag>); SET_PROP(Test2PSpatialParams, MaterialLaw) { private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef RegularizedBrooksCorey<Scalar> RawMaterialLaw; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using RawMaterialLaw = RegularizedBrooksCorey<Scalar>; public: - typedef EffToAbsLaw<RawMaterialLaw> type; + using type = EffToAbsLaw<RawMaterialLaw>; }; } @@ -58,24 +58,24 @@ public: template<class TypeTag> class Test2PSpatialParams: public SequentialFVSpatialParams<TypeTag> { - typedef SequentialFVSpatialParams<TypeTag> ParentType; - 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 Grid::ctype CoordScalar; + using ParentType = SequentialFVSpatialParams<TypeTag>; + using Grid = typename GET_PROP_TYPE(TypeTag, Grid); + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using CoordScalar = typename Grid::ctype; enum { dim = Grid::dimension, dimWorld = Grid::dimensionworld }; - typedef typename Grid::Traits::template Codim<0>::Entity Element; + using Element = typename Grid::Traits::template Codim<0>::Entity; - typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition; - typedef Dune::FieldMatrix<Scalar, dim, dim> FieldMatrix; + using GlobalPosition = Dune::FieldVector<CoordScalar, dimWorld>; + using FieldMatrix = Dune::FieldMatrix<Scalar, dim, dim>; public: - typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw; - typedef typename MaterialLaw::Params MaterialLawParams; + using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw); + using MaterialLawParams = typename MaterialLaw::Params; const FieldMatrix& intrinsicPermeabilityAtPos(const GlobalPosition& globalPos) const { diff --git a/test/porousmediumflow/2p/sequential/test_transport.cc b/test/porousmediumflow/2p/sequential/test_transport.cc index ca260c31b5..20b79c5257 100644 --- a/test/porousmediumflow/2p/sequential/test_transport.cc +++ b/test/porousmediumflow/2p/sequential/test_transport.cc @@ -60,6 +60,6 @@ void usage(const char *progName, const std::string &errorMsg) //////////////////////// int main(int argc, char** argv) { - typedef TTAG(TransportTestProblem) ProblemTypeTag; + using ProblemTypeTag = TTAG(TransportTestProblem); return Dumux::start<ProblemTypeTag>(argc, argv, usage); } diff --git a/test/porousmediumflow/2p/sequential/test_transportproblem.hh b/test/porousmediumflow/2p/sequential/test_transportproblem.hh index b93176d3b6..a065adb00e 100644 --- a/test/porousmediumflow/2p/sequential/test_transportproblem.hh +++ b/test/porousmediumflow/2p/sequential/test_transportproblem.hh @@ -84,17 +84,17 @@ SET_INT_PROP(TransportTestProblem, VelocityFormulation, SequentialTwoPCommonIndi template<class TypeTag> class TestTransportProblem: public TransportProblem2P<TypeTag> { - typedef TransportProblem2P<TypeTag> ParentType; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; + using ParentType = TransportProblem2P<TypeTag>; + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; + using Indices = typename GET_PROP_TYPE(TypeTag, Indices); - typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; - typedef typename GET_PROP_TYPE(TypeTag, BoundaryTypes) BoundaryTypes; - typedef typename GET_PROP(TypeTag, SolutionTypes) SolutionTypes; - typedef typename SolutionTypes::PrimaryVariables PrimaryVariables; + using TimeManager = typename GET_PROP_TYPE(TypeTag, TimeManager); + using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); + using SolutionTypes = typename GET_PROP(TypeTag, SolutionTypes); + using PrimaryVariables = typename SolutionTypes::PrimaryVariables; - typedef typename GET_PROP_TYPE(TypeTag, CellData) CellData; + using CellData = typename GET_PROP_TYPE(TypeTag, CellData); enum { @@ -106,9 +106,9 @@ class TestTransportProblem: public TransportProblem2P<TypeTag> wPhaseIdx = Indices::wPhaseIdx, nPhaseIdx = Indices::nPhaseIdx }; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; + using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>; public: TestTransportProblem(TimeManager &timeManager, const GridView &gridView) : diff --git a/test/porousmediumflow/2p/sequential/test_transportspatialparams.hh b/test/porousmediumflow/2p/sequential/test_transportspatialparams.hh index ae81844015..61c3d42ac4 100644 --- a/test/porousmediumflow/2p/sequential/test_transportspatialparams.hh +++ b/test/porousmediumflow/2p/sequential/test_transportspatialparams.hh @@ -48,10 +48,10 @@ SET_TYPE_PROP(TestTransportSpatialParams, SpatialParams, TestTransportSpatialPar SET_PROP(TestTransportSpatialParams, MaterialLaw) { private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef LinearMaterial<Scalar> RawMaterialLaw; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using RawMaterialLaw = LinearMaterial<Scalar>; public: - typedef EffToAbsLaw<RawMaterialLaw> type; + using type = EffToAbsLaw<RawMaterialLaw>; }; } @@ -62,16 +62,16 @@ public: template<class TypeTag> class TestTransportSpatialParams: public SequentialFVSpatialParams<TypeTag> { - typedef SequentialFVSpatialParams<TypeTag> ParentType; - typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; + using ParentType = SequentialFVSpatialParams<TypeTag>; + using Grid = typename GET_PROP_TYPE(TypeTag, Grid); + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - typedef typename Grid::Traits::template Codim<0>::Entity Element; + using Element = typename Grid::Traits::template Codim<0>::Entity; public: - typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw; - typedef typename MaterialLaw::Params MaterialLawParams; + using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw); + using MaterialLawParams = typename MaterialLaw::Params; Scalar intrinsicPermeability (const Element& element) const { diff --git a/test/porousmediumflow/2p1c/implicit/steaminjectionspatialparams.hh b/test/porousmediumflow/2p1c/implicit/steaminjectionspatialparams.hh index 9763594045..d306b58b83 100644 --- a/test/porousmediumflow/2p1c/implicit/steaminjectionspatialparams.hh +++ b/test/porousmediumflow/2p1c/implicit/steaminjectionspatialparams.hh @@ -48,11 +48,11 @@ SET_TYPE_PROP(InjectionProblemSpatialParams, SpatialParams, Dumux::InjectionProb SET_PROP(InjectionProblemSpatialParams, MaterialLaw) { private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef RegularizedVanGenuchten<Scalar> EffMaterialLaw; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using EffMaterialLaw = RegularizedVanGenuchten<Scalar>; public: // define the material law parameterized by absolute saturations - typedef EffToAbsLaw<EffMaterialLaw> type; + using type = EffToAbsLaw<EffMaterialLaw>; }; } diff --git a/test/porousmediumflow/2p2c/sequential/test_adaptive2p2c2d.cc b/test/porousmediumflow/2p2c/sequential/test_adaptive2p2c2d.cc index 705d9e36d7..41ba1e3eca 100644 --- a/test/porousmediumflow/2p2c/sequential/test_adaptive2p2c2d.cc +++ b/test/porousmediumflow/2p2c/sequential/test_adaptive2p2c2d.cc @@ -55,7 +55,7 @@ void usage(const char *progName, const std::string &errorMsg) // The main function using the standard start procedure int main(int argc, char** argv) { - typedef TTAG(Adaptive2p2c2d) TypeTag; + using TypeTag = TTAG(Adaptive2p2c2d); return Dumux::start<TypeTag>(argc, argv, usage); } diff --git a/test/porousmediumflow/2p2c/sequential/test_adaptive2p2c2dproblem.hh b/test/porousmediumflow/2p2c/sequential/test_adaptive2p2c2dproblem.hh index 5d42dd9248..f28cfbd36a 100644 --- a/test/porousmediumflow/2p2c/sequential/test_adaptive2p2c2dproblem.hh +++ b/test/porousmediumflow/2p2c/sequential/test_adaptive2p2c2dproblem.hh @@ -96,18 +96,17 @@ SET_INT_PROP(Adaptive2p2c2d, PressureFormulation, GET_PROP_TYPE(TypeTag, Indices template<class TypeTag = TTAG(Adaptive2p2c2d)> class Adaptive2p2c2d: public IMPETProblem2P2C<TypeTag> { -typedef IMPETProblem2P2C<TypeTag> ParentType; -typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; -typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid; -typedef typename GET_PROP_TYPE(TypeTag, GridCreator) GridCreator; -typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; +using ParentType = IMPETProblem2P2C<TypeTag>; +using GridView = typename GET_PROP_TYPE(TypeTag, GridView); +using Grid = typename GET_PROP_TYPE(TypeTag, Grid); +using GridCreator = typename GET_PROP_TYPE(TypeTag, GridCreator); +using TimeManager = typename GET_PROP_TYPE(TypeTag, TimeManager); -typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; -typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; +using Indices = typename GET_PROP_TYPE(TypeTag, Indices); +using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); -// boundary typedefs -typedef typename GET_PROP_TYPE(TypeTag, BoundaryTypes) BoundaryTypes; -typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables; +using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); +using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); enum { @@ -119,11 +118,11 @@ enum wPhaseIdx = Indices::wPhaseIdx, nPhaseIdx = Indices::nPhaseIdx }; -typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; +using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); -typedef typename GridView::Traits::template Codim<0>::Entity Element; -typedef typename GridView::Intersection Intersection; -typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; +using Element = typename GridView::Traits::template Codim<0>::Entity; +using Intersection = typename GridView::Intersection; +using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>; public: Adaptive2p2c2d(TimeManager &timeManager, const GridView& gridView) : diff --git a/test/porousmediumflow/2p2c/sequential/test_adaptive2p2c3d.cc b/test/porousmediumflow/2p2c/sequential/test_adaptive2p2c3d.cc index c9aede2704..e6a48fef49 100644 --- a/test/porousmediumflow/2p2c/sequential/test_adaptive2p2c3d.cc +++ b/test/porousmediumflow/2p2c/sequential/test_adaptive2p2c3d.cc @@ -55,7 +55,7 @@ void usage(const char *progName, const std::string &errorMsg) // The main function using the standard start procedure int main(int argc, char** argv) { - typedef TTAG(Adaptive2p2c3d) ProblemTypeTag; + using ProblemTypeTag = TTAG(Adaptive2p2c3d); return Dumux::start<ProblemTypeTag>(argc, argv, usage); } diff --git a/test/porousmediumflow/2p2c/sequential/test_adaptive2p2c3dproblem.hh b/test/porousmediumflow/2p2c/sequential/test_adaptive2p2c3dproblem.hh index faba23529e..3fbeaad65e 100644 --- a/test/porousmediumflow/2p2c/sequential/test_adaptive2p2c3dproblem.hh +++ b/test/porousmediumflow/2p2c/sequential/test_adaptive2p2c3dproblem.hh @@ -96,19 +96,18 @@ SET_INT_PROP(Adaptive2p2c3d, PressureFormulation, GET_PROP_TYPE(TypeTag, Indices template<class TypeTag = TTAG(Adaptive2p2c3d)> class Adaptive2p2c3d: public IMPETProblem2P2C<TypeTag> { -typedef IMPETProblem2P2C<TypeTag> ParentType; -typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; -typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid; -typedef typename GET_PROP_TYPE(TypeTag, GridCreator) GridCreator; -typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; - -typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; -typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; -typedef typename GET_PROP_TYPE(TypeTag, SpatialParams) SpatialParams; - -// boundary typedefs -typedef typename GET_PROP_TYPE(TypeTag, BoundaryTypes) BoundaryTypes; -typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables; +using ParentType = IMPETProblem2P2C<TypeTag>; +using GridView = typename GET_PROP_TYPE(TypeTag, GridView); +using Grid = typename GET_PROP_TYPE(TypeTag, Grid); +using GridCreator = typename GET_PROP_TYPE(TypeTag, GridCreator); +using TimeManager = typename GET_PROP_TYPE(TypeTag, TimeManager); + +using Indices = typename GET_PROP_TYPE(TypeTag, Indices); +using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); +using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); + +using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); +using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld @@ -119,11 +118,11 @@ enum wPhaseIdx = Indices::wPhaseIdx, nPhaseIdx = Indices::nPhaseIdx }; -typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; +using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); -typedef typename GridView::Traits::template Codim<0>::Entity Element; -typedef typename GridView::Intersection Intersection; -typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; +using Element = typename GridView::Traits::template Codim<0>::Entity; +using Intersection = typename GridView::Intersection; +using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>; public: Adaptive2p2c3d(TimeManager &timeManager, const GridView& gridView) : diff --git a/test/porousmediumflow/2p2c/sequential/test_dec2p2c.cc b/test/porousmediumflow/2p2c/sequential/test_dec2p2c.cc index 1a3337b245..92f3017a60 100644 --- a/test/porousmediumflow/2p2c/sequential/test_dec2p2c.cc +++ b/test/porousmediumflow/2p2c/sequential/test_dec2p2c.cc @@ -59,6 +59,6 @@ void usage(const char *progName, const std::string &errorMsg) //////////////////////// int main(int argc, char** argv) { - typedef TTAG(TestDecTwoPTwoCProblem) ProblemTypeTag; + using ProblemTypeTag = TTAG(TestDecTwoPTwoCProblem); return Dumux::start<ProblemTypeTag>(argc, argv, usage); } diff --git a/test/porousmediumflow/2p2c/sequential/test_dec2p2c_spatialparams.hh b/test/porousmediumflow/2p2c/sequential/test_dec2p2c_spatialparams.hh index 149271a302..6d042b2634 100644 --- a/test/porousmediumflow/2p2c/sequential/test_dec2p2c_spatialparams.hh +++ b/test/porousmediumflow/2p2c/sequential/test_dec2p2c_spatialparams.hh @@ -47,10 +47,10 @@ SET_TYPE_PROP(Test2P2CSpatialParams, SpatialParams, Test2P2CSpatialParams<TypeTa SET_PROP(Test2P2CSpatialParams, MaterialLaw) { private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef LinearMaterial<Scalar> RawMaterialLaw; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using RawMaterialLaw = LinearMaterial<Scalar>; public: - typedef EffToAbsLaw<RawMaterialLaw> type; + using type = EffToAbsLaw<RawMaterialLaw>; }; } @@ -61,19 +61,19 @@ public: template<class TypeTag> class Test2P2CSpatialParams : public SequentialFVSpatialParams<TypeTag> { - typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; + using Grid = typename GET_PROP_TYPE(TypeTag, Grid); + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); enum {dim=Grid::dimension}; - typedef typename Grid::Traits::template Codim<0>::Entity Element; + using Element = typename Grid::Traits::template Codim<0>::Entity; - typedef Dune::FieldMatrix<Scalar,dim,dim> FieldMatrix; + using FieldMatrix = Dune::FieldMatrix<Scalar, dim, dim>; public: - typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw; - typedef typename MaterialLaw::Params MaterialLawParams; + using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw); + using MaterialLawParams = typename MaterialLaw::Params; const FieldMatrix& intrinsicPermeability (const Element& element) const { diff --git a/test/porousmediumflow/2p2c/sequential/test_dec2p2cproblem.hh b/test/porousmediumflow/2p2c/sequential/test_dec2p2cproblem.hh index 5ccc74e0b3..575406d309 100644 --- a/test/porousmediumflow/2p2c/sequential/test_dec2p2cproblem.hh +++ b/test/porousmediumflow/2p2c/sequential/test_dec2p2cproblem.hh @@ -84,27 +84,26 @@ SET_INT_PROP(TestDecTwoPTwoCProblem, BoundaryMobility, GET_PROP_TYPE(TypeTag, In template<class TypeTag> class TestDecTwoPTwoCProblem: public IMPETProblem2P2C<TypeTag> { -typedef IMPETProblem2P2C<TypeTag> ParentType; -typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; -typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; -typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; +using ParentType = IMPETProblem2P2C<TypeTag>; +using GridView = typename GET_PROP_TYPE(TypeTag, GridView); +using TimeManager = typename GET_PROP_TYPE(TypeTag, TimeManager); +using Indices = typename GET_PROP_TYPE(TypeTag, Indices); -typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; +using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); -// boundary typedefs -typedef typename GET_PROP_TYPE(TypeTag, BoundaryTypes) BoundaryTypes; -typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables; +using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); +using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld }; -typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; +using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); -typedef typename GridView::Traits::template Codim<0>::Entity Element; -typedef typename GridView::Intersection Intersection; -typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; +using Element = typename GridView::Traits::template Codim<0>::Entity; +using Intersection = typename GridView::Intersection; +using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>; public: TestDecTwoPTwoCProblem(TimeManager &timeManager, const GridView &gridView) : diff --git a/test/porousmediumflow/2p2c/sequential/test_multiphysics2p2c.cc b/test/porousmediumflow/2p2c/sequential/test_multiphysics2p2c.cc index 419911c18e..3f8b22d690 100644 --- a/test/porousmediumflow/2p2c/sequential/test_multiphysics2p2c.cc +++ b/test/porousmediumflow/2p2c/sequential/test_multiphysics2p2c.cc @@ -45,10 +45,10 @@ void usage(const char *progname, const std::string &errorMsg = "") int main(int argc, char** argv) { try { - typedef TTAG(TestMultTwoPTwoCProblem) TypeTag; - typedef GET_PROP_TYPE(TypeTag, Grid) Grid; - typedef GET_PROP_TYPE(TypeTag, Problem) Problem; - typedef GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; + using TypeTag = TTAG(TestMultTwoPTwoCProblem); + using Grid = GET_PROP_TYPE(TypeTag, Grid); + using Problem = GET_PROP_TYPE(TypeTag, Problem); + using TimeManager = GET_PROP_TYPE(TypeTag, TimeManager); static const int dim = Grid::dimension; diff --git a/test/porousmediumflow/2p2c/sequential/test_multiphysics2p2cproblem.hh b/test/porousmediumflow/2p2c/sequential/test_multiphysics2p2cproblem.hh index d60754d326..d2b8a9224d 100644 --- a/test/porousmediumflow/2p2c/sequential/test_multiphysics2p2cproblem.hh +++ b/test/porousmediumflow/2p2c/sequential/test_multiphysics2p2cproblem.hh @@ -92,27 +92,26 @@ SET_SCALAR_PROP(TestMultTwoPTwoCProblem, ImpetCFLFactor, 0.8); template<class TypeTag> class TestMultTwoPTwoCProblem: public IMPETProblem2P2C<TypeTag> { -typedef IMPETProblem2P2C<TypeTag> ParentType; -typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; -typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; -typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; +using ParentType = IMPETProblem2P2C<TypeTag>; +using GridView = typename GET_PROP_TYPE(TypeTag, GridView); +using TimeManager = typename GET_PROP_TYPE(TypeTag, TimeManager); +using Indices = typename GET_PROP_TYPE(TypeTag, Indices); -typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; +using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); -// boundary typedefs -typedef typename GET_PROP_TYPE(TypeTag, BoundaryTypes) BoundaryTypes; -typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables; +using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); +using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld }; -typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; +using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); -typedef typename GridView::Traits::template Codim<0>::Entity Element; -typedef typename GridView::Intersection Intersection; -typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; +using Element = typename GridView::Traits::template Codim<0>::Entity; +using Intersection = typename GridView::Intersection; +using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>; public: TestMultTwoPTwoCProblem(TimeManager &timeManager, const GridView &gridView, const GlobalPosition upperRight = 0) : diff --git a/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdproblem.hh b/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdproblem.hh index 48dde16b1e..583fe4a507 100644 --- a/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdproblem.hh +++ b/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdproblem.hh @@ -79,14 +79,14 @@ SET_BOOL_PROP(SagdProblem, UseMoles, false); template <class TypeTag > class SagdProblem : public ImplicitPorousMediaProblem<TypeTag> { - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - typedef typename GridView::Grid Grid; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Grid = typename GridView::Grid; - typedef ImplicitPorousMediaProblem<TypeTag> ParentType; + using ParentType = ImplicitPorousMediaProblem<TypeTag>; // copy some indices for convenience - typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; + using Indices = typename GET_PROP_TYPE(TypeTag, Indices); enum { pressureIdx = Indices::pressureIdx, switch1Idx = Indices::switch1Idx, @@ -115,19 +115,19 @@ class SagdProblem : public ImplicitPorousMediaProblem<TypeTag> }; - typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables; - typedef typename GET_PROP_TYPE(TypeTag, BoundaryTypes) BoundaryTypes; - typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; + using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); + using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); + using TimeManager = typename GET_PROP_TYPE(TypeTag, TimeManager); - typedef typename GridView::template Codim<0>::Entity Element; - typedef typename GridView::template Codim<dim>::Entity Vertex; - typedef typename GridView::Intersection Intersection; + using Element = typename GridView::template Codim<0>::Entity; + using Vertex = typename GridView::template Codim<dim>::Entity; + using Intersection = typename GridView::Intersection; - typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; - typedef typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables) ElementVolumeVariables; + using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry); + using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); + using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables); - typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; + using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>; enum { isBox = GET_PROP_VALUE(TypeTag, ImplicitIsBox) }; diff --git a/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdspatialparams.hh b/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdspatialparams.hh index eb4e9ef788..f0fdf766ab 100644 --- a/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdspatialparams.hh +++ b/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdspatialparams.hh @@ -54,11 +54,11 @@ SET_PROP(SagdSpatialParams, MaterialLaw) private: // define the material law which is parameterized by effective // saturations - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef RegularizedParkerVanGen3P<Scalar> EffectiveLaw; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using EffectiveLaw = RegularizedParkerVanGen3P<Scalar>; public: // define the material law parameterized by absolute saturations - typedef EffToAbsLaw<EffectiveLaw> type; + using type = EffToAbsLaw<EffectiveLaw>; }; } @@ -70,39 +70,39 @@ SET_PROP(SagdSpatialParams, MaterialLaw) template<class TypeTag> class SagdSpatialParams : public FVSpatialParams<TypeTag> { - typedef FVSpatialParams<TypeTag> ParentType; + using ParentType = FVSpatialParams<TypeTag>; - 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 Grid::ctype CoordScalar; + using Grid = typename GET_PROP_TYPE(TypeTag, Grid); + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using CoordScalar = typename Grid::ctype; enum { dim=GridView::dimension, dimWorld=GridView::dimensionworld }; - typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; + using Indices = typename GET_PROP_TYPE(TypeTag, Indices); enum { wPhaseIdx = Indices::wPhaseIdx, nPhaseIdx = Indices::nPhaseIdx }; - typedef Dune::FieldVector<CoordScalar,dimWorld> GlobalPosition; - typedef Dune::FieldVector<CoordScalar,dimWorld> DimVector; + using GlobalPosition = Dune::FieldVector<CoordScalar, dimWorld>; + using DimVector = Dune::FieldVector<CoordScalar, dimWorld>; - typedef typename GET_PROP_TYPE(TypeTag, SolutionVector) SolutionVector; + using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector); - typedef typename GET_PROP_TYPE(TypeTag, FluxVariables) FluxVariables; - typedef typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables) ElementVolumeVariables; + using FluxVariables = typename GET_PROP_TYPE(TypeTag, FluxVariables); + using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables); - typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry; - typedef typename GridView::template Codim<0>::Entity Element; + using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry); + using Element = typename GridView::template Codim<0>::Entity; public: - typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw; - typedef typename MaterialLaw::Params MaterialLawParams; + using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw); + using MaterialLawParams = typename MaterialLaw::Params; /*! * \brief The constructor diff --git a/test/porousmediumflow/3pwateroil/implicit/test_box3pwateroil.cc b/test/porousmediumflow/3pwateroil/implicit/test_box3pwateroil.cc index b56e37131e..9d42852d6a 100644 --- a/test/porousmediumflow/3pwateroil/implicit/test_box3pwateroil.cc +++ b/test/porousmediumflow/3pwateroil/implicit/test_box3pwateroil.cc @@ -55,7 +55,7 @@ void usage(const char *progName, const std::string &errorMsg) int main(int argc, char** argv) { - typedef TTAG(ThreePWaterOilSagdBoxProblem) ProblemTypeTag; + using ProblemTypeTag = TTAG(ThreePWaterOilSagdBoxProblem); return Dumux::start<ProblemTypeTag>(argc, argv, usage); diff --git a/test/porousmediumflow/co2/implicit/heterogeneousspatialparameters.hh b/test/porousmediumflow/co2/implicit/heterogeneousspatialparameters.hh index d849f1918f..f152735cda 100644 --- a/test/porousmediumflow/co2/implicit/heterogeneousspatialparameters.hh +++ b/test/porousmediumflow/co2/implicit/heterogeneousspatialparameters.hh @@ -57,7 +57,7 @@ private: using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); public: // define the material law parameterized by absolute saturations - typedef EffToAbsLaw<RegularizedBrooksCorey<Scalar>> type; + using type = EffToAbsLaw<RegularizedBrooksCorey<Scalar>>; }; } diff --git a/test/porousmediumflow/mpnc/implicit/combustionproblem1c.hh b/test/porousmediumflow/mpnc/implicit/combustionproblem1c.hh index 011d4df4e2..48ec9e31a3 100644 --- a/test/porousmediumflow/mpnc/implicit/combustionproblem1c.hh +++ b/test/porousmediumflow/mpnc/implicit/combustionproblem1c.hh @@ -82,9 +82,9 @@ SET_TYPE_PROP(CombustionProblemOneComponent, // Set fluid configuration SET_PROP(CombustionProblemOneComponent, FluidSystem){ private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); public: - typedef FluidSystems::PureWaterSimpleFluidSystem<Scalar, /*useComplexRelations=*/false> type; + using type = FluidSystems::PureWaterSimpleFluidSystem<Scalar, /*useComplexRelations=*/false>; }; // Set the newton controller @@ -134,11 +134,11 @@ SET_BOOL_PROP(CombustionProblemOneComponent, EnableKinetic, false); SET_PROP(CombustionProblemOneComponent, FluidState) { private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); private: - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; + using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); public: - typedef CompositionalFluidState<Scalar, FluidSystem> type; + using type = CompositionalFluidState<Scalar, FluidSystem>; }; SET_BOOL_PROP(CombustionProblemOneComponent, UseMaxwellDiffusion, false); @@ -165,22 +165,22 @@ SET_BOOL_PROP(CombustionProblemOneComponent, VelocityAveragingInModel, true); template<class TypeTag> class CombustionProblemOneComponent: public ImplicitPorousMediaProblem<TypeTag> { - typedef CombustionProblemOneComponent<TypeTag> ThisType; - typedef ImplicitPorousMediaProblem<TypeTag> ParentType; - typedef typename GET_PROP_TYPE(TypeTag, Indices)Indices; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables; - typedef typename GET_PROP_TYPE(TypeTag, BoundaryTypes) BoundaryTypes; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; + using ThisType = CombustionProblemOneComponent<TypeTag>; + using ParentType = ImplicitPorousMediaProblem<TypeTag>; + using Indices = typename GET_PROP_TYPE(TypeTag, Indices); + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); + using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); + using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); /*! * \brief The fluid state which is used by the volume variables to * store the thermodynamic state. This should be chosen * appropriately for the model ((non-)isothermal, equilibrium, ...). * This can be done in the problem. */ - typedef typename GET_PROP_TYPE(TypeTag, FluidState) FluidState; - typedef typename FluidSystem::ParameterCache ParameterCache; + using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using ParameterCache = typename FluidSystem::ParameterCache; enum {dim = GridView::dimension}; // Grid and world dimension enum {dimWorld = GridView::dimensionworld}; enum {numPhases = GET_PROP_VALUE(TypeTag, NumPhases)}; @@ -210,26 +210,26 @@ class CombustionProblemOneComponent: public ImplicitPorousMediaProblem<TypeTag> leastWettingFirst = MpNcPressureFormulation::leastWettingFirst }; - typedef typename GridView::template Codim<0>::Entity Element; - typedef typename GridView::template Codim<dim>::Entity Vertex; - typedef typename GridView::Intersection Intersection; - typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry; - typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw)::Params MaterialLawParams; - typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw; - typedef typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables) ElementVolumeVariables; - typedef typename GET_PROP_TYPE(TypeTag, VolumeVariables) VolumeVariables; - typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; - typedef typename GET_PROP_TYPE(TypeTag, ElementBoundaryTypes) ElementBoundaryTypes; - typedef typename GET_PROP_TYPE(TypeTag, FluxVariables) FluxVariables; - - typedef Dune::FieldVector<typename GridView::Grid::ctype, dim> DimVector; - typedef Dune::FieldVector<typename GridView::Grid::ctype, dimWorld> GlobalPosition; - - typedef std::vector<Dune::FieldVector<Scalar, 1> > ScalarBuffer; - typedef std::array<ScalarBuffer, numPhases> PhaseBuffer; - typedef Dune::FieldVector<Scalar, dimWorld> VelocityVector; - typedef Dune::BlockVector<VelocityVector> VelocityField; - typedef std::array<VelocityField, numPhases> PhaseVelocityField; + using Element = typename GridView::template Codim<0>::Entity; + using Vertex = typename GridView::template Codim<dim>::Entity; + using Intersection = typename GridView::Intersection; + using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry); + using MaterialLawParams = typename GET_PROP_TYPE(TypeTag, MaterialLaw)::Params; + using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw); + using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables); + using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables); + using TimeManager = typename GET_PROP_TYPE(TypeTag, TimeManager); + using ElementBoundaryTypes = typename GET_PROP_TYPE(TypeTag, ElementBoundaryTypes); + using FluxVariables = typename GET_PROP_TYPE(TypeTag, FluxVariables); + + using DimVector = Dune::FieldVector<typename GridView::Grid::ctype, dim>; + using GlobalPosition = Dune::FieldVector<typename GridView::Grid::ctype, dimWorld>; + + using ScalarBuffer = std::vector<Dune::FieldVector<Scalar, 1>>; + using PhaseBuffer = std::array<ScalarBuffer, numPhases>; + using VelocityVector = Dune::FieldVector<Scalar, dimWorld>; + using VelocityField = Dune::BlockVector<VelocityVector>; + using PhaseVelocityField = std::array<VelocityField, numPhases>; public: CombustionProblemOneComponent(TimeManager &timeManager, @@ -670,7 +670,7 @@ private: } // obtain fugacities - typedef ComputeFromReferencePhase<Scalar, FluidSystem> ComputeFromReferencePhase; + using ComputeFromReferencePhase = ComputeFromReferencePhase<Scalar, FluidSystem>; ParameterCache paramCache; ComputeFromReferencePhase::solve(fluidState, paramCache, diff --git a/test/porousmediumflow/mpnc/implicit/combustionspatialparams.hh b/test/porousmediumflow/mpnc/implicit/combustionspatialparams.hh index 81f5af84e6..5dcb62a0c9 100644 --- a/test/porousmediumflow/mpnc/implicit/combustionspatialparams.hh +++ b/test/porousmediumflow/mpnc/implicit/combustionspatialparams.hh @@ -58,17 +58,17 @@ SET_TYPE_PROP(CombustionSpatialParams, SpatialParams, CombustionSpatialParams<Ty SET_PROP(CombustionSpatialParams, MaterialLaw) { private: - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; + using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); enum {wPhaseIdx = FluidSystem::wPhaseIdx}; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); // actually other people call this Leverett - typedef HeatPipeLaw<Scalar> EffectiveLaw; + using EffectiveLaw = HeatPipeLaw<Scalar>; - typedef EffToAbsLaw<EffectiveLaw> TwoPMaterialLaw; + using TwoPMaterialLaw = EffToAbsLaw<EffectiveLaw>; public: - typedef TwoPAdapter<wPhaseIdx, TwoPMaterialLaw> type; + using type = TwoPAdapter<wPhaseIdx, TwoPMaterialLaw>; }; @@ -81,10 +81,10 @@ private: template<class TypeTag> class CombustionSpatialParams : public FVSpatialParams<TypeTag> { - typedef FVSpatialParams<TypeTag> ParentType; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; + using ParentType = FVSpatialParams<TypeTag>; + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); enum {dim=GridView::dimension }; enum {dimWorld=GridView::dimensionworld}; @@ -95,19 +95,19 @@ class CombustionSpatialParams : public FVSpatialParams<TypeTag> enum {numPhases = GET_PROP_VALUE(TypeTag, NumPhases)}; enum {enableEnergy = GET_PROP_VALUE(TypeTag, EnableEnergy)}; - typedef typename GET_PROP_TYPE(TypeTag, VolumeVariables) VolumeVariables; - typedef typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables) ElementVolumeVariables; - typedef typename GET_PROP_TYPE(TypeTag, FluxVariables) FluxVariables; - typedef typename GET_PROP_TYPE(TypeTag, SolutionVector) SolutionVector; - typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry; - typedef typename GridView::template Codim<0>::Entity Element; - typedef Dune::FieldVector<Scalar,dimWorld> GlobalPosition; - typedef Dune::FieldVector<Scalar,dimWorld> DimVector; - typedef typename GET_PROP_TYPE(TypeTag, FluidState) FluidState; + using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables); + using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables); + using FluxVariables = typename GET_PROP_TYPE(TypeTag, FluxVariables); + using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector); + using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry); + using Element = typename GridView::template Codim<0>::Entity; + using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>; + using DimVector = Dune::FieldVector<Scalar, dimWorld>; + using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); public: - typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw; - typedef typename MaterialLaw::Params MaterialLawParams; + using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw); + using MaterialLawParams = typename MaterialLaw::Params; CombustionSpatialParams(const GridView &gv) : ParentType(gv) diff --git a/test/porousmediumflow/mpnc/implicit/evaporationatmosphereproblem.hh b/test/porousmediumflow/mpnc/implicit/evaporationatmosphereproblem.hh index 09cb5d7157..9a1820efa6 100644 --- a/test/porousmediumflow/mpnc/implicit/evaporationatmosphereproblem.hh +++ b/test/porousmediumflow/mpnc/implicit/evaporationatmosphereproblem.hh @@ -86,8 +86,8 @@ SET_TYPE_PROP(EvaporationAtmosphereProblem, // Set fluid configuration SET_PROP(EvaporationAtmosphereProblem, FluidSystem) { -private: typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; -public: typedef FluidSystems::H2ON2Kinetic<Scalar, /*useComplexRelations=*/false> type; +private: using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); +public: using type = FluidSystems::H2ON2Kinetic<Scalar, /*useComplexRelations=*/false>; }; // Set the newton controller @@ -130,12 +130,12 @@ SET_BOOL_PROP(EvaporationAtmosphereProblem, EnableKinetic, true); * appropriately for the model ((non-)isothermal, equilibrium, ...). */ SET_PROP(EvaporationAtmosphereProblem, FluidState){ - private: typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - private: typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; -// public: typedef NonEquilibriumEnergyFluidState<Scalar, FluidSystem> type; -// public: typedef NonEquilibriumMassFluidState<Scalar, FluidSystem> type; - public: typedef NonEquilibriumFluidState<Scalar, FluidSystem> type; -// public: typedef CompositionalFluidState<Scalar, FluidSystem> type; + private: using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + private: using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); +// public: using type = NonEquilibriumEnergyFluidState<Scalar, FluidSystem>; +// public: using type = NonEquilibriumMassFluidState<Scalar, FluidSystem>; + public: using type = NonEquilibriumFluidState<Scalar, FluidSystem>; +// public: using type = CompositionalFluidState<Scalar, FluidSystem>; }; SET_BOOL_PROP(EvaporationAtmosphereProblem, UseMaxwellDiffusion, false); @@ -164,21 +164,21 @@ template <class TypeTag> class EvaporationAtmosphereProblem : public ImplicitPorousMediaProblem<TypeTag> { - typedef ImplicitPorousMediaProblem<TypeTag> ParentType; - typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, BoundaryTypes) BoundaryTypes; - typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; + using ParentType = ImplicitPorousMediaProblem<TypeTag>; + using Indices = typename GET_PROP_TYPE(TypeTag, Indices); + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); + using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); + using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); /*! * \brief The fluid state which is used by the volume variables to * store the thermodynamic state. This should be chosen * appropriately for the model ((non-)isothermal, equilibrium, ...). * This can be done in the problem. */ - typedef typename GET_PROP_TYPE(TypeTag, FluidState) FluidState; - typedef typename FluidSystem::ParameterCache ParameterCache; + using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using ParameterCache = typename FluidSystem::ParameterCache; enum { dim = GridView::dimension}; // Grid and world dimension enum { dimWorld = GridView::dimensionworld}; enum { numPhases = GET_PROP_VALUE(TypeTag, NumPhases)}; @@ -206,21 +206,21 @@ class EvaporationAtmosphereProblem leastWettingFirst = MpNcPressureFormulation::leastWettingFirst }; - typedef typename GridView::template Codim<0>::Entity Element; - typedef typename GridView::template Codim<dim>::Entity Vertex; - typedef typename GridView::Intersection Intersection; - typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry; - typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw)::Params MaterialLawParams; - typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw; - typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; - - typedef Dune::FieldVector<typename GridView::Grid::ctype, dimWorld> GlobalPosition; - - typedef std::vector<Dune::FieldVector<Scalar, 1> > ScalarBuffer; - typedef std::array<ScalarBuffer, numPhases> PhaseBuffer; - typedef Dune::FieldVector<Scalar, dim> DimVector; - typedef Dune::BlockVector<DimVector> VelocityField; - typedef std::array<VelocityField, numPhases> PhaseVelocityField; + using Element = typename GridView::template Codim<0>::Entity; + using Vertex = typename GridView::template Codim<dim>::Entity; + using Intersection = typename GridView::Intersection; + using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry); + using MaterialLawParams = typename GET_PROP_TYPE(TypeTag, MaterialLaw)::Params; + using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw); + using TimeManager = typename GET_PROP_TYPE(TypeTag, TimeManager); + + using GlobalPosition = Dune::FieldVector<typename GridView::Grid::ctype, dimWorld>; + + using ScalarBuffer = std::vector<Dune::FieldVector<Scalar, 1>>; + using PhaseBuffer = std::array<ScalarBuffer, numPhases>; + using DimVector = Dune::FieldVector<Scalar, dim>; + using VelocityField = Dune::BlockVector<DimVector>; + using PhaseVelocityField = std::array<VelocityField, numPhases>; public: /*! diff --git a/test/porousmediumflow/mpnc/implicit/evaporationatmospherespatialparams.hh b/test/porousmediumflow/mpnc/implicit/evaporationatmospherespatialparams.hh index 01ffa9cf84..1e7a5784b9 100644 --- a/test/porousmediumflow/mpnc/implicit/evaporationatmospherespatialparams.hh +++ b/test/porousmediumflow/mpnc/implicit/evaporationatmospherespatialparams.hh @@ -63,14 +63,14 @@ SET_TYPE_PROP(EvaporationAtmosphereSpatialParams, SpatialParams, EvaporationAtmo // Set the material Law SET_PROP(EvaporationAtmosphereSpatialParams, MaterialLaw) { - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; + using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); enum {wPhaseIdx = FluidSystem::wPhaseIdx}; private: // define the material law which is parameterized by effective // saturations - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); // select appropriate parametrization #define linear 0 // pc(S_w) #define RegVG 0 // pc(S_w) @@ -80,29 +80,29 @@ private: // define the material law #if linear - typedef LinearMaterial<Scalar> EffectiveLaw; + using EffectiveLaw = LinearMaterial<Scalar>; #endif #if RegVG - typedef RegularizedVanGenuchten<Scalar> EffectiveLaw; + using EffectiveLaw = RegularizedVanGenuchten<Scalar>; #endif #if RegBC - typedef RegularizedBrooksCorey<Scalar> EffectiveLaw; + using EffectiveLaw = RegularizedBrooksCorey<Scalar>; #endif #if RegVGofT - typedef RegularizedVanGenuchtenOfTemperature<Scalar> EffectiveLaw; + using EffectiveLaw = RegularizedVanGenuchtenOfTemperature<Scalar>; #endif #if VG - typedef VanGenuchten<Scalar> EffectiveLaw; + using EffectiveLaw = VanGenuchten<Scalar>; #endif - typedef EffToAbsLaw<EffectiveLaw> TwoPMaterialLaw; + using TwoPMaterialLaw = EffToAbsLaw<EffectiveLaw>; public: -// typedef TwoPOfTAdapter<wPhaseIdx, TwoPMaterialLaw> type; // adapter for incorporating temperature effects on pc-S - typedef TwoPAdapter<wPhaseIdx, TwoPMaterialLaw> type; +// using type = TwoPOfTAdapter<wPhaseIdx, TwoPMaterialLaw>; // adapter for incorporating temperature effects on pc-S + using type = TwoPAdapter<wPhaseIdx, TwoPMaterialLaw>; }; @@ -110,33 +110,33 @@ private: // Set the interfacial area relation: wetting -- non-wetting SET_PROP(EvaporationAtmosphereSpatialParams, AwnSurface) { - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw)::Params MaterialLawParams; - typedef AwnSurfacePcMaxFct<Scalar> EffectiveIALaw; - // typedef AwnSurfacePolynomial2ndOrder<Scalar> EffectiveIALaw; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using MaterialLawParams = typename GET_PROP_TYPE(TypeTag, MaterialLaw)::Params; + using EffectiveIALaw = AwnSurfacePcMaxFct<Scalar>; + // using EffectiveIALaw = AwnSurfacePolynomial2ndOrder<Scalar>; public: - typedef EffToAbsLawIA<EffectiveIALaw, MaterialLawParams> type; + using type = EffToAbsLawIA<EffectiveIALaw, MaterialLawParams>; }; // Set the interfacial area relation: wetting -- solid SET_PROP(EvaporationAtmosphereSpatialParams, AwsSurface) { - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw)::Params MaterialLawParams; - typedef AwnSurfacePolynomial2ndOrder<Scalar> EffectiveIALaw; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using MaterialLawParams = typename GET_PROP_TYPE(TypeTag, MaterialLaw)::Params; + using EffectiveIALaw = AwnSurfacePolynomial2ndOrder<Scalar>; public: - typedef EffToAbsLawIA<EffectiveIALaw, MaterialLawParams> type; + using type = EffToAbsLawIA<EffectiveIALaw, MaterialLawParams>; }; // Set the interfacial area relation: non-wetting -- solid SET_PROP(EvaporationAtmosphereSpatialParams, AnsSurface) { - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw)::Params MaterialLawParams; - typedef AwnSurfaceExpSwPcTo3<Scalar> EffectiveIALaw; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using MaterialLawParams = typename GET_PROP_TYPE(TypeTag, MaterialLaw)::Params; + using EffectiveIALaw = AwnSurfaceExpSwPcTo3<Scalar>; public: - typedef EffToAbsLawIA<EffectiveIALaw, MaterialLawParams> type; + using type = EffToAbsLawIA<EffectiveIALaw, MaterialLawParams>; }; } // end namespace properties @@ -147,10 +147,10 @@ public: template<class TypeTag> class EvaporationAtmosphereSpatialParams : public FVSpatialParams<TypeTag> { - typedef FVSpatialParams<TypeTag> ParentType; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; + using ParentType = FVSpatialParams<TypeTag>; + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); enum {dim=GridView::dimension }; enum {dimWorld=GridView::dimensionworld}; @@ -161,30 +161,30 @@ class EvaporationAtmosphereSpatialParams : public FVSpatialParams<TypeTag> enum { numPhases = GET_PROP_VALUE(TypeTag, NumPhases)}; enum { enableEnergy = GET_PROP_VALUE(TypeTag, EnableEnergy)}; - typedef typename GET_PROP_TYPE(TypeTag, VolumeVariables) VolumeVariables; - typedef typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables) ElementVolumeVariables; - typedef typename GET_PROP_TYPE(TypeTag, FluxVariables) FluxVariables; - typedef typename GET_PROP_TYPE(TypeTag, SolutionVector) SolutionVector; - typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry; - typedef typename GridView::template Codim<0>::Entity Element; - typedef Dune::FieldVector<Scalar,dimWorld> GlobalPosition; - typedef Dune::FieldVector<Scalar,dim> LocalPosition; + using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables); + using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables); + using FluxVariables = typename GET_PROP_TYPE(TypeTag, FluxVariables); + using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector); + using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry); + using Element = typename GridView::template Codim<0>::Entity; + using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>; + using LocalPosition = Dune::FieldVector<Scalar, dim>; - typedef Dune::FieldVector<Scalar,dim> DimVector; - typedef typename GET_PROP_TYPE(TypeTag, FluidState) FluidState; + using DimVector = Dune::FieldVector<Scalar, dim>; + using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); public: - typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw; - typedef typename MaterialLaw::Params MaterialLawParams; + using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw); + using MaterialLawParams = typename MaterialLaw::Params; - typedef typename GET_PROP_TYPE(TypeTag, AwnSurface) AwnSurface; - typedef typename AwnSurface::Params AwnSurfaceParams; + using AwnSurface = typename GET_PROP_TYPE(TypeTag, AwnSurface); + using AwnSurfaceParams = typename AwnSurface::Params; - typedef typename GET_PROP_TYPE(TypeTag, AwsSurface) AwsSurface; - typedef typename AwsSurface::Params AwsSurfaceParams; + using AwsSurface = typename GET_PROP_TYPE(TypeTag, AwsSurface); + using AwsSurfaceParams = typename AwsSurface::Params; - typedef typename GET_PROP_TYPE(TypeTag, AnsSurface) AnsSurface; - typedef typename AnsSurface::Params AnsSurfaceParams; + using AnsSurface = typename GET_PROP_TYPE(TypeTag, AnsSurface); + using AnsSurfaceParams = typename AnsSurface::Params; EvaporationAtmosphereSpatialParams(const GridView &gridView) diff --git a/test/porousmediumflow/mpnc/implicit/forchheimer1pproblem.hh b/test/porousmediumflow/mpnc/implicit/forchheimer1pproblem.hh index 2ae1eba28d..e263c8ccc6 100644 --- a/test/porousmediumflow/mpnc/implicit/forchheimer1pproblem.hh +++ b/test/porousmediumflow/mpnc/implicit/forchheimer1pproblem.hh @@ -58,9 +58,9 @@ SET_TYPE_PROP(Forchheimer1pProblem, // Set fluid configuration SET_PROP(Forchheimer1pProblem, FluidSystem) { private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); public: - typedef FluidSystems::H2OAir<Scalar, SimpleH2O<Scalar>, /*useComplexRelations=*/false> type; + using type = FluidSystems::H2OAir<Scalar, SimpleH2O<Scalar>, /*useComplexRelations=*/false>; }; // Enable molecular diffusion of the components? @@ -110,17 +110,17 @@ template <class TypeTag> class Forchheimer1pProblem : public ImplicitPorousMediaProblem<TypeTag> { - typedef ImplicitPorousMediaProblem<TypeTag> ParentType; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables; - typedef typename GET_PROP_TYPE(TypeTag, BoundaryTypes) BoundaryTypes; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; - typedef typename FluidSystem::ParameterCache ParameterCache; - typedef typename GET_PROP_TYPE(TypeTag, FluidState) FluidState; - typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw; - typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw)::Params MaterialLawParams; - typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; + using ParentType = ImplicitPorousMediaProblem<TypeTag>; + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); + using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); + using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); + using ParameterCache = typename FluidSystem::ParameterCache; + using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw); + using MaterialLawParams = typename GET_PROP_TYPE(TypeTag, MaterialLaw)::Params; + using Indices = typename GET_PROP_TYPE(TypeTag, Indices); // Grid and world dimension enum {dim = GridView::dimension}; @@ -135,13 +135,13 @@ class Forchheimer1pProblem enum {s0Idx = Indices::s0Idx}; enum {p0Idx = Indices::p0Idx}; - typedef typename GridView::template Codim<0>::Entity Element; - typedef typename GridView::template Codim<dim>::Entity Vertex; - typedef typename GridView::Intersection Intersection; - typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry; - typedef Dune::FieldVector<typename GridView::Grid::ctype, dimWorld> GlobalPosition; - typedef Dune::FieldVector<Scalar, numPhases> PhaseVector; - typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; + using Element = typename GridView::template Codim<0>::Entity; + using Vertex = typename GridView::template Codim<dim>::Entity; + using Intersection = typename GridView::Intersection; + using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry); + using GlobalPosition = Dune::FieldVector<typename GridView::Grid::ctype, dimWorld>; + using PhaseVector = Dune::FieldVector<Scalar, numPhases>; + using TimeManager = typename GET_PROP_TYPE(TypeTag, TimeManager); public: /*! @@ -389,7 +389,7 @@ private: // make the fluid state consistent with local thermodynamic // equilibrium - typedef ComputeFromReferencePhase<Scalar, FluidSystem> ComputeFromReferencePhase; + using ComputeFromReferencePhase = ComputeFromReferencePhase<Scalar, FluidSystem>; ParameterCache paramCache; ComputeFromReferencePhase::solve(fs, diff --git a/test/porousmediumflow/mpnc/implicit/forchheimer2pproblem.hh b/test/porousmediumflow/mpnc/implicit/forchheimer2pproblem.hh index 0b34a6e4c0..c87cab3041 100644 --- a/test/porousmediumflow/mpnc/implicit/forchheimer2pproblem.hh +++ b/test/porousmediumflow/mpnc/implicit/forchheimer2pproblem.hh @@ -56,9 +56,9 @@ SET_TYPE_PROP(Forchheimer2pProblem, // Set fluid configuration SET_PROP(Forchheimer2pProblem, FluidSystem) { private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); public: - typedef FluidSystems::H2ON2<Scalar, /*useComplexRelations=*/false> type; + using type = FluidSystems::H2ON2<Scalar, /*useComplexRelations=*/false>; }; @@ -109,17 +109,17 @@ template <class TypeTag> class Forchheimer2pProblem : public ImplicitPorousMediaProblem<TypeTag> { - typedef ImplicitPorousMediaProblem<TypeTag> ParentType; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables; - typedef typename GET_PROP_TYPE(TypeTag, BoundaryTypes) BoundaryTypes; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; - typedef typename FluidSystem::ParameterCache ParameterCache; - typedef typename GET_PROP_TYPE(TypeTag, FluidState) FluidState; - typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw; - typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw)::Params MaterialLawParams; - typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; + using ParentType = ImplicitPorousMediaProblem<TypeTag>; + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); + using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); + using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); + using ParameterCache = typename FluidSystem::ParameterCache; + using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw); + using MaterialLawParams = typename GET_PROP_TYPE(TypeTag, MaterialLaw)::Params; + using Indices = typename GET_PROP_TYPE(TypeTag, Indices); // Grid and world dimension enum {dim = GridView::dimension}; @@ -134,13 +134,13 @@ class Forchheimer2pProblem enum {s0Idx = Indices::s0Idx}; enum {p0Idx = Indices::p0Idx}; - typedef typename GridView::template Codim<0>::Entity Element; - typedef typename GridView::template Codim<dim>::Entity Vertex; - typedef typename GridView::Intersection Intersection; - typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry; - typedef Dune::FieldVector<typename GridView::Grid::ctype, dimWorld> GlobalPosition; - typedef Dune::FieldVector<Scalar, numPhases> PhaseVector; - typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; + using Element = typename GridView::template Codim<0>::Entity; + using Vertex = typename GridView::template Codim<dim>::Entity; + using Intersection = typename GridView::Intersection; + using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry); + using GlobalPosition = Dune::FieldVector<typename GridView::Grid::ctype, dimWorld>; + using PhaseVector = Dune::FieldVector<Scalar, numPhases>; + using TimeManager = typename GET_PROP_TYPE(TypeTag, TimeManager); public: /*! @@ -395,7 +395,7 @@ private: // make the fluid state consistent with local thermodynamic // equilibrium - typedef ComputeFromReferencePhase<Scalar, FluidSystem> ComputeFromReferencePhase; + using ComputeFromReferencePhase = ComputeFromReferencePhase<Scalar, FluidSystem>; ParameterCache paramCache; ComputeFromReferencePhase::solve(fs, diff --git a/test/porousmediumflow/mpnc/implicit/forchheimerspatialparams.hh b/test/porousmediumflow/mpnc/implicit/forchheimerspatialparams.hh index 0f50bdb80d..f8869ad466 100644 --- a/test/porousmediumflow/mpnc/implicit/forchheimerspatialparams.hh +++ b/test/porousmediumflow/mpnc/implicit/forchheimerspatialparams.hh @@ -53,14 +53,14 @@ SET_TYPE_PROP(ForchheimerSpatialParams, SpatialParams, ForchheimerSpatialParams< SET_PROP(ForchheimerSpatialParams, MaterialLaw) { private: - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; + using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); enum {wPhaseIdx = FluidSystem::wPhaseIdx}; // define the material law - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef RegularizedLinearMaterial<Scalar> EffMaterialLaw; - typedef EffToAbsLaw<EffMaterialLaw> TwoPMaterialLaw; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using EffMaterialLaw = RegularizedLinearMaterial<Scalar>; + using TwoPMaterialLaw = EffToAbsLaw<EffMaterialLaw>; public: - typedef TwoPAdapter<wPhaseIdx, TwoPMaterialLaw> type; + using type = TwoPAdapter<wPhaseIdx, TwoPMaterialLaw>; }; } @@ -73,24 +73,24 @@ public: template<class TypeTag> class ForchheimerSpatialParams : public FVSpatialParams<TypeTag> { - typedef FVSpatialParams<TypeTag> ParentType; - 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, SolutionVector) SolutionVector; - typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; - typedef typename Grid::ctype CoordScalar; + using ParentType = FVSpatialParams<TypeTag>; + using Grid = typename GET_PROP_TYPE(TypeTag, Grid); + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector); + using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry); + using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); + using CoordScalar = typename Grid::ctype; enum {dimWorld=GridView::dimensionworld}; enum {wPhaseIdx = FluidSystem::wPhaseIdx}; - typedef typename GridView::template Codim<0>::Entity Element; - typedef Dune::FieldVector<CoordScalar,dimWorld> GlobalPosition; + using Element = typename GridView::template Codim<0>::Entity; + using GlobalPosition = Dune::FieldVector<CoordScalar, dimWorld>; public: - typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw; - typedef typename MaterialLaw::Params MaterialLawParams; + using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw); + using MaterialLawParams = typename MaterialLaw::Params; ForchheimerSpatialParams(const GridView &gridView) : ParentType(gridView) diff --git a/test/porousmediumflow/mpnc/implicit/obstacleproblem.hh b/test/porousmediumflow/mpnc/implicit/obstacleproblem.hh index 53f8b0a556..921f8925e9 100644 --- a/test/porousmediumflow/mpnc/implicit/obstacleproblem.hh +++ b/test/porousmediumflow/mpnc/implicit/obstacleproblem.hh @@ -59,9 +59,9 @@ SET_TYPE_PROP(ObstacleProblem, // Set fluid configuration SET_PROP(ObstacleProblem, FluidSystem) { private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); public: - typedef FluidSystems::H2ON2<Scalar, /*useComplexRelations=*/false> type; + using type = FluidSystems::H2ON2<Scalar, /*useComplexRelations=*/false>; }; // Enable smooth upwinding? @@ -113,17 +113,17 @@ template <class TypeTag> class ObstacleProblem : public ImplicitPorousMediaProblem<TypeTag> { - typedef ImplicitPorousMediaProblem<TypeTag> ParentType; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables; - typedef typename GET_PROP_TYPE(TypeTag, BoundaryTypes) BoundaryTypes; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; - typedef typename FluidSystem::ParameterCache ParameterCache; - typedef typename GET_PROP_TYPE(TypeTag, FluidState) FluidState; - typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw; - typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw)::Params MaterialLawParams; - typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; + using ParentType = ImplicitPorousMediaProblem<TypeTag>; + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); + using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); + using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); + using ParameterCache = typename FluidSystem::ParameterCache; + using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); + using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw); + using MaterialLawParams = typename GET_PROP_TYPE(TypeTag, MaterialLaw)::Params; + using Indices = typename GET_PROP_TYPE(TypeTag, Indices); // world dimension enum {dimWorld = GridView::dimensionworld}; @@ -137,12 +137,12 @@ class ObstacleProblem enum {s0Idx = Indices::s0Idx}; enum {p0Idx = Indices::p0Idx}; - typedef typename GridView::template Codim<0>::Entity Element; - typedef typename GridView::Intersection Intersection; - typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry; - typedef Dune::FieldVector<typename GridView::Grid::ctype, dimWorld> GlobalPosition; - typedef Dune::FieldVector<Scalar, numPhases> PhaseVector; - typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; + using Element = typename GridView::template Codim<0>::Entity; + using Intersection = typename GridView::Intersection; + using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry); + using GlobalPosition = Dune::FieldVector<typename GridView::Grid::ctype, dimWorld>; + using PhaseVector = Dune::FieldVector<Scalar, numPhases>; + using TimeManager = typename GET_PROP_TYPE(TypeTag, TimeManager); enum { isBox = GET_PROP_VALUE(TypeTag, ImplicitIsBox) }; public: @@ -399,7 +399,7 @@ private: // make the fluid state consistent with local thermodynamic // equilibrium - typedef ComputeFromReferencePhase<Scalar, FluidSystem> ComputeFromReferencePhase; + using ComputeFromReferencePhase = ComputeFromReferencePhase<Scalar, FluidSystem>; ParameterCache paramCache; ComputeFromReferencePhase::solve(fs, diff --git a/test/porousmediumflow/mpnc/implicit/obstaclespatialparams.hh b/test/porousmediumflow/mpnc/implicit/obstaclespatialparams.hh index da0fe32e0a..e9565a2c89 100644 --- a/test/porousmediumflow/mpnc/implicit/obstaclespatialparams.hh +++ b/test/porousmediumflow/mpnc/implicit/obstaclespatialparams.hh @@ -52,14 +52,14 @@ SET_TYPE_PROP(ObstacleSpatialParams, SpatialParams, ObstacleSpatialParams<TypeTa SET_PROP(ObstacleSpatialParams, MaterialLaw) { private: - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; + using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); enum {wPhaseIdx = FluidSystem::wPhaseIdx}; // define the material law - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef RegularizedLinearMaterial<Scalar> EffMaterialLaw; - typedef EffToAbsLaw<EffMaterialLaw> TwoPMaterialLaw; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using EffMaterialLaw = RegularizedLinearMaterial<Scalar>; + using TwoPMaterialLaw = EffToAbsLaw<EffMaterialLaw>; public: - typedef TwoPAdapter<wPhaseIdx, TwoPMaterialLaw> type; + using type = TwoPAdapter<wPhaseIdx, TwoPMaterialLaw>; }; } @@ -72,24 +72,24 @@ public: template<class TypeTag> class ObstacleSpatialParams : public FVSpatialParams<TypeTag> { - typedef FVSpatialParams<TypeTag> ParentType; - 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, SolutionVector) SolutionVector; - typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; - typedef typename Grid::ctype CoordScalar; + using ParentType = FVSpatialParams<TypeTag>; + using Grid = typename GET_PROP_TYPE(TypeTag, Grid); + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector); + using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry); + using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); + using CoordScalar = typename Grid::ctype; enum {dimWorld=GridView::dimensionworld}; enum {wPhaseIdx = FluidSystem::wPhaseIdx}; - typedef typename GridView::template Codim<0>::Entity Element; - typedef Dune::FieldVector<CoordScalar,dimWorld> DimWorldVector; + using Element = typename GridView::template Codim<0>::Entity; + using DimWorldVector = Dune::FieldVector<CoordScalar, dimWorld>; public: - typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw; - typedef typename MaterialLaw::Params MaterialLawParams; + using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw); + using MaterialLawParams = typename MaterialLaw::Params; ObstacleSpatialParams(const GridView &gridView) : ParentType(gridView) diff --git a/test/porousmediumflow/mpnc/implicit/plotoverline2d.hh b/test/porousmediumflow/mpnc/implicit/plotoverline2d.hh index 76e972aca3..0b112a6913 100644 --- a/test/porousmediumflow/mpnc/implicit/plotoverline2d.hh +++ b/test/porousmediumflow/mpnc/implicit/plotoverline2d.hh @@ -59,19 +59,19 @@ namespace Properties template<class TypeTag> class PlotOverLine2D { - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, Problem) Problem; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry; - typedef typename GET_PROP_TYPE(TypeTag, DofMapper) DofMapper; - typedef typename GET_PROP_TYPE(TypeTag, ElementSolutionVector) ElementSolutionVector; - typedef typename GET_PROP_TYPE(TypeTag, SolutionVector) SolutionVector; - typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw; - typedef typename MaterialLaw::Params aterialLawParams; + using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry); + using DofMapper = typename GET_PROP_TYPE(TypeTag, DofMapper); + using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector); + using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector); + using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw); + using aterialLawParams = typename MaterialLaw::Params; - typedef typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables) ElementVolumeVariables; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; + using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables); + using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); enum { wPhaseIdx = FluidSystem::wPhaseIdx, @@ -85,7 +85,7 @@ class PlotOverLine2D dimWorld = GridView::dimensionworld, }; - typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; + using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>; public: /*! diff --git a/test/porousmediumflow/mpnc/implicit/test_boxmpnc.cc b/test/porousmediumflow/mpnc/implicit/test_boxmpnc.cc index f8a0d90a40..64f79caa08 100644 --- a/test/porousmediumflow/mpnc/implicit/test_boxmpnc.cc +++ b/test/porousmediumflow/mpnc/implicit/test_boxmpnc.cc @@ -54,6 +54,6 @@ void usage(const char *progName, const std::string &errorMsg) int main(int argc, char** argv) { - typedef TTAG(ObstacleBoxProblem) ProblemTypeTag; + using ProblemTypeTag = TTAG(ObstacleBoxProblem); return Dumux::start<ProblemTypeTag>(argc, argv, usage); } diff --git a/test/porousmediumflow/mpnc/implicit/test_boxmpnckinetic.cc b/test/porousmediumflow/mpnc/implicit/test_boxmpnckinetic.cc index deee9d365e..11a6ecd5e0 100644 --- a/test/porousmediumflow/mpnc/implicit/test_boxmpnckinetic.cc +++ b/test/porousmediumflow/mpnc/implicit/test_boxmpnckinetic.cc @@ -53,6 +53,6 @@ void printUsage(const char *progName, const std::string &errorMsg) int main(int argc, char** argv) { - typedef TTAG(EvaporationAtmosphereProblem) ProblemTypeTag; + using ProblemTypeTag = TTAG(EvaporationAtmosphereProblem); return Dumux::start<ProblemTypeTag>(argc, argv, printUsage); } diff --git a/test/porousmediumflow/mpnc/implicit/test_boxmpncthermalnonequil.cc b/test/porousmediumflow/mpnc/implicit/test_boxmpncthermalnonequil.cc index 4b2e738727..5f228fcc62 100644 --- a/test/porousmediumflow/mpnc/implicit/test_boxmpncthermalnonequil.cc +++ b/test/porousmediumflow/mpnc/implicit/test_boxmpncthermalnonequil.cc @@ -55,7 +55,7 @@ void usage(const char *progName, const std::string &errorMsg) int main(int argc, char** argv) { #if HAVE_SUPERLU - typedef TTAG(CombustionProblemOneComponent) ProblemTypeTag; + using ProblemTypeTag = TTAG(CombustionProblemOneComponent); return Dumux::start<ProblemTypeTag>(argc, argv, usage); #else #warning CombustionProblemOneComponent skipped, needs SuperLU! diff --git a/test/porousmediumflow/mpnc/implicit/test_ccmpnc.cc b/test/porousmediumflow/mpnc/implicit/test_ccmpnc.cc index c19afeb8c5..6c0340f8d9 100644 --- a/test/porousmediumflow/mpnc/implicit/test_ccmpnc.cc +++ b/test/porousmediumflow/mpnc/implicit/test_ccmpnc.cc @@ -54,6 +54,6 @@ void usage(const char *progName, const std::string &errorMsg) int main(int argc, char** argv) { - typedef TTAG(ObstacleCCProblem) ProblemTypeTag; + using ProblemTypeTag = TTAG(ObstacleCCProblem); return Dumux::start<ProblemTypeTag>(argc, argv, usage); } diff --git a/test/porousmediumflow/mpnc/implicit/test_forchheimer1p.cc b/test/porousmediumflow/mpnc/implicit/test_forchheimer1p.cc index e8ef2fd92d..551914055e 100644 --- a/test/porousmediumflow/mpnc/implicit/test_forchheimer1p.cc +++ b/test/porousmediumflow/mpnc/implicit/test_forchheimer1p.cc @@ -54,6 +54,6 @@ void usage(const char *progName, const std::string &errorMsg) int main(int argc, char** argv) { - typedef TTAG(Forchheimer1pProblem) ProblemTypeTag; + using ProblemTypeTag = TTAG(Forchheimer1pProblem); return Dumux::start<ProblemTypeTag>(argc, argv, usage); } diff --git a/test/porousmediumflow/mpnc/implicit/test_forchheimer2p.cc b/test/porousmediumflow/mpnc/implicit/test_forchheimer2p.cc index b1f9b6552c..51df73295c 100644 --- a/test/porousmediumflow/mpnc/implicit/test_forchheimer2p.cc +++ b/test/porousmediumflow/mpnc/implicit/test_forchheimer2p.cc @@ -54,6 +54,6 @@ void usage(const char *progName, const std::string &errorMsg) int main(int argc, char** argv) { - typedef TTAG(Forchheimer2pProblem) ProblemTypeTag; + using ProblemTypeTag = TTAG(Forchheimer2pProblem); return Dumux::start<ProblemTypeTag>(argc, argv, usage); } diff --git a/test/porousmediumflow/richards/implicit/richardsanalyticalspatialparams.hh b/test/porousmediumflow/richards/implicit/richardsanalyticalspatialparams.hh index 2e2c179fe6..7cf64bcc94 100644 --- a/test/porousmediumflow/richards/implicit/richardsanalyticalspatialparams.hh +++ b/test/porousmediumflow/richards/implicit/richardsanalyticalspatialparams.hh @@ -52,10 +52,10 @@ SET_TYPE_PROP(RichardsAnalyticalSpatialParams, SpatialParams, RichardsAnalytical SET_PROP(RichardsAnalyticalSpatialParams, MaterialLaw) { private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef LinearMaterial<Scalar> EffectiveLaw; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using EffectiveLaw = LinearMaterial<Scalar>; public: - typedef EffToAbsLaw<EffectiveLaw> type; + using type = EffToAbsLaw<EffectiveLaw>; }; } diff --git a/test/porousmediumflow/richards/implicit/richardsniconductionproblem.hh b/test/porousmediumflow/richards/implicit/richardsniconductionproblem.hh index b47812c3ed..9455596e89 100644 --- a/test/porousmediumflow/richards/implicit/richardsniconductionproblem.hh +++ b/test/porousmediumflow/richards/implicit/richardsniconductionproblem.hh @@ -106,7 +106,7 @@ class RichardsNIConductionProblem :public PorousMediumFlowProblem<TypeTag> using IapwsH2O = H2O<Scalar>; // copy some indices for convenience - typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; + using Indices = typename GET_PROP_TYPE(TypeTag, Indices); enum { // world dimension dimWorld = GridView::dimensionworld @@ -123,10 +123,10 @@ class RichardsNIConductionProblem :public PorousMediumFlowProblem<TypeTag> energyEqIdx = Indices::energyEqIdx }; - typedef typename GridView::template Codim<0>::Entity Element; - typedef typename GridView::Intersection Intersection; + using Element = typename GridView::template Codim<0>::Entity; + using Intersection = typename GridView::Intersection; - typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; + using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>; public: RichardsNIConductionProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry) diff --git a/test/porousmediumflow/richards/implicit/richardsniconvectionproblem.hh b/test/porousmediumflow/richards/implicit/richardsniconvectionproblem.hh index 5bcd29111c..be2eea3543 100644 --- a/test/porousmediumflow/richards/implicit/richardsniconvectionproblem.hh +++ b/test/porousmediumflow/richards/implicit/richardsniconvectionproblem.hh @@ -111,7 +111,7 @@ class RichardsNIConvectionProblem : public PorousMediumFlowProblem<TypeTag> using IapwsH2O = H2O<Scalar>; // copy some indices for convenience - typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; + using Indices = typename GET_PROP_TYPE(TypeTag, Indices); enum { // world dimension dimWorld = GridView::dimensionworld @@ -128,10 +128,10 @@ class RichardsNIConvectionProblem : public PorousMediumFlowProblem<TypeTag> energyEqIdx = Indices::energyEqIdx }; - typedef typename GridView::template Codim<0>::Entity Element; - typedef typename GridView::Intersection Intersection; + using Element = typename GridView::template Codim<0>::Entity; + using Intersection = typename GridView::Intersection; - typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; + using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>; public: RichardsNIConvectionProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry) diff --git a/test/porousmediumflow/richards/implicit/richardsnispatialparams.hh b/test/porousmediumflow/richards/implicit/richardsnispatialparams.hh index fef5226895..62fc1accf5 100644 --- a/test/porousmediumflow/richards/implicit/richardsnispatialparams.hh +++ b/test/porousmediumflow/richards/implicit/richardsnispatialparams.hh @@ -58,11 +58,11 @@ SET_PROP(RichardsNISpatialParams, MaterialLaw) private: // define the material law which is parameterized by effective // saturations - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef RegularizedVanGenuchten<Scalar> EffectiveLaw; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using EffectiveLaw = RegularizedVanGenuchten<Scalar>; public: // define the material law parameterized by absolute saturations - typedef EffToAbsLaw<EffectiveLaw> type; + using type = EffToAbsLaw<EffectiveLaw>; }; } @@ -87,7 +87,7 @@ class RichardsNISpatialParams : public FVSpatialParams<TypeTag> using CoordScalar = typename Grid::ctype; using GlobalPosition = Dune::FieldVector<CoordScalar,dimWorld>; - //typedef LinearMaterial<Scalar> EffMaterialLaw; + //using EffMaterialLaw = LinearMaterial<Scalar>; public: // export permeability type using PermeabilityType = Scalar; -- GitLab