[cleanup] replace typedef by using

This commit is contained in:
Bernd Flemisch
2020-06-10 13:49:42 +02:00
parent bdb7bac3e8
commit d72de0f308
224 changed files with 2232 additions and 2240 deletions

View File

@@ -91,10 +91,10 @@ template<class TypeTag>
struct WettingPhase<TypeTag, TTag::FractureProblem>
{
private:
typedef GetPropType<TypeTag, Properties::Scalar> Scalar;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
public:
typedef Opm::LiquidPhase<Scalar, Opm::SimpleH2O<Scalar> > type;
using type = Opm::LiquidPhase<Scalar, Opm::SimpleH2O<Scalar> >;
};
// Set the non-wetting phase
@@ -102,10 +102,10 @@ template<class TypeTag>
struct NonwettingPhase<TypeTag, TTag::FractureProblem>
{
private:
typedef GetPropType<TypeTag, Properties::Scalar> Scalar;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
public:
typedef Opm::LiquidPhase<Scalar, Opm::DNAPL<Scalar> > type;
using type = Opm::LiquidPhase<Scalar, Opm::DNAPL<Scalar> >;
};
// Set the material Law
@@ -113,23 +113,22 @@ template<class TypeTag>
struct MaterialLaw<TypeTag, TTag::FractureProblem>
{
private:
typedef GetPropType<TypeTag, Properties::FluidSystem> FluidSystem;
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
enum { wettingPhaseIdx = FluidSystem::wettingPhaseIdx };
enum { nonWettingPhaseIdx = FluidSystem::nonWettingPhaseIdx };
typedef GetPropType<TypeTag, Properties::Scalar> Scalar;
typedef Opm::TwoPhaseMaterialTraits<Scalar,
/*wettingPhaseIdx=*/FluidSystem::wettingPhaseIdx,
/*nonWettingPhaseIdx=*/FluidSystem::nonWettingPhaseIdx>
Traits;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using Traits = Opm::TwoPhaseMaterialTraits<Scalar,
/*wettingPhaseIdx=*/FluidSystem::wettingPhaseIdx,
/*nonWettingPhaseIdx=*/FluidSystem::nonWettingPhaseIdx>;
// define the material law which is parameterized by effective
// saturations
typedef Opm::RegularizedBrooksCorey<Traits> EffectiveLaw;
// typedef RegularizedVanGenuchten<Traits> EffectiveLaw;
// typedef LinearMaterial<Traits> EffectiveLaw;
using EffectiveLaw = Opm::RegularizedBrooksCorey<Traits>;
// using EffectiveLaw = RegularizedVanGenuchten<Traits>;
// using EffectiveLaw = LinearMaterial<Traits>;
public:
typedef Opm::EffToAbsLaw<EffectiveLaw> type;
using type = Opm::EffToAbsLaw<EffectiveLaw>;
};
// Enable the energy equation
@@ -141,12 +140,12 @@ template<class TypeTag>
struct ThermalConductionLaw<TypeTag, TTag::FractureProblem>
{
private:
typedef GetPropType<TypeTag, Properties::Scalar> Scalar;
typedef GetPropType<TypeTag, Properties::FluidSystem> FluidSystem;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
public:
// define the material law parameterized by absolute saturations
typedef Opm::SomertonThermalConductionLaw<FluidSystem, Scalar> type;
using type = Opm::SomertonThermalConductionLaw<FluidSystem, Scalar>;
};
// set the energy storage law for the solid phase
@@ -200,23 +199,23 @@ namespace Opm {
template <class TypeTag>
class FractureProblem : public GetPropType<TypeTag, Properties::BaseProblem>
{
typedef GetPropType<TypeTag, Properties::BaseProblem> ParentType;
typedef GetPropType<TypeTag, Properties::GridView> GridView;
typedef GetPropType<TypeTag, Properties::FluidSystem> FluidSystem;
typedef GetPropType<TypeTag, Properties::WettingPhase> WettingPhase;
typedef GetPropType<TypeTag, Properties::NonwettingPhase> NonwettingPhase;
typedef GetPropType<TypeTag, Properties::Constraints> Constraints;
typedef GetPropType<TypeTag, Properties::EqVector> EqVector;
typedef GetPropType<TypeTag, Properties::PrimaryVariables> PrimaryVariables;
typedef GetPropType<TypeTag, Properties::BoundaryRateVector> BoundaryRateVector;
typedef GetPropType<TypeTag, Properties::RateVector> RateVector;
typedef GetPropType<TypeTag, Properties::Simulator> Simulator;
typedef GetPropType<TypeTag, Properties::Scalar> Scalar;
typedef GetPropType<TypeTag, Properties::MaterialLaw> MaterialLaw;
typedef GetPropType<TypeTag, Properties::MaterialLawParams> MaterialLawParams;
typedef GetPropType<TypeTag, Properties::ThermalConductionLawParams> ThermalConductionLawParams;
typedef GetPropType<TypeTag, Properties::SolidEnergyLawParams> SolidEnergyLawParams;
typedef GetPropType<TypeTag, Properties::Model> Model;
using ParentType = GetPropType<TypeTag, Properties::BaseProblem>;
using GridView = GetPropType<TypeTag, Properties::GridView>;
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
using WettingPhase = GetPropType<TypeTag, Properties::WettingPhase>;
using NonwettingPhase = GetPropType<TypeTag, Properties::NonwettingPhase>;
using Constraints = GetPropType<TypeTag, Properties::Constraints>;
using EqVector = GetPropType<TypeTag, Properties::EqVector>;
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
using BoundaryRateVector = GetPropType<TypeTag, Properties::BoundaryRateVector>;
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using MaterialLaw = GetPropType<TypeTag, Properties::MaterialLaw>;
using MaterialLawParams = GetPropType<TypeTag, Properties::MaterialLawParams>;
using ThermalConductionLawParams = GetPropType<TypeTag, Properties::ThermalConductionLawParams>;
using SolidEnergyLawParams = GetPropType<TypeTag, Properties::SolidEnergyLawParams>;
using Model = GetPropType<TypeTag, Properties::Model>;
enum {
// phase indices
@@ -231,10 +230,10 @@ class FractureProblem : public GetPropType<TypeTag, Properties::BaseProblem>
dimWorld = GridView::dimensionworld
};
typedef Opm::ImmiscibleFluidState<Scalar, FluidSystem> FluidState;
using FluidState = Opm::ImmiscibleFluidState<Scalar, FluidSystem>;
typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition;
typedef Dune::FieldMatrix<Scalar, dimWorld, dimWorld> DimMatrix;
using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>;
using DimMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
template <int dim>
struct FaceLayout
@@ -242,9 +241,9 @@ class FractureProblem : public GetPropType<TypeTag, Properties::BaseProblem>
bool contains(Dune::GeometryType gt)
{ return gt.dim() == dim - 1; }
};
typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView, FaceLayout> FaceMapper;
using FaceMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView, FaceLayout>;
typedef Opm::FractureMapper<TypeTag> FractureMapper;
using FractureMapper = Opm::FractureMapper<TypeTag>;
public:
/*!