diff --git a/dumux/common/boundingboxtree.hh b/dumux/common/boundingboxtree.hh index fe9ee19ad692f8d16ce1fd98ad0dec5360ba1074..1b6f24f37d9030720e76f5d4e4aadb379d969ef4 100644 --- a/dumux/common/boundingboxtree.hh +++ b/dumux/common/boundingboxtree.hh @@ -48,7 +48,7 @@ class BoundingBoxTreeHelper<3> { // An epsilon for floating point operations static constexpr double eps_ = 1.0e-7; - typedef Dune::FieldVector<double, 3> GlobalPosition; + using GlobalPosition = Dune::FieldVector<double, 3>; public: //! Check whether a point is inside a given three-dimensional geometry @@ -449,7 +449,7 @@ class BoundingBoxTreeHelper<2> { // An epsilon for floating point operations static constexpr double eps_ = 1.0e-7; - typedef Dune::FieldVector<double, 2> GlobalPosition; + using GlobalPosition = Dune::FieldVector<double, 2>; public: // Check whether a point is inside a given geometry @@ -663,7 +663,7 @@ class BoundingBoxTreeHelper<1> { // An epsilon for floating point operations static constexpr double eps_ = 1.0e-7; - typedef Dune::FieldVector<double, 1> GlobalPosition; + using GlobalPosition = Dune::FieldVector<double, 1>; public: // Check whether a point is inside a given geometry @@ -832,8 +832,8 @@ template <class GridView> class IndexToElementMap : public std::vector<typename GridView::Traits::Grid::template Codim<0>::EntitySeed> { - typedef typename GridView::Traits::Grid Grid; - typedef typename GridView::template Codim<0>::Entity Element; + using Grid = typename GridView::Traits::Grid; + using Element = typename GridView::template Codim<0>::Entity; public: IndexToElementMap(const GridView& gridView) : grid_(gridView.grid()) {} diff --git a/dumux/common/fixedlengthspline_.hh b/dumux/common/fixedlengthspline_.hh index bb939e5a183e00ebe2a970521a4fe31fc0102e06..0341b222526a00ed2d00e638fe9aa26f1cc95e8a 100644 --- a/dumux/common/fixedlengthspline_.hh +++ b/dumux/common/fixedlengthspline_.hh @@ -42,10 +42,10 @@ class FixedLengthSpline_ { friend class SplineCommon_<ScalarT, FixedLengthSpline_<ScalarT, nSamples> >; - typedef ScalarT Scalar; - typedef Dune::FieldVector<Scalar, nSamples> Vector; - typedef Dune::BlockVector<Dune::FieldVector<Scalar, 1> > BlockVector; - typedef Dune::BTDMatrix<Dune::FieldMatrix<Scalar, 1, 1> > BTDMatrix; + using Scalar = ScalarT; + using Vector = Dune::FieldVector<Scalar, nSamples>; + using BlockVector = Dune::BlockVector<Dune::FieldVector<Scalar, 1> >; + using BTDMatrix = Dune::BTDMatrix<Dune::FieldMatrix<Scalar, 1, 1> >; protected: FixedLengthSpline_() diff --git a/dumux/common/fvproblem.hh b/dumux/common/fvproblem.hh index e31305bde91dadbb7572e209ab19f06c4f4910f8..15819a5eaa825d1fbd17c1d978371f011941e2c4 100644 --- a/dumux/common/fvproblem.hh +++ b/dumux/common/fvproblem.hh @@ -581,7 +581,7 @@ public: */ // void serialize() // { - // typedef Restart Restarter; + // using Restarter = Restart; // Restarter res; // res.serializeBegin(asImp_()); // if (gridView().comm().rank() == 0) @@ -621,7 +621,7 @@ public: */ // void restart(const Scalar tRestart) // { - // typedef Restart Restarter; + // using Restarter = Restart; // Restarter res; diff --git a/dumux/common/intersectionmapper.hh b/dumux/common/intersectionmapper.hh index df7849a843ca0d15e8d567b940c84bb1e791a6cd..d69b376e7959dae09326da8b46ee14edffad1c93 100644 --- a/dumux/common/intersectionmapper.hh +++ b/dumux/common/intersectionmapper.hh @@ -183,10 +183,10 @@ private: template<class GridView> class IntersectionMapper { - typedef typename GridView::Grid Grid; + using Grid = typename GridView::Grid; enum {dim=Grid::dimension}; - typedef typename Grid::template Codim<0>::Entity Element; - typedef typename GridView::Intersection Intersection; + using Element = typename Grid::template Codim<0>::Entity; + using Intersection = typename GridView::Intersection; #if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) using ElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>; #else diff --git a/dumux/common/pointsource.hh b/dumux/common/pointsource.hh index 4b67f80beba9bccdfeed758152a630e788336138..2b429d5df2aa3997d94aa4e14fdb87c49073f897 100644 --- a/dumux/common/pointsource.hh +++ b/dumux/common/pointsource.hh @@ -47,17 +47,17 @@ class PointSourceHelper; template<class TypeTag> class PointSource { - 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, Problem) Problem; - typedef typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables) ElementVolumeVariables; - typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry; - typedef typename GET_PROP_TYPE(TypeTag, SubControlVolume) SubControlVolume; - typedef typename GridView::template Codim<0>::Entity Element; + 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 Problem = typename GET_PROP_TYPE(TypeTag, Problem); + using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables); + using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry); + using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume); + using Element = typename GridView::template Codim<0>::Entity; static const int dimworld = GridView::dimensionworld; - typedef typename Dune::FieldVector<Scalar, dimworld> GlobalPosition; + using GlobalPosition = Dune::FieldVector<Scalar, dimworld>; public: //! Constructor for constant point sources @@ -161,13 +161,13 @@ private: template<class TypeTag, typename IdType> class IdPointSource : public PointSource<TypeTag> { - typedef PointSource<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; + using ParentType = PointSource<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); static const int dimworld = GridView::dimensionworld; - typedef typename Dune::FieldVector<Scalar, dimworld> GlobalPosition; + using GlobalPosition = Dune::FieldVector<Scalar, dimworld>; public: //! Constructor for constant point sources diff --git a/dumux/common/properties/propertysystem.hh b/dumux/common/properties/propertysystem.hh index 48482ec2cf1b274b5254dd4b78894bd10c80ff50..85b1725ded6de0e02e9252d745b336e163122e48 100644 --- a/dumux/common/properties/propertysystem.hh +++ b/dumux/common/properties/propertysystem.hh @@ -213,7 +213,7 @@ namespace Properties * // property is defined on. Note that blabbProb does not need to * // be defined on FooTypeTag, but can also be defined for some * // derived type tag. - * typedef typename GET_PROP(TypeTag, blabbProp) blabb; + * using blabb = typename GET_PROP(TypeTag, blabbProp); * * static int calculateInternal_(int arg) * { return arg * blabb::value; }; @@ -272,7 +272,7 @@ namespace Properties PropTagName, \ /*value=*/__VA_ARGS__) \ { \ - typedef int type; \ + using type = int; \ static constexpr int value = __VA_ARGS__; \ } @@ -287,7 +287,7 @@ namespace Properties PropTagName, \ /*value=*/__VA_ARGS__) \ { \ - typedef bool type; \ + using type = bool; \ static constexpr bool value = __VA_ARGS__; \ } @@ -302,7 +302,7 @@ namespace Properties PropTagName, \ /*value=*/__VA_ARGS__) \ { \ - typedef __VA_ARGS__ type; \ + using type = __VA_ARGS__; \ } /*! @@ -318,9 +318,9 @@ namespace Properties PropTagName, \ /*value=*/__VA_ARGS__) \ { \ - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; \ + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); \ public: \ - typedef Scalar type; \ + using type = Scalar; \ static const Scalar value; \ }; \ template <class TypeTag> \ @@ -340,7 +340,7 @@ namespace Properties /*value=*/__VA_ARGS__) \ { \ public: \ - typedef std::string type; \ + using type = std::string; \ static const std::string value; \ }; \ template <class TypeTag> \ @@ -503,8 +503,8 @@ private: class PropertyRegistry { public: - typedef std::map<std::string, PropertyRegistryKey> KeyList; - typedef std::map<std::string, KeyList> KeyListMap; + using KeyList = std::map<std::string, PropertyRegistryKey>; + using KeyListMap = std::map<std::string, KeyList>; static void addKey(const PropertyRegistryKey &key) { @@ -530,8 +530,8 @@ PropertyRegistry::KeyListMap PropertyRegistry::keys_; class TypeTagRegistry { public: - typedef std::list<std::string> ChildrenList; - typedef std::map<std::string, ChildrenList> ChildrenListMap; + using ChildrenList = std::list<std::string>; + using ChildrenListMap = std::map<std::string, ChildrenList>; template <class TypeTag, class Child1, class Child2, class Child3, class Child4, class Child5, class Dummy> static void addChildren() @@ -812,7 +812,7 @@ public: template <class RealTypeTag, class Tree, class PropertyTag> class propertyTagIndex { - typedef propertyDefined<RealTypeTag, Tree, PropertyTag> definedWhere; + using definedWhere = propertyDefined<RealTypeTag, Tree, PropertyTag>; public: static const int value = @@ -837,13 +837,13 @@ template <class SelfT, class TypeTag { public: - typedef SelfT SelfType; + using SelfType = SelfT; - typedef Child1T Child1; - typedef Child2T Child2; - typedef Child3T Child3; - typedef Child4T Child4; - typedef Child5T Child5; + using Child1 = Child1T; + using Child2 = Child2T; + using Child3 = Child3T; + using Child4 = Child4T; + using Child5 = Child5T; }; NEW_TYPE_TAG(__Default); @@ -862,7 +862,7 @@ struct GetProperty template <class TypeTag, class PropertyTag, class RealTypeTag> struct GetProperty<TypeTag, PropertyTag, RealTypeTag, -1> { - typedef DefaultProperty<RealTypeTag, PropertyTag> p; + using p = DefaultProperty<RealTypeTag, PropertyTag>; }; // property defined on self @@ -870,42 +870,42 @@ struct GetProperty<TypeTag, PropertyTag, RealTypeTag, -1> template <class TypeTag, class PropertyTag, class RealTypeTag> struct GetProperty<TypeTag, PropertyTag, RealTypeTag, 0> { - typedef Property<RealTypeTag, TypeTag, PropertyTag> p; + using p = Property<RealTypeTag, TypeTag, PropertyTag>; }; //! \internal template <class TypeTag, class PropertyTag, class RealTypeTag> struct GetProperty<TypeTag, PropertyTag, RealTypeTag, 1> { - typedef typename GetProperty<typename TypeTag::Child1, PropertyTag, RealTypeTag>::p p; + using p = typename GetProperty<typename TypeTag::Child1, PropertyTag, RealTypeTag>::p; }; //! \internal template <class TypeTag, class PropertyTag, class RealTypeTag> struct GetProperty<TypeTag, PropertyTag, RealTypeTag, 2> { - typedef typename GetProperty<typename TypeTag::Child2, PropertyTag, RealTypeTag>::p p; + using p = typename GetProperty<typename TypeTag::Child2, PropertyTag, RealTypeTag>::p; }; //! \internal template <class TypeTag, class PropertyTag, class RealTypeTag> struct GetProperty<TypeTag, PropertyTag, RealTypeTag, 3> { - typedef typename GetProperty<typename TypeTag::Child3, PropertyTag, RealTypeTag>::p p; + using p = typename GetProperty<typename TypeTag::Child3, PropertyTag, RealTypeTag>::p; }; //! \internal template <class TypeTag, class PropertyTag, class RealTypeTag> struct GetProperty<TypeTag, PropertyTag, RealTypeTag, 4> { - typedef typename GetProperty<typename TypeTag::Child4, PropertyTag, RealTypeTag>::p p; + using p = typename GetProperty<typename TypeTag::Child4, PropertyTag, RealTypeTag>::p; }; //! \internal template <class TypeTag, class PropertyTag, class RealTypeTag> struct GetProperty<TypeTag, PropertyTag, RealTypeTag, 5> { - typedef typename GetProperty<typename TypeTag::Child5, PropertyTag, RealTypeTag>::p p; + using p = typename GetProperty<typename TypeTag::Child5, PropertyTag, RealTypeTag>::p; }; #if !defined NO_PROPERTY_INTROSPECTION @@ -945,7 +945,7 @@ inline bool getDiagnostic_(const std::string &typeTagName, } // print properties defined on children - typedef TypeTagRegistry::ChildrenList ChildrenList; + using ChildrenList = TypeTagRegistry::ChildrenList; const ChildrenList &children = TypeTagRegistry::children(typeTagName); ChildrenList::const_iterator ttagIt = children.begin(); std::string newIndent = indent + " "; @@ -1027,7 +1027,7 @@ inline void print_(const std::string &typeTagName, if (!somethingPrinted) os << " (none)\n"; // print properties defined on children - typedef TypeTagRegistry::ChildrenList ChildrenList; + using ChildrenList = TypeTagRegistry::ChildrenList; const ChildrenList &children = TypeTagRegistry::children(typeTagName); ChildrenList::const_iterator ttagIt = children.begin(); std::string newIndent = indent + " "; @@ -1089,7 +1089,7 @@ template <class TypeTag> class TypeTagAncestors { public: - typedef std::vector<std::vector<std::string>> AncestorMatrix; + using AncestorMatrix = std::vector<std::vector<std::string> >; static void addAncestors() { diff --git a/dumux/common/quad.hh b/dumux/common/quad.hh index f0d8d320016bd2d9c8c0836b031e2c222d39c2a4..7ff98429752c1018d49e1bb748fd252a92136c27 100644 --- a/dumux/common/quad.hh +++ b/dumux/common/quad.hh @@ -33,7 +33,7 @@ extern "C" { #include <quadmath.h> } -typedef __float128 quad; +using quad = __float128; namespace std { diff --git a/dumux/common/spline.hh b/dumux/common/spline.hh index a42ada6b09fe66b140075394c5ae75da7e362f3d..de3758578f2ca12ff455465e8a3b9b1be446a80f 100644 --- a/dumux/common/spline.hh +++ b/dumux/common/spline.hh @@ -272,8 +272,8 @@ template<class Scalar> class Spline<Scalar, 2> : public SplineCommon_<Scalar, Spline<Scalar, 2> > { friend class SplineCommon_<Scalar, Spline<Scalar, 2> >; - typedef Dune::FieldVector<Scalar, 2> Vector; - typedef Dune::FieldMatrix<Scalar, 2, 2> Matrix; + using Vector = Dune::FieldVector<Scalar, 2>; + using Matrix = Dune::FieldMatrix<Scalar, 2, 2>; public: Spline() diff --git a/dumux/common/splinecommon_.hh b/dumux/common/splinecommon_.hh index ed99383ebac13f8e1a11653f518bdcfa08d2d694..194d1a420fdf70a7d32fa595695d7977b64a68df 100644 --- a/dumux/common/splinecommon_.hh +++ b/dumux/common/splinecommon_.hh @@ -41,8 +41,8 @@ namespace Dumux template<class ScalarT, class ImplementationT> class SplineCommon_ { - typedef ScalarT Scalar; - typedef ImplementationT Implementation; + using Scalar = ScalarT; + using Implementation = ImplementationT; Implementation &asImp_() { return *static_cast<Implementation*>(this); } diff --git a/dumux/common/timemanager.hh b/dumux/common/timemanager.hh index c11263e544b36a888a83dafa0711b1f38ddf92fe..5dbbd2905a8d750bfa36e11803aae819ac75d84f 100644 --- a/dumux/common/timemanager.hh +++ b/dumux/common/timemanager.hh @@ -65,8 +65,8 @@ NEW_PROP_TAG(Problem); template <class TypeTag> class TimeManager { - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, Problem) Problem; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using Problem = typename GET_PROP_TYPE(TypeTag, Problem); TimeManager(const TimeManager&) {} diff --git a/dumux/common/variablelengthspline_.hh b/dumux/common/variablelengthspline_.hh index 80877c7cf2da470fc688fbcab24ee7290150c16d..21ba8d52a190ec6dddd21c6842a2475bb32dd221 100644 --- a/dumux/common/variablelengthspline_.hh +++ b/dumux/common/variablelengthspline_.hh @@ -43,9 +43,9 @@ class VariableLengthSpline_ { friend class SplineCommon_<ScalarT, VariableLengthSpline_<ScalarT> >; - typedef ScalarT Scalar; - typedef Dune::BlockVector<Dune::FieldVector<Scalar, 1> > Vector; - typedef Dune::BTDMatrix<Dune::FieldMatrix<Scalar, 1, 1> > BTDMatrix; + using Scalar = ScalarT; + using Vector = Dune::BlockVector<Dune::FieldVector<Scalar, 1> >; + using BTDMatrix = Dune::BTDMatrix<Dune::FieldMatrix<Scalar, 1, 1> >; public: /*!