From 3e19f7622b1193c8b55a266a46dd31e5ad546aaa Mon Sep 17 00:00:00 2001 From: Bernd Flemisch <bernd@iws.uni-stuttgart.de> Date: Sat, 16 Dec 2017 19:46:50 +0100 Subject: [PATCH] [mixeddimension] replace typedef by using --- .../embedded/cellcentered/pointsourcedata.hh | 32 ++++++------- .../mixeddimension/integrationpointsource.hh | 20 ++++---- dumux/mixeddimension/model.hh | 48 +++++++++---------- dumux/mixeddimension/problem.hh | 34 ++++++------- dumux/mixeddimension/properties.hh | 38 +++++++-------- 5 files changed, 86 insertions(+), 86 deletions(-) diff --git a/dumux/mixeddimension/embedded/cellcentered/pointsourcedata.hh b/dumux/mixeddimension/embedded/cellcentered/pointsourcedata.hh index d66a700c9e..f0dd5ad8d1 100644 --- a/dumux/mixeddimension/embedded/cellcentered/pointsourcedata.hh +++ b/dumux/mixeddimension/embedded/cellcentered/pointsourcedata.hh @@ -46,18 +46,18 @@ NEW_PROP_TAG(PrimaryVariables); template<class TypeTag> class PointSourceData { - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename std::vector<Dune::FieldVector<Scalar, 1> > ShapeValues; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using ShapeValues = typename std::vector<Dune::FieldVector<Scalar, 1> >; // obtain the type tags of the sub problems - typedef typename GET_PROP_TYPE(TypeTag, BulkProblemTypeTag) BulkProblemTypeTag; - typedef typename GET_PROP_TYPE(TypeTag, LowDimProblemTypeTag) LowDimProblemTypeTag; + using BulkProblemTypeTag = typename GET_PROP_TYPE(TypeTag, BulkProblemTypeTag); + using LowDimProblemTypeTag = typename GET_PROP_TYPE(TypeTag, LowDimProblemTypeTag); - typedef typename GET_PROP_TYPE(BulkProblemTypeTag, PrimaryVariables) BulkPrimaryVariables; - typedef typename GET_PROP_TYPE(LowDimProblemTypeTag, PrimaryVariables) LowDimPrimaryVariables; + using BulkPrimaryVariables = typename GET_PROP_TYPE(BulkProblemTypeTag, PrimaryVariables); + using LowDimPrimaryVariables = typename GET_PROP_TYPE(LowDimProblemTypeTag, PrimaryVariables); - typedef typename GET_PROP_TYPE(BulkProblemTypeTag, SolutionVector) BulkSolutionVector; - typedef typename GET_PROP_TYPE(LowDimProblemTypeTag, SolutionVector) LowDimSolutionVector; + using BulkSolutionVector = typename GET_PROP_TYPE(BulkProblemTypeTag, SolutionVector); + using LowDimSolutionVector = typename GET_PROP_TYPE(LowDimProblemTypeTag, SolutionVector); enum { bulkIsBox = GET_PROP_VALUE(BulkProblemTypeTag, ImplicitIsBox), @@ -153,18 +153,18 @@ template<class TypeTag> class PointSourceDataCircleAverage : public PointSourceData<TypeTag> { using ParentType = PointSourceData<TypeTag>; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename std::vector<Dune::FieldVector<Scalar, 1> > ShapeValues; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using ShapeValues = typename std::vector<Dune::FieldVector<Scalar, 1> >; // obtain the type tags of the sub problems - typedef typename GET_PROP_TYPE(TypeTag, BulkProblemTypeTag) BulkProblemTypeTag; - typedef typename GET_PROP_TYPE(TypeTag, LowDimProblemTypeTag) LowDimProblemTypeTag; + using BulkProblemTypeTag = typename GET_PROP_TYPE(TypeTag, BulkProblemTypeTag); + using LowDimProblemTypeTag = typename GET_PROP_TYPE(TypeTag, LowDimProblemTypeTag); - typedef typename GET_PROP_TYPE(BulkProblemTypeTag, PrimaryVariables) BulkPrimaryVariables; - typedef typename GET_PROP_TYPE(LowDimProblemTypeTag, PrimaryVariables) LowDimPrimaryVariables; + using BulkPrimaryVariables = typename GET_PROP_TYPE(BulkProblemTypeTag, PrimaryVariables); + using LowDimPrimaryVariables = typename GET_PROP_TYPE(LowDimProblemTypeTag, PrimaryVariables); - typedef typename GET_PROP_TYPE(BulkProblemTypeTag, SolutionVector) BulkSolutionVector; - typedef typename GET_PROP_TYPE(LowDimProblemTypeTag, SolutionVector) LowDimSolutionVector; + using BulkSolutionVector = typename GET_PROP_TYPE(BulkProblemTypeTag, SolutionVector); + using LowDimSolutionVector = typename GET_PROP_TYPE(LowDimProblemTypeTag, SolutionVector); enum { bulkIsBox = GET_PROP_VALUE(BulkProblemTypeTag, ImplicitIsBox), diff --git a/dumux/mixeddimension/integrationpointsource.hh b/dumux/mixeddimension/integrationpointsource.hh index 74682cbef4..ecc268ba30 100644 --- a/dumux/mixeddimension/integrationpointsource.hh +++ b/dumux/mixeddimension/integrationpointsource.hh @@ -40,13 +40,13 @@ namespace Dumux template<class TypeTag, typename IdType> class IntegrationPointSource : public Dumux::IdPointSource<TypeTag, IdType> { - typedef typename Dumux::IdPointSource<TypeTag, IdType> 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; + using ParentType = Dumux::IdPointSource<TypeTag, IdType>; + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); static const int dimworld = GridView::dimensionworld; - typedef typename Dune::FieldVector<Scalar, dimworld> GlobalPosition; + using GlobalPosition = Dune::FieldVector<Scalar, dimworld>; public: //! Constructor for integration point sources @@ -109,15 +109,15 @@ private: template<class TypeTag> class IntegrationPointSourceHelper { - typedef typename GET_PROP_TYPE(TypeTag, Problem) Problem; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry; - typedef typename GET_PROP_TYPE(TypeTag, PointSource) PointSource; + using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry); + using PointSource = typename GET_PROP_TYPE(TypeTag, PointSource); static const int dim = GridView::dimension; static const int dimworld = GridView::dimensionworld; - typedef Dumux::BoundingBoxTree<GridView> BoundingBoxTree; + using BoundingBoxTree = Dumux::BoundingBoxTree<GridView>; enum { isBox = GET_PROP_VALUE(TypeTag, ImplicitIsBox) }; enum { dofCodim = isBox ? dim : 0 }; diff --git a/dumux/mixeddimension/model.hh b/dumux/mixeddimension/model.hh index 4b5c109636..bc806d1393 100644 --- a/dumux/mixeddimension/model.hh +++ b/dumux/mixeddimension/model.hh @@ -44,32 +44,32 @@ namespace Dumux template<class TypeTag> class MixedDimensionModel { - typedef typename GET_PROP_TYPE(TypeTag, Model) Implementation; - typedef typename GET_PROP_TYPE(TypeTag, Problem) Problem; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, SolutionVector) SolutionVector; - typedef typename GET_PROP_TYPE(TypeTag, JacobianAssembler) JacobianAssembler; - typedef typename GET_PROP_TYPE(TypeTag, BulkLocalJacobian) BulkLocalJacobian; - typedef typename GET_PROP_TYPE(TypeTag, LowDimLocalJacobian) LowDimLocalJacobian; - typedef typename GET_PROP_TYPE(TypeTag, NewtonMethod) NewtonMethod; - typedef typename GET_PROP_TYPE(TypeTag, NewtonController) NewtonController; - typedef typename GET_PROP(TypeTag, SubProblemBlockIndices) SubProblemBlockIndices; + using Implementation = typename GET_PROP_TYPE(TypeTag, Model); + using Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector); + using JacobianAssembler = typename GET_PROP_TYPE(TypeTag, JacobianAssembler); + using BulkLocalJacobian = typename GET_PROP_TYPE(TypeTag, BulkLocalJacobian); + using LowDimLocalJacobian = typename GET_PROP_TYPE(TypeTag, LowDimLocalJacobian); + using NewtonMethod = typename GET_PROP_TYPE(TypeTag, NewtonMethod); + using NewtonController = typename GET_PROP_TYPE(TypeTag, NewtonController); + using SubProblemBlockIndices = typename GET_PROP(TypeTag, SubProblemBlockIndices); // obtain the type tags of the sub problems - typedef typename GET_PROP_TYPE(TypeTag, BulkProblemTypeTag) BulkProblemTypeTag; - typedef typename GET_PROP_TYPE(TypeTag, LowDimProblemTypeTag) LowDimProblemTypeTag; + using BulkProblemTypeTag = typename GET_PROP_TYPE(TypeTag, BulkProblemTypeTag); + using LowDimProblemTypeTag = typename GET_PROP_TYPE(TypeTag, LowDimProblemTypeTag); - typedef typename GET_PROP_TYPE(BulkProblemTypeTag, GridView) BulkGridView; - typedef typename GET_PROP_TYPE(LowDimProblemTypeTag, GridView) LowDimGridView; + using BulkGridView = typename GET_PROP_TYPE(BulkProblemTypeTag, GridView); + using LowDimGridView = typename GET_PROP_TYPE(LowDimProblemTypeTag, GridView); - typedef typename GET_PROP_TYPE(BulkProblemTypeTag, LocalResidual) BulkLocalResidual; - typedef typename GET_PROP_TYPE(LowDimProblemTypeTag, LocalResidual) LowDimLocalResidual; + using BulkLocalResidual = typename GET_PROP_TYPE(BulkProblemTypeTag, LocalResidual); + using LowDimLocalResidual = typename GET_PROP_TYPE(LowDimProblemTypeTag, LocalResidual); - typedef typename GET_PROP_TYPE(BulkProblemTypeTag, VertexMapper) BulkVertexMapper; - typedef typename GET_PROP_TYPE(LowDimProblemTypeTag, VertexMapper) LowDimVertexMapper; + using BulkVertexMapper = typename GET_PROP_TYPE(BulkProblemTypeTag, VertexMapper); + using LowDimVertexMapper = typename GET_PROP_TYPE(LowDimProblemTypeTag, VertexMapper); - typedef typename GET_PROP_TYPE(BulkProblemTypeTag, ElementMapper) BulkElementMapper; - typedef typename GET_PROP_TYPE(LowDimProblemTypeTag, ElementMapper) LowDimElementMapper; + using BulkElementMapper = typename GET_PROP_TYPE(BulkProblemTypeTag, ElementMapper); + using LowDimElementMapper = typename GET_PROP_TYPE(LowDimProblemTypeTag, ElementMapper); enum { bulkDim = BulkGridView::dimension, @@ -87,11 +87,11 @@ class MixedDimensionModel typename SubProblemBlockIndices::BulkIdx bulkIdx; typename SubProblemBlockIndices::LowDimIdx lowDimIdx; - typedef typename BulkGridView::template Codim<0>::Entity BulkElement; - typedef typename LowDimGridView::template Codim<0>::Entity LowDimElement; + using BulkElement = typename BulkGridView::template Codim<0>::Entity; + using LowDimElement = typename LowDimGridView::template Codim<0>::Entity; - typedef typename Dune::ReferenceElements<Scalar, bulkDim> BulkReferenceElements; - typedef typename Dune::ReferenceElements<Scalar, lowDimDim> LowDimReferenceElements; + using BulkReferenceElements = Dune::ReferenceElements<Scalar, bulkDim>; + using LowDimReferenceElements = Dune::ReferenceElements<Scalar, lowDimDim>; public: // copying a model is not a good idea diff --git a/dumux/mixeddimension/problem.hh b/dumux/mixeddimension/problem.hh index 7249d139aa..d3dc407a73 100644 --- a/dumux/mixeddimension/problem.hh +++ b/dumux/mixeddimension/problem.hh @@ -41,30 +41,30 @@ namespace Dumux template<class TypeTag> class MixedDimensionProblem { - typedef typename GET_PROP_TYPE(TypeTag, Problem) Implementation; - typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, CouplingManager) CouplingManager; - typedef typename GET_PROP_TYPE(TypeTag, NewtonMethod) NewtonMethod; - typedef typename GET_PROP_TYPE(TypeTag, NewtonController) NewtonController; - typedef typename GET_PROP_TYPE(TypeTag, Model) Model; + using Implementation = typename GET_PROP_TYPE(TypeTag, Problem); + using TimeManager = typename GET_PROP_TYPE(TypeTag, TimeManager); + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using CouplingManager = typename GET_PROP_TYPE(TypeTag, CouplingManager); + using NewtonMethod = typename GET_PROP_TYPE(TypeTag, NewtonMethod); + using NewtonController = typename GET_PROP_TYPE(TypeTag, NewtonController); + using Model = typename GET_PROP_TYPE(TypeTag, Model); // obtain the type tags of the sub problems - typedef typename GET_PROP_TYPE(TypeTag, BulkProblemTypeTag) BulkProblemTypeTag; - typedef typename GET_PROP_TYPE(TypeTag, LowDimProblemTypeTag) LowDimProblemTypeTag; + using BulkProblemTypeTag = typename GET_PROP_TYPE(TypeTag, BulkProblemTypeTag); + using LowDimProblemTypeTag = typename GET_PROP_TYPE(TypeTag, LowDimProblemTypeTag); // obtain types from the sub problem type tags - typedef typename GET_PROP_TYPE(BulkProblemTypeTag, Problem) BulkProblem; - typedef typename GET_PROP_TYPE(LowDimProblemTypeTag, Problem) LowDimProblem; + using BulkProblem = typename GET_PROP_TYPE(BulkProblemTypeTag, Problem); + using LowDimProblem = typename GET_PROP_TYPE(LowDimProblemTypeTag, Problem); - typedef typename GET_PROP_TYPE(BulkProblemTypeTag, TimeManager) BulkTimeManager; - typedef typename GET_PROP_TYPE(LowDimProblemTypeTag, TimeManager) LowDimTimeManager; + using BulkTimeManager = typename GET_PROP_TYPE(BulkProblemTypeTag, TimeManager); + using LowDimTimeManager = typename GET_PROP_TYPE(LowDimProblemTypeTag, TimeManager); - typedef typename GET_PROP_TYPE(BulkProblemTypeTag, GridView) BulkGridView; - typedef typename GET_PROP_TYPE(LowDimProblemTypeTag, GridView) LowDimGridView; + using BulkGridView = typename GET_PROP_TYPE(BulkProblemTypeTag, GridView); + using LowDimGridView = typename GET_PROP_TYPE(LowDimProblemTypeTag, GridView); - typedef typename GET_PROP_TYPE(BulkProblemTypeTag, SolutionVector) BulkSolutionVector; - typedef typename GET_PROP_TYPE(LowDimProblemTypeTag, SolutionVector) LowDimSolutionVector; + using BulkSolutionVector = typename GET_PROP_TYPE(BulkProblemTypeTag, SolutionVector); + using LowDimSolutionVector = typename GET_PROP_TYPE(LowDimProblemTypeTag, SolutionVector); public: MixedDimensionProblem(TimeManager &timeManager, diff --git a/dumux/mixeddimension/properties.hh b/dumux/mixeddimension/properties.hh index db98cd1d08..0fb5e7fe68 100644 --- a/dumux/mixeddimension/properties.hh +++ b/dumux/mixeddimension/properties.hh @@ -122,21 +122,21 @@ SET_BOOL_PROP(MixedDimension, MixedDimensionUseIterativeSolver, false); SET_PROP(MixedDimension, SolutionVector) { private: - typedef typename GET_PROP_TYPE(TypeTag, BulkProblemTypeTag) BulkProblemTypeTag; - typedef typename GET_PROP_TYPE(TypeTag, LowDimProblemTypeTag) LowDimProblemTypeTag; + using BulkProblemTypeTag = typename GET_PROP_TYPE(TypeTag, BulkProblemTypeTag); + using LowDimProblemTypeTag = typename GET_PROP_TYPE(TypeTag, LowDimProblemTypeTag); public: - typedef typename GET_PROP_TYPE(BulkProblemTypeTag, SolutionVector) SolutionVectorBulk; - typedef typename GET_PROP_TYPE(LowDimProblemTypeTag, SolutionVector) SolutionVectorLowDim; - typedef typename Dune::MultiTypeBlockVector<SolutionVectorBulk, SolutionVectorLowDim> type; + using SolutionVectorBulk = typename GET_PROP_TYPE(BulkProblemTypeTag, SolutionVector); + using SolutionVectorLowDim = typename GET_PROP_TYPE(LowDimProblemTypeTag, SolutionVector); + using type = Dune::MultiTypeBlockVector<SolutionVectorBulk, SolutionVectorLowDim>; }; //! Set the type of a global jacobian matrix from the solution types SET_PROP(MixedDimension, JacobianMatrix) { private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, BulkProblemTypeTag) BulkProblemTypeTag; - typedef typename GET_PROP_TYPE(TypeTag, LowDimProblemTypeTag) LowDimProblemTypeTag; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using BulkProblemTypeTag = typename GET_PROP_TYPE(TypeTag, BulkProblemTypeTag); + using LowDimProblemTypeTag = typename GET_PROP_TYPE(TypeTag, LowDimProblemTypeTag); enum { numEqBulk = GET_PROP_VALUE(BulkProblemTypeTag, NumEq), numEqLowDim = GET_PROP_VALUE(LowDimProblemTypeTag, NumEq) @@ -144,23 +144,23 @@ private: public: // the sub-blocks - typedef typename Dune::FieldMatrix<Scalar, numEqBulk, numEqBulk> MatrixLittleBlockBulk; - typedef typename Dune::FieldMatrix<Scalar, numEqBulk, numEqLowDim> MatrixLittleBlockBulkCoupling; - typedef typename Dune::FieldMatrix<Scalar, numEqLowDim, numEqLowDim> MatrixLittleBlockLowDim; - typedef typename Dune::FieldMatrix<Scalar, numEqLowDim, numEqBulk> MatrixLittleBlockLowDimCoupling; + using MatrixLittleBlockBulk = Dune::FieldMatrix<Scalar, numEqBulk, numEqBulk>; + using MatrixLittleBlockBulkCoupling = Dune::FieldMatrix<Scalar, numEqBulk, numEqLowDim>; + using MatrixLittleBlockLowDim = Dune::FieldMatrix<Scalar, numEqLowDim, numEqLowDim>; + using MatrixLittleBlockLowDimCoupling = Dune::FieldMatrix<Scalar, numEqLowDim, numEqBulk>; // the BCRS matrices of the subproblems as big blocks - typedef typename Dune::BCRSMatrix<MatrixLittleBlockBulk> MatrixBlockBulk; - typedef typename Dune::BCRSMatrix<MatrixLittleBlockBulkCoupling> MatrixBlockBulkCoupling; - typedef typename Dune::BCRSMatrix<MatrixLittleBlockLowDim> MatrixBlockLowDim; - typedef typename Dune::BCRSMatrix<MatrixLittleBlockLowDimCoupling> MatrixBlockLowDimCoupling; + using MatrixBlockBulk = Dune::BCRSMatrix<MatrixLittleBlockBulk>; + using MatrixBlockBulkCoupling = Dune::BCRSMatrix<MatrixLittleBlockBulkCoupling>; + using MatrixBlockLowDim = Dune::BCRSMatrix<MatrixLittleBlockLowDim>; + using MatrixBlockLowDimCoupling = Dune::BCRSMatrix<MatrixLittleBlockLowDimCoupling>; // the row types - typedef typename Dune::MultiTypeBlockVector<MatrixBlockBulk, MatrixBlockBulkCoupling> RowBulk; - typedef typename Dune::MultiTypeBlockVector<MatrixBlockLowDimCoupling, MatrixBlockLowDim> RowLowDim; + using RowBulk = Dune::MultiTypeBlockVector<MatrixBlockBulk, MatrixBlockBulkCoupling>; + using RowLowDim = Dune::MultiTypeBlockVector<MatrixBlockLowDimCoupling, MatrixBlockLowDim>; // the jacobian matrix - typedef typename Dune::MultiTypeBlockMatrix<RowBulk, RowLowDim> type; + using type = Dune::MultiTypeBlockMatrix<RowBulk, RowLowDim>; }; //! Definition of the indices of the subproblems in the global solution vector -- GitLab