From 6b39d8147942b946b3ee661c496e493de044584c Mon Sep 17 00:00:00 2001
From: Bernd Flemisch <bernd@iws.uni-stuttgart.de>
Date: Sat, 16 Dec 2017 19:44:50 +0100
Subject: [PATCH] [io] replace typedef by using

---
 dumux/io/artgridcreator.hh    | 28 ++++++++++++++--------------
 dumux/io/cpgridcreator.hh     |  8 ++++----
 dumux/io/gnuplotinterface.hh  |  4 ++--
 dumux/io/gridcreator.hh       |  6 +++---
 dumux/io/vtkmultiwriter.hh    | 16 ++++++++--------
 dumux/io/vtknestedfunction.hh |  6 +++---
 6 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/dumux/io/artgridcreator.hh b/dumux/io/artgridcreator.hh
index 330be50946..2b135d81d0 100644
--- a/dumux/io/artgridcreator.hh
+++ b/dumux/io/artgridcreator.hh
@@ -56,15 +56,15 @@ NEW_PROP_TAG(GridCreator);
 template <class TypeTag>
 class ArtGridCreator
 {
-    typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
-    typedef typename GET_PROP_TYPE(TypeTag, Grid)  Grid;
-    typedef Grid* GridPointer;
-    typedef Dune::FieldVector<double, 3> Coordinates;
-    typedef std::vector<Coordinates> VerticesVector;
-    typedef Dune::FieldVector<int, 3> EdgePoints;
-    typedef std::vector<EdgePoints> EdgesVector;
-    typedef Dune::FieldVector<int, 4> Faces;
-    typedef std::vector<Faces> FacesVector;
+    using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
+    using Grid = typename GET_PROP_TYPE(TypeTag, Grid);
+    using GridPointer = Grid*;
+    using Coordinates = Dune::FieldVector<double, 3>;
+    using VerticesVector = std::vector<Coordinates>;
+    using EdgePoints = Dune::FieldVector<int, 3>;
+    using EdgesVector = std::vector<EdgePoints>;
+    using Faces = Dune::FieldVector<int, 4>;
+    using FacesVector = std::vector<Faces>;
 
 public:
     /*!
@@ -497,8 +497,8 @@ int ArtGridCreator<TypeTag>::elementNumber_;
 template<class TypeTag>
 class FractureMapper
 {
-    typedef typename GET_PROP_TYPE(TypeTag, GridView)  GridView;
-    typedef typename GET_PROP_TYPE(TypeTag, GridCreator)  GridCreator;
+    using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
+    using GridCreator = typename GET_PROP_TYPE(TypeTag, GridCreator);
 public:
     // mapper: one data element in every entity
     template<int dim>
@@ -509,10 +509,10 @@ public:
             return geomType.dim() == dim-1;
         }
     };
-    typedef typename GridView::ctype DT;
+    using DT = typename GridView::ctype;
     enum {dim = GridView::dimension};
-    typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView, FaceLayout> FaceMapper;
-    typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGVertexLayout> VertexMapper;
+    using FaceMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView, FaceLayout>;
+    using VertexMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGVertexLayout>;
 
 public:
     /*!
diff --git a/dumux/io/cpgridcreator.hh b/dumux/io/cpgridcreator.hh
index b14f47845b..69038a4729 100644
--- a/dumux/io/cpgridcreator.hh
+++ b/dumux/io/cpgridcreator.hh
@@ -47,10 +47,10 @@ NEW_PROP_TAG(Grid);
 template <class TypeTag>
 class CpGridCreator
 {
-    typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
-    typedef typename GET_PROP_TYPE(TypeTag, Grid)  Grid;
-    typedef std::shared_ptr<Grid> GridPointer;
-    typedef Opm::Deck Deck;
+    using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
+    using Grid = typename GET_PROP_TYPE(TypeTag, Grid);
+    using GridPointer = std::shared_ptr<Grid>;
+    using Deck = Opm::Deck;
 
 public:
     /*!
diff --git a/dumux/io/gnuplotinterface.hh b/dumux/io/gnuplotinterface.hh
index 94bbefd34b..58b0fd15b6 100644
--- a/dumux/io/gnuplotinterface.hh
+++ b/dumux/io/gnuplotinterface.hh
@@ -56,10 +56,10 @@ template<class Scalar>
 class GnuplotInterface
 {
 public:
-    typedef std::vector<std::string> StringVector;
+    using StringVector = std::vector<std::string>;
     enum class CurveType
     { function, file, data };
-    typedef std::vector<CurveType> CurveTypeVector;
+    using CurveTypeVector = std::vector<CurveType>;
 
     //! \brief The constructor
     GnuplotInterface(bool persist = true) :
diff --git a/dumux/io/gridcreator.hh b/dumux/io/gridcreator.hh
index 4aecba7485..139023ba19 100644
--- a/dumux/io/gridcreator.hh
+++ b/dumux/io/gridcreator.hh
@@ -1049,7 +1049,7 @@ class GridCreatorImpl<Dune::ALUGrid<dim, dimworld, elType, refinementType>, Disc
           : public GridCreatorBase<Dune::ALUGrid<dim, dimworld, elType, refinementType> >
 {
 public:
-    typedef typename Dune::ALUGrid<dim, dimworld, elType, refinementType> Grid;
+    using Grid = Dune::ALUGrid<dim, dimworld, elType, refinementType>;
     using ParentType = GridCreatorBase<Grid>;
 
     /*!
@@ -1126,7 +1126,7 @@ class GridCreatorImpl<Dune::FoamGrid<dim, dimworld>, DiscMethod>
           : public GridCreatorBase<Dune::FoamGrid<dim, dimworld> >
 {
 public:
-    typedef typename Dune::FoamGrid<dim, dimworld> Grid;
+    using Grid = Dune::FoamGrid<dim, dimworld>;
     using ParentType = GridCreatorBase<Grid>;
 
     /*!
@@ -1180,7 +1180,7 @@ class GridCreatorImpl<Dune::FoamGrid<1, dimworld>, DiscMethod>
           : public GridCreatorBase<Dune::FoamGrid<1, dimworld> >
 {
 public:
-    typedef typename Dune::FoamGrid<1, dimworld> Grid;
+    using Grid = Dune::FoamGrid<1, dimworld>;
     using ParentType = GridCreatorBase<Grid>;
 
     /*!
diff --git a/dumux/io/vtkmultiwriter.hh b/dumux/io/vtkmultiwriter.hh
index ff7dd942a4..38b3067849 100644
--- a/dumux/io/vtkmultiwriter.hh
+++ b/dumux/io/vtkmultiwriter.hh
@@ -61,14 +61,14 @@ class DUNE_DEPRECATED_MSG("Use VtkOutputModule instead!") VtkMultiWriter
 {
     enum { dim = GridView::dimension };
 #if DUNE_VERSION_NEWER(DUNE_COMMON,2,6)
-    typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView> VertexMapper;
-    typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView> ElementMapper;
+    using VertexMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>;
+    using ElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>;
 #else
-    typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGVertexLayout> VertexMapper;
-    typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGElementLayout> ElementMapper;
+    using VertexMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGVertexLayout>;
+    using ElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGElementLayout>;
 #endif
 public:
-    typedef Dune::VTKWriter<GridView> VtkWriter;
+    using VtkWriter = Dune::VTKWriter<GridView>;
     VtkMultiWriter(const GridView &gridView,
                    const std::string &simName = "",
                    std::string multiFileName = "")
@@ -149,7 +149,7 @@ public:
     template <class Scalar, int nComp>
     Dune::BlockVector<Dune::FieldVector<Scalar, nComp> > *allocateManagedBuffer(int nEntities)
     {
-        typedef Dune::BlockVector<Dune::FieldVector<Scalar, nComp> > VectorField;
+        using VectorField = Dune::BlockVector<Dune::FieldVector<Scalar, nComp> >;
 
         std::shared_ptr<ManagedVectorField_<VectorField> > vfs =
             std::make_shared<ManagedVectorField_<VectorField> >(nEntities);
@@ -186,7 +186,7 @@ public:
         sanitizeBuffer_(buf, nComps);
 
         using FunctionPtr = std::shared_ptr<const typename VtkWriter::VTKFunction>;
-        typedef VtkNestedFunction<GridView, VertexMapper, DataBuffer> VtkFn;
+        using VtkFn = VtkNestedFunction<GridView, VertexMapper, DataBuffer>;
         FunctionPtr fnPtr(new VtkFn(name,
                                     gridView_,
                                     vertexMapper_,
@@ -217,7 +217,7 @@ public:
         sanitizeBuffer_(buf, nComps);
 
         using FunctionPtr = std::shared_ptr<const typename VtkWriter::VTKFunction>;
-        typedef VtkNestedFunction<GridView, ElementMapper, DataBuffer> VtkFn;
+        using VtkFn = VtkNestedFunction<GridView, ElementMapper, DataBuffer>;
         FunctionPtr fnPtr(new VtkFn(name,
                                     gridView_,
                                     elementMapper_,
diff --git a/dumux/io/vtknestedfunction.hh b/dumux/io/vtknestedfunction.hh
index 45ee9fdf2e..389732a321 100644
--- a/dumux/io/vtknestedfunction.hh
+++ b/dumux/io/vtknestedfunction.hh
@@ -40,9 +40,9 @@ template <class GridView, class Mapper, class Buffer>
 class VtkNestedFunction : public Dune::VTKFunction<GridView>
 {
     enum { dim = GridView::dimension };
-    typedef typename GridView::ctype ctype;
-    typedef typename GridView::template Codim<0>::Entity Element;
-    typedef typename Dune::ReferenceElements<ctype, dim> ReferenceElements;
+    using ctype = typename GridView::ctype;
+    using Element = typename GridView::template Codim<0>::Entity;
+    using ReferenceElements = Dune::ReferenceElements<ctype, dim>;
 
 public:
     VtkNestedFunction(std::string name,
-- 
GitLab