[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

@@ -92,10 +92,10 @@ template<class TypeTag>
struct WettingPhase<TypeTag, TTag::FingerBaseProblem>
{
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
@@ -103,25 +103,25 @@ template<class TypeTag>
struct NonwettingPhase<TypeTag, TTag::FingerBaseProblem>
{
private:
typedef GetPropType<TypeTag, Properties::Scalar> Scalar;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
public:
typedef Opm::GasPhase<Scalar, Opm::Air<Scalar> > type;
using type = Opm::GasPhase<Scalar, Opm::Air<Scalar> >;
};
// Set the material Law
template<class TypeTag>
struct MaterialLaw<TypeTag, TTag::FingerBaseProblem>
{
typedef GetPropType<TypeTag, Properties::Scalar> Scalar;
typedef GetPropType<TypeTag, Properties::FluidSystem> FluidSystem;
typedef Opm::TwoPhaseMaterialTraits<Scalar,
/*wettingPhaseIdx=*/FluidSystem::wettingPhaseIdx,
/*nonWettingPhaseIdx=*/FluidSystem::nonWettingPhaseIdx> Traits;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
using Traits = Opm::TwoPhaseMaterialTraits<Scalar,
/*wettingPhaseIdx=*/FluidSystem::wettingPhaseIdx,
/*nonWettingPhaseIdx=*/FluidSystem::nonWettingPhaseIdx>;
// use the parker-lenhard hysteresis law
typedef Opm::ParkerLenhard<Traits> ParkerLenhard;
typedef ParkerLenhard type;
using ParkerLenhard = Opm::ParkerLenhard<Traits>;
using type = ParkerLenhard;
};
// Write the solutions of individual newton iterations?
@@ -213,18 +213,18 @@ template <class TypeTag>
class FingerProblem : public GetPropType<TypeTag, Properties::BaseProblem>
{
//!\cond SKIP_THIS
typedef GetPropType<TypeTag, Properties::BaseProblem> ParentType;
using ParentType = GetPropType<TypeTag, Properties::BaseProblem>;
typedef GetPropType<TypeTag, Properties::Scalar> Scalar;
typedef GetPropType<TypeTag, Properties::GridView> GridView;
typedef GetPropType<TypeTag, Properties::Indices> Indices;
typedef GetPropType<TypeTag, Properties::FluidSystem> FluidSystem;
typedef GetPropType<TypeTag, Properties::WettingPhase> WettingPhase;
typedef GetPropType<TypeTag, Properties::NonwettingPhase> NonwettingPhase;
typedef GetPropType<TypeTag, Properties::PrimaryVariables> PrimaryVariables;
typedef GetPropType<TypeTag, Properties::Simulator> Simulator;
typedef GetPropType<TypeTag, Properties::Constraints> Constraints;
typedef GetPropType<TypeTag, Properties::Model> Model;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using GridView = GetPropType<TypeTag, Properties::GridView>;
using Indices = GetPropType<TypeTag, Properties::Indices>;
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
using WettingPhase = GetPropType<TypeTag, Properties::WettingPhase>;
using NonwettingPhase = GetPropType<TypeTag, Properties::NonwettingPhase>;
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
using Constraints = GetPropType<TypeTag, Properties::Constraints>;
using Model = GetPropType<TypeTag, Properties::Model>;
enum {
// number of phases
@@ -242,28 +242,28 @@ class FingerProblem : public GetPropType<TypeTag, Properties::BaseProblem>
dimWorld = GridView::dimensionworld
};
typedef GetPropType<TypeTag, Properties::ElementContext> ElementContext;
typedef GetPropType<TypeTag, Properties::Stencil> Stencil;
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
using Stencil = GetPropType<TypeTag, Properties::Stencil> ;
enum { codim = Stencil::Entity::codimension };
typedef GetPropType<TypeTag, Properties::EqVector> EqVector;
typedef GetPropType<TypeTag, Properties::RateVector> RateVector;
typedef GetPropType<TypeTag, Properties::BoundaryRateVector> BoundaryRateVector;
using EqVector = GetPropType<TypeTag, Properties::EqVector>;
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
using BoundaryRateVector = GetPropType<TypeTag, Properties::BoundaryRateVector>;
typedef typename GetProp<TypeTag, Properties::MaterialLaw>::ParkerLenhard ParkerLenhard;
typedef GetPropType<TypeTag, Properties::MaterialLaw> MaterialLaw;
typedef GetPropType<TypeTag, Properties::MaterialLawParams> MaterialLawParams;
using ParkerLenhard = typename GetProp<TypeTag, Properties::MaterialLaw>::ParkerLenhard;
using MaterialLaw = GetPropType<TypeTag, Properties::MaterialLaw>;
using MaterialLawParams = GetPropType<TypeTag, Properties::MaterialLawParams>;
typedef typename GridView::ctype CoordScalar;
typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition;
typedef Dune::FieldMatrix<Scalar, dimWorld, dimWorld> DimMatrix;
using CoordScalar = typename GridView::ctype;
using GlobalPosition = Dune::FieldVector<CoordScalar, dimWorld>;
using DimMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
typedef typename GridView :: Grid Grid;
using Grid = typename GridView :: Grid;
typedef Dune::PersistentContainer< Grid, std::shared_ptr< MaterialLawParams > > MaterialLawParamsContainer;
using MaterialLawParamsContainer = Dune::PersistentContainer< Grid, std::shared_ptr< MaterialLawParams > > ;
//!\endcond
public:
typedef CopyRestrictProlong< Grid, MaterialLawParamsContainer > RestrictProlongOperator;
using RestrictProlongOperator = CopyRestrictProlong< Grid, MaterialLawParamsContainer >;
/*!
* \copydoc Doxygen::defaultProblemConstructor