]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Replace typedef by using in source
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Wed, 27 Jun 2018 13:12:23 +0000 (15:12 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Wed, 27 Jun 2018 13:12:23 +0000 (15:12 +0200)
34 files changed:
source/base/data_out_base.cc
source/base/polynomials_bdm.cc
source/differentiation/ad/adolc_number_types.cc
source/distributed/tria.cc
source/dofs/dof_handler_policy.cc
source/dofs/dof_renumbering.cc
source/dofs/dof_tools.cc
source/dofs/dof_tools_constraints.cc
source/fe/fe_dgp.cc
source/fe/fe_dgq.cc
source/fe/fe_nedelec_sz.cc
source/fe/fe_q.cc
source/fe/fe_q_base.cc
source/fe/fe_q_bubbles.cc
source/fe/fe_q_dg0.cc
source/fe/fe_q_hierarchical.cc
source/fe/fe_values.cc
source/grid/grid_out.cc
source/grid/grid_reordering.cc
source/grid/grid_tools.cc
source/grid/grid_tools_dof_handlers.cc
source/grid/tria.cc
source/grid/tria_accessor.cc
source/lac/petsc_parallel_block_vector.cc
source/lac/sparsity_tools.cc
source/lac/trilinos_precondition_muelu.cc
source/lac/trilinos_sparse_matrix.cc
source/lac/trilinos_sparsity_pattern.cc
source/multigrid/mg_transfer_component.cc
source/numerics/derivative_approximation.cc
source/numerics/error_estimator_1d.cc
source/numerics/histogram.cc
source/numerics/point_value_history.cc
source/particles/particle_handler.cc

index e9a578cf648a9b09145268ff3fbf49a2f2af4c2c..d064def0c3ce2453d9e8f84385c0dcfa121142e5 100644 (file)
@@ -85,18 +85,13 @@ namespace
   // domain
   namespace base64
   {
-    typedef enum
-    {
-      step_A,
-      step_B,
-      step_C
-    } base64_encodestep;
+    using base64_encodestep = enum { step_A, step_B, step_C };
 
-    typedef struct
+    using base64_encodestate = struct
     {
       base64_encodestep step;
       char              result;
-    } base64_encodestate;
+    };
 
     void
     base64_init_encodestate(base64_encodestate *state_in)
@@ -5540,7 +5535,7 @@ namespace DataOutBase
         << ascii_or_binary << "\">\n";
 
     {
-      // uint8_t might be a typedef to unsigned char which is then not printed
+      // uint8_t might be an alias to unsigned char which is then not printed
       // as ascii integers
 #ifdef DEAL_II_WITH_ZLIB
       std::vector<uint8_t> cell_types(n_cells,
@@ -8492,7 +8487,7 @@ template <int dim, int spacedim>
 void
 DataOutReader<dim, spacedim>::merge(const DataOutReader<dim, spacedim> &source)
 {
-  typedef typename dealii::DataOutBase::Patch<dim, spacedim> Patch;
+  using Patch = typename dealii::DataOutBase::Patch<dim, spacedim>;
 
 
   const std::vector<Patch> &source_patches = source.get_patches();
index d93fe476f69501c50da3c69d5bf675aec5ea546c..bb14979d3bc04ad104aeb0070354b901143e4536 100644 (file)
@@ -400,8 +400,7 @@ PolynomialsBDM<dim>::compute_node_matrix (Table<2,double>& A) const
             }
 //      std::cerr << p
 //                << '\t' << moment_weight[0].value(x)
-//                << '\t' << moment_weight[1].value(x)
-//        ;
+//                << '\t' << moment_weight[1].value(x);
 
           compute (p, values, grads, grad_grads);
 
index 6477862ba0630b281146db84115b03ecee3bebe8..73dc9270f83b42bf2ddac0244885c6358da3db3d 100644 (file)
@@ -45,9 +45,9 @@ namespace numbers
         const std::function<adouble(const adouble &, const adouble &)>
           &comparator)
       {
-        typedef typename Differentiation::AD::NumberTraits<
+        using ad_type = typename Differentiation::AD::NumberTraits<
           double,
-          Differentiation::AD::NumberTypes::adolc_taped>::ad_type ad_type;
+          Differentiation::AD::NumberTypes::adolc_taped>::ad_type;
         static_assert(
           std::is_same<adouble, ad_type>::value,
           "The type of the AD number is not that which was expected.");
index 89087001665f9000e7c2f61c28152a7bd7f2b815..f725fbf04337d0459f5a9e89e7937b529a3844ea 100644 (file)
@@ -2200,8 +2200,8 @@ namespace parallel
         // {6,7} belong together, respectively). If periodicity is set in x and
         // z direction, the output is {0,0,2,2,0,0,2,2}, and if periodicity is
         // in all directions, the output is simply {0,0,0,0,0,0,0,0}.
-        typedef
-          typename Triangulation<dim, spacedim>::cell_iterator cell_iterator;
+        using cell_iterator =
+          typename Triangulation<dim, spacedim>::cell_iterator;
         typename std::map<std::pair<cell_iterator, unsigned int>,
                           std::pair<std::pair<cell_iterator, unsigned int>,
                                     std::bitset<3>>>::const_iterator it;
@@ -3111,9 +3111,9 @@ namespace parallel
 
       // now collect cells and their vertices
       // for the interested neighbors
-      typedef std::map<dealii::types::subdomain_id,
-                       CommunicateLocallyMovedVertices::CellInfo<dim, spacedim>>
-                cellmap_t;
+      using cellmap_t =
+        std::map<dealii::types::subdomain_id,
+                 CommunicateLocallyMovedVertices::CellInfo<dim, spacedim>>;
       cellmap_t needs_to_get_cells;
 
       for (typename Triangulation<dim, spacedim>::cell_iterator cell =
@@ -3509,8 +3509,8 @@ namespace parallel
       Assert(this->n_levels() == 1,
              ExcMessage("The triangulation is refined!"));
 
-      typedef std::vector<dealii::GridTools::PeriodicFacePair<cell_iterator>>
-                                          FaceVector;
+      using FaceVector =
+        std::vector<dealii::GridTools::PeriodicFacePair<cell_iterator>>;
       typename FaceVector::const_iterator it, periodic_end;
       it           = periodicity_vector.begin();
       periodic_end = periodicity_vector.end();
index aa8d6e857be959b7b55abd6172ee913863b051fd..71e6e5408e830a714648e2ff8503e07b162e06c7 100644 (file)
@@ -147,8 +147,8 @@ namespace internal
         }
 
 
-        typedef std::vector<std::pair<unsigned int, unsigned int>>
-          DoFIdentities;
+        using DoFIdentities =
+          std::vector<std::pair<unsigned int, unsigned int>>;
 
 
         /**
@@ -3625,9 +3625,8 @@ namespace internal
           // build list of cells to request for each neighbor
           std::set<dealii::types::subdomain_id> level_ghost_owners =
             tria.level_ghost_owners();
-          typedef std::map<dealii::types::subdomain_id,
-                           CellDataTransferBuffer<dim>>
-                    cellmap_t;
+          using cellmap_t =
+            std::map<dealii::types::subdomain_id, CellDataTransferBuffer<dim>>;
           cellmap_t neighbor_cell_list;
           for (std::set<dealii::types::subdomain_id>::iterator it =
                  level_ghost_owners.begin();
index d9d8a2e62655ac941cfabf1b32b8d5a7df9e219d..698adb44b194fe2ef41e78192cd38eacc9b060b6 100644 (file)
@@ -70,17 +70,16 @@ namespace DoFRenumbering
       using namespace ::boost;
       using namespace std;
 
-      typedef adjacency_list<vecS,
-                             vecS,
-                             undirectedS,
-                             property<vertex_color_t,
-                                      default_color_type,
-                                      property<vertex_degree_t, int>>>
-                                                      Graph;
-      typedef graph_traits<Graph>::vertex_descriptor  Vertex;
-      typedef graph_traits<Graph>::vertices_size_type size_type;
-
-      typedef std::pair<size_type, size_type> Pair;
+      using Graph     = adjacency_list<vecS,
+                                   vecS,
+                                   undirectedS,
+                                   property<vertex_color_t,
+                                            default_color_type,
+                                            property<vertex_degree_t, int>>>;
+      using Vertex    = graph_traits<Graph>::vertex_descriptor;
+      using size_type = graph_traits<Graph>::vertices_size_type;
+
+      using Pair = std::pair<size_type, size_type>;
     } // namespace boosttypes
 
 
@@ -281,7 +280,7 @@ namespace DoFRenumbering
       int delta = 0;
 
       // must be BGL directed graph now
-      typedef adjacency_list<vecS, vecS, directedS> Graph;
+      using Graph = adjacency_list<vecS, vecS, directedS>;
 
       int n = dof_handler.n_dofs();
 
@@ -310,7 +309,7 @@ namespace DoFRenumbering
         }
 
 
-      typedef std::vector<int> Vector;
+      using Vector = std::vector<int>;
 
 
       Vector inverse_perm(n, 0);
index 75075ab289c5d94f3db23346a8190b719a3f79fa..2979ae49ee11e9fd3c7e2cef4c804805d2c230c5 100644 (file)
@@ -2319,12 +2319,11 @@ namespace DoFTools
   {
     AssertThrow(out, ExcIO());
 
-    typedef std::map<types::global_dof_index, Point<spacedim>> dof_map_t;
+    using dof_map_t = std::map<types::global_dof_index, Point<spacedim>>;
 
-    typedef std::map<Point<spacedim>,
-                     std::vector<types::global_dof_index>,
-                     typename internal::ComparisonHelper<spacedim>>
-      point_map_t;
+    using point_map_t = std::map<Point<spacedim>,
+                                 std::vector<types::global_dof_index>,
+                                 typename internal::ComparisonHelper<spacedim>>;
 
     point_map_t point_map;
 
index 0c2bfbd9e3453399d99d102a551975fabaf64df4..8bec7b6007f303e1df5c724ff9120f0ce2782dfb 100644 (file)
@@ -2245,7 +2245,7 @@ namespace DoFTools
 
       // have an array that stores the location of each vector-dof tuple we want
       // to rotate.
-      typedef std::array<unsigned int, spacedim> DoFTuple;
+      using DoFTuple = std::array<unsigned int, spacedim>;
 
       // start with a pristine interpolation matrix...
       FullMatrix<double> transformation = IdentityMatrix(n_dofs_per_face);
@@ -2544,9 +2544,8 @@ namespace DoFTools
     const ComponentMask &            component_mask,
     const std::vector<unsigned int> &first_vector_components)
   {
-    typedef std::vector<
-      GridTools::PeriodicFacePair<typename DoFHandlerType::cell_iterator>>
-                                        FaceVector;
+    using FaceVector = std::vector<
+      GridTools::PeriodicFacePair<typename DoFHandlerType::cell_iterator>>;
     typename FaceVector::const_iterator it, end_periodic;
     it           = periodic_faces.begin();
     end_periodic = periodic_faces.end();
@@ -2554,7 +2553,7 @@ namespace DoFTools
     // Loop over all periodic faces...
     for (; it != end_periodic; ++it)
       {
-        typedef typename DoFHandlerType::face_iterator FaceIterator;
+        using FaceIterator        = typename DoFHandlerType::face_iterator;
         const FaceIterator face_1 = it->cell[0]->face(it->face_idx[0]);
         const FaceIterator face_2 = it->cell[1]->face(it->face_idx[1]);
 
index c4e7593bcb44166ee88db8a7650f9a401eb0d738..0fa056545a978573fdb94e0c3afde840e7562f56 100644 (file)
@@ -111,8 +111,8 @@ FE_DGP<dim, spacedim>::get_face_interpolation_matrix(
   // interpolation matrix is necessarily empty -- i.e. there isn't much we
   // need to do here.
   (void)interpolation_matrix;
-  typedef FiniteElement<dim, spacedim> FE;
-  typedef FE_DGP<dim, spacedim>        FEDGP;
+  using FE    = FiniteElement<dim, spacedim>;
+  using FEDGP = FE_DGP<dim, spacedim>;
   AssertThrow((x_source_fe.get_name().find("FE_DGP<") == 0) ||
                 (dynamic_cast<const FEDGP *>(&x_source_fe) != nullptr),
               typename FE::ExcInterpolationNotImplemented());
@@ -137,8 +137,8 @@ FE_DGP<dim, spacedim>::get_subface_interpolation_matrix(
   // interpolation matrix is necessarily empty -- i.e. there isn't much we
   // need to do here.
   (void)interpolation_matrix;
-  typedef FiniteElement<dim, spacedim> FE;
-  typedef FE_DGP<dim, spacedim>        FEDGP;
+  using FE    = FiniteElement<dim, spacedim>;
+  using FEDGP = FE_DGP<dim, spacedim>;
   AssertThrow((x_source_fe.get_name().find("FE_DGP<") == 0) ||
                 (dynamic_cast<const FEDGP *>(&x_source_fe) != nullptr),
               typename FE::ExcInterpolationNotImplemented());
index 3f7d5c1e244ddeba669dc763810bd915ff7540e0..65bbd6f8d301dea92154d3f164eb2616281cac7f 100644 (file)
@@ -264,7 +264,7 @@ FE_DGQ<dim, spacedim>::get_interpolation_matrix(
   // this is only implemented, if the
   // source FE is also a
   // DGQ element
-  typedef FiniteElement<dim, spacedim> FE;
+  using FE = FiniteElement<dim, spacedim>;
   AssertThrow((dynamic_cast<const FE_DGQ<dim, spacedim> *>(&x_source_fe) !=
                nullptr),
               typename FE::ExcInterpolationNotImplemented());
@@ -347,7 +347,7 @@ FE_DGQ<dim, spacedim>::get_face_interpolation_matrix(
   // is necessarily empty -- i.e. there isn't
   // much we need to do here.
   (void)interpolation_matrix;
-  typedef FiniteElement<dim, spacedim> FE;
+  using FE = FiniteElement<dim, spacedim>;
   AssertThrow((dynamic_cast<const FE_DGQ<dim, spacedim> *>(&x_source_fe) !=
                nullptr),
               typename FE::ExcInterpolationNotImplemented());
@@ -374,7 +374,7 @@ FE_DGQ<dim, spacedim>::get_subface_interpolation_matrix(
   // is necessarily empty -- i.e. there isn't
   // much we need to do here.
   (void)interpolation_matrix;
-  typedef FiniteElement<dim, spacedim> FE;
+  using FE = FiniteElement<dim, spacedim>;
   AssertThrow((dynamic_cast<const FE_DGQ<dim, spacedim> *>(&x_source_fe) !=
                nullptr),
               typename FE::ExcInterpolationNotImplemented());
index a6ede025621d7c4cae185f73f88698902f0b86c1..daae79ef21eb68715b7c9afb6e52773dfe409934 100644 (file)
@@ -52,7 +52,7 @@ double
 FE_NedelecSZ<dim, spacedim>::shape_value(const unsigned int /*i*/,
                                          const Point<dim> & /*p*/) const
 {
-  typedef FiniteElement<dim, dim> FEE;
+  using FEE = FiniteElement<dim, dim>;
   Assert(false, typename FEE::ExcFENotPrimitive());
   return 0.;
 }
@@ -78,7 +78,7 @@ Tensor<1, dim>
 FE_NedelecSZ<dim, spacedim>::shape_grad(const unsigned int /*i*/,
                                         const Point<dim> & /*p*/) const
 {
-  typedef FiniteElement<dim, dim> FEE;
+  using FEE = FiniteElement<dim, dim>;
   Assert(false, typename FEE::ExcFENotPrimitive());
   return Tensor<1, dim>();
 }
@@ -103,7 +103,7 @@ Tensor<2, dim>
 FE_NedelecSZ<dim, spacedim>::shape_grad_grad(const unsigned int /*i*/,
                                              const Point<dim> & /*p*/) const
 {
-  typedef FiniteElement<dim, dim> FEE;
+  using FEE = FiniteElement<dim, dim>;
   Assert(false, typename FEE::ExcFENotPrimitive());
   return Tensor<2, dim>();
 }
index aee10ccede1ca45101456c6a8e69a37a6e19b892..e959cd16650ef7e74d95c323e23ac55f7d71ca84 100644 (file)
@@ -40,7 +40,7 @@ namespace internal
           return QGaussLobatto<1>(degree + 1).get_points();
         else
           {
-            typedef dealii::FE_Q_Base<TensorProductPolynomials<1>, 1, 1> FEQ;
+            using FEQ = dealii::FE_Q_Base<TensorProductPolynomials<1>, 1, 1>;
             AssertThrow(false, FEQ::ExcFEQCannotHaveDegree0());
           }
         return std::vector<Point<1>>();
index 1df3a4e9fc88968a31f48e4df919e11be0fc841b..274a5b392528f0b26bc393902e80f140251bf757 100644 (file)
@@ -1191,7 +1191,7 @@ std::vector<unsigned int>
 FE_Q_Base<PolynomialType, dim, spacedim>::get_dpo_vector(
   const unsigned int degree)
 {
-  typedef FE_Q_Base<PolynomialType, dim, spacedim> FEQ;
+  using FEQ = FE_Q_Base<PolynomialType, dim, spacedim>;
   AssertThrow(degree > 0, typename FEQ::ExcFEQCannotHaveDegree0());
   std::vector<unsigned int> dpo(dim + 1, 1U);
   for (unsigned int i = 1; i < dpo.size(); ++i)
index 40111e707de4d68c64c0327f80759ad90b43ffa5..ce0ff54ef8d687db739d3c0391df50e67f0f0090 100644 (file)
@@ -385,7 +385,7 @@ FE_Q_Bubbles<dim, spacedim>::get_interpolation_matrix(
   // We don't know how to do this properly, yet.
   // However, for SolutionTransfer to work we need to provide an implementation
   // for the case that the x_source_fe is identical to this FE
-  typedef FE_Q_Bubbles<dim, spacedim> FEQBUBBLES;
+  using FEQBUBBLES = FE_Q_Bubbles<dim, spacedim>;
 
   AssertThrow(
     (x_source_fe.get_name().find("FE_Q_Bubbles<") == 0) ||
index 6b7569db4e30c7abfada1ad1d82e869735825486..f582f5dfe7b054c7aada4023951ed6df745d3d7e 100644 (file)
@@ -212,7 +212,7 @@ FE_Q_DG0<dim, spacedim>::get_interpolation_matrix(
   FullMatrix<double> &                interpolation_matrix) const
 {
   // this is only implemented, if the source FE is also a Q_DG0 element
-  typedef FE_Q_DG0<dim, spacedim> FEQDG0;
+  using FEQDG0 = FE_Q_DG0<dim, spacedim>;
 
   AssertThrow(
     (x_source_fe.get_name().find("FE_Q_DG0<") == 0) ||
index 38940892e379654c2ee2955fb1470568776457a3..896834421396b8a76dc4d9adb2de4ea76a947433 100644 (file)
@@ -908,7 +908,7 @@ FE_Q_Hierarchical<dim>::get_face_interpolation_matrix(
   // this is only implemented, if the
   // source FE is also a
   // Q_Hierarchical element
-  typedef FE_Q_Hierarchical<dim> FEQHierarchical;
+  using FEQHierarchical = FE_Q_Hierarchical<dim>;
   AssertThrow((x_source_fe.get_name().find("FE_Q_Hierarchical<") == 0) ||
                 (dynamic_cast<const FEQHierarchical *>(&x_source_fe) !=
                  nullptr),
@@ -995,7 +995,7 @@ FE_Q_Hierarchical<dim>::get_subface_interpolation_matrix(
   // this is only implemented, if the
   // source FE is also a
   // Q_Hierarchical element
-  typedef FE_Q_Hierarchical<dim> FEQHierarchical;
+  using FEQHierarchical = FE_Q_Hierarchical<dim>;
   AssertThrow((x_source_fe.get_name().find("FE_Q_Hierarchical<") == 0) ||
                 (dynamic_cast<const FEQHierarchical *>(&x_source_fe) !=
                  nullptr),
index f771601b65a892f6359e2596404d08fa88bebe7b..ffcab279fbbbbbb4c6d213ecc149951c9e0c99af 100644 (file)
@@ -2649,8 +2649,8 @@ namespace internal
       scalars.resize(n_scalars);
       for (unsigned int component = 0; component < n_scalars; ++component)
         {
-          // Use a typedef here to work around an issue with gcc-4.1:
-          typedef dealii::FEValuesViews::Scalar<dim, spacedim> ScalarView;
+          // Use an alias here to work around an issue with gcc-4.1:
+          using ScalarView = dealii::FEValuesViews::Scalar<dim, spacedim>;
           scalars[component].ScalarView::~ScalarView();
 
           new (&scalars[component])
@@ -2665,8 +2665,8 @@ namespace internal
       vectors.resize(n_vectors);
       for (unsigned int component = 0; component < n_vectors; ++component)
         {
-          // Use a typedef here to work around an issue with gcc-4.1:
-          typedef dealii::FEValuesViews::Vector<dim, spacedim> VectorView;
+          // Use an alias here to work around an issue with gcc-4.1:
+          using VectorView = dealii::FEValuesViews::Vector<dim, spacedim>;
           vectors[component].VectorView::~VectorView();
 
           new (&vectors[component])
@@ -2683,9 +2683,9 @@ namespace internal
            component < n_symmetric_second_order_tensors;
            ++component)
         {
-          // Use a typedef here to work around an issue with gcc-4.1:
-          typedef dealii::FEValuesViews::SymmetricTensor<2, dim, spacedim>
-            SymmetricTensorView;
+          // Use an alias here to work around an issue with gcc-4.1:
+          using SymmetricTensorView =
+            dealii::FEValuesViews::SymmetricTensor<2, dim, spacedim>;
           symmetric_second_order_tensors[component]
             .SymmetricTensorView::~SymmetricTensorView();
 
@@ -2703,8 +2703,8 @@ namespace internal
       for (unsigned int component = 0; component < n_second_order_tensors;
            ++component)
         {
-          // Use a typedef here to work around an issue with gcc-4.1:
-          typedef dealii::FEValuesViews::Tensor<2, dim, spacedim> TensorView;
+          // Use an alias here to work around an issue with gcc-4.1:
+          using TensorView = dealii::FEValuesViews::Tensor<2, dim, spacedim>;
           second_order_tensors[component].TensorView::~TensorView();
 
           new (&second_order_tensors[component])
@@ -3251,7 +3251,7 @@ namespace internal
     const bool                             quadrature_points_fastest = false,
     const unsigned int                     component_multiple        = 1)
   {
-    typedef typename VectorType::value_type Number;
+    using Number = typename VectorType::value_type;
     // initialize with zero
     for (unsigned int i = 0; i < values.size(); ++i)
       std::fill_n(values[i].begin(),
@@ -3658,7 +3658,7 @@ FEValuesBase<dim, spacedim>::get_function_values(
   const InputVector &                            fe_function,
   std::vector<typename InputVector::value_type> &values) const
 {
-  typedef typename InputVector::value_type Number;
+  using Number = typename InputVector::value_type;
   Assert(this->update_flags & update_values,
          ExcAccessToUninitializedField("update_values"));
   AssertDimension(fe->n_components(), 1);
@@ -3684,7 +3684,7 @@ FEValuesBase<dim, spacedim>::get_function_values(
   const VectorSlice<const std::vector<types::global_dof_index>> &indices,
   std::vector<typename InputVector::value_type> &                values) const
 {
-  typedef typename InputVector::value_type Number;
+  using Number = typename InputVector::value_type;
   Assert(this->update_flags & update_values,
          ExcAccessToUninitializedField("update_values"));
   AssertDimension(fe->n_components(), 1);
@@ -3707,7 +3707,7 @@ FEValuesBase<dim, spacedim>::get_function_values(
   const InputVector &                                    fe_function,
   std::vector<Vector<typename InputVector::value_type>> &values) const
 {
-  typedef typename InputVector::value_type Number;
+  using Number = typename InputVector::value_type;
   Assert(present_cell.get() != nullptr,
          ExcMessage("FEValues object is not reinit'ed to any cell"));
 
@@ -3736,7 +3736,7 @@ FEValuesBase<dim, spacedim>::get_function_values(
   const VectorSlice<const std::vector<types::global_dof_index>> &indices,
   std::vector<Vector<typename InputVector::value_type>> &        values) const
 {
-  typedef typename InputVector::value_type Number;
+  using Number = typename InputVector::value_type;
   // Size of indices must be a multiple of dofs_per_cell such that an integer
   // number of function values is generated in each point.
   Assert(indices.size() % dofs_per_cell == 0,
@@ -3769,7 +3769,7 @@ FEValuesBase<dim, spacedim>::get_function_values(
        values,
   bool quadrature_points_fastest) const
 {
-  typedef typename InputVector::value_type Number;
+  using Number = typename InputVector::value_type;
   Assert(this->update_flags & update_values,
          ExcAccessToUninitializedField("update_values"));
 
@@ -3801,7 +3801,7 @@ FEValuesBase<dim, spacedim>::get_function_gradients(
   std::vector<Tensor<1, spacedim, typename InputVector::value_type>> &gradients)
   const
 {
-  typedef typename InputVector::value_type Number;
+  using Number = typename InputVector::value_type;
   Assert(this->update_flags & update_gradients,
          ExcAccessToUninitializedField("update_gradients"));
   AssertDimension(fe->n_components(), 1);
@@ -3828,7 +3828,7 @@ FEValuesBase<dim, spacedim>::get_function_gradients(
   std::vector<Tensor<1, spacedim, typename InputVector::value_type>> &gradients)
   const
 {
-  typedef typename InputVector::value_type Number;
+  using Number = typename InputVector::value_type;
   Assert(this->update_flags & update_gradients,
          ExcAccessToUninitializedField("update_gradients"));
   AssertDimension(fe->n_components(), 1);
@@ -3853,7 +3853,7 @@ FEValuesBase<dim, spacedim>::get_function_gradients(
     std::vector<Tensor<1, spacedim, typename InputVector::value_type>>>
     &gradients) const
 {
-  typedef typename InputVector::value_type Number;
+  using Number = typename InputVector::value_type;
   Assert(this->update_flags & update_gradients,
          ExcAccessToUninitializedField("update_gradients"));
   Assert(present_cell.get() != nullptr,
@@ -3884,7 +3884,7 @@ FEValuesBase<dim, spacedim>::get_function_gradients(
        gradients,
   bool quadrature_points_fastest) const
 {
-  typedef typename InputVector::value_type Number;
+  using Number = typename InputVector::value_type;
   // Size of indices must be a multiple of dofs_per_cell such that an integer
   // number of function values is generated in each point.
   Assert(indices.size() % dofs_per_cell == 0,
@@ -3915,7 +3915,7 @@ FEValuesBase<dim, spacedim>::get_function_hessians(
   std::vector<Tensor<2, spacedim, typename InputVector::value_type>> &hessians)
   const
 {
-  typedef typename InputVector::value_type Number;
+  using Number = typename InputVector::value_type;
   AssertDimension(fe->n_components(), 1);
   Assert(this->update_flags & update_hessians,
          ExcAccessToUninitializedField("update_hessians"));
@@ -3942,7 +3942,7 @@ FEValuesBase<dim, spacedim>::get_function_hessians(
   std::vector<Tensor<2, spacedim, typename InputVector::value_type>> &hessians)
   const
 {
-  typedef typename InputVector::value_type Number;
+  using Number = typename InputVector::value_type;
   Assert(this->update_flags & update_hessians,
          ExcAccessToUninitializedField("update_hessians"));
   AssertDimension(fe_function.size(), present_cell->n_dofs_for_dof_handler());
@@ -3968,7 +3968,7 @@ FEValuesBase<dim, spacedim>::get_function_hessians(
     &  hessians,
   bool quadrature_points_fastest) const
 {
-  typedef typename InputVector::value_type Number;
+  using Number = typename InputVector::value_type;
   Assert(this->update_flags & update_hessians,
          ExcAccessToUninitializedField("update_hessians"));
   Assert(present_cell.get() != nullptr,
@@ -4000,7 +4000,7 @@ FEValuesBase<dim, spacedim>::get_function_hessians(
        hessians,
   bool quadrature_points_fastest) const
 {
-  typedef typename InputVector::value_type Number;
+  using Number = typename InputVector::value_type;
   Assert(this->update_flags & update_hessians,
          ExcAccessToUninitializedField("update_hessians"));
   Assert(indices.size() % dofs_per_cell == 0,
@@ -4028,7 +4028,7 @@ FEValuesBase<dim, spacedim>::get_function_laplacians(
   const InputVector &                            fe_function,
   std::vector<typename InputVector::value_type> &laplacians) const
 {
-  typedef typename InputVector::value_type Number;
+  using Number = typename InputVector::value_type;
   Assert(this->update_flags & update_hessians,
          ExcAccessToUninitializedField("update_hessians"));
   AssertDimension(fe->n_components(), 1);
@@ -4054,7 +4054,7 @@ FEValuesBase<dim, spacedim>::get_function_laplacians(
   const VectorSlice<const std::vector<types::global_dof_index>> &indices,
   std::vector<typename InputVector::value_type> &laplacians) const
 {
-  typedef typename InputVector::value_type Number;
+  using Number = typename InputVector::value_type;
   Assert(this->update_flags & update_hessians,
          ExcAccessToUninitializedField("update_hessians"));
   AssertDimension(fe->n_components(), 1);
@@ -4077,7 +4077,7 @@ FEValuesBase<dim, spacedim>::get_function_laplacians(
   const InputVector &                                    fe_function,
   std::vector<Vector<typename InputVector::value_type>> &laplacians) const
 {
-  typedef typename InputVector::value_type Number;
+  using Number = typename InputVector::value_type;
   Assert(present_cell.get() != nullptr,
          ExcMessage("FEValues object is not reinit'ed to any cell"));
   Assert(this->update_flags & update_hessians,
@@ -4105,7 +4105,7 @@ FEValuesBase<dim, spacedim>::get_function_laplacians(
   const VectorSlice<const std::vector<types::global_dof_index>> &indices,
   std::vector<Vector<typename InputVector::value_type>> &laplacians) const
 {
-  typedef typename InputVector::value_type Number;
+  using Number = typename InputVector::value_type;
   // Size of indices must be a multiple of dofs_per_cell such that an integer
   // number of function values is generated in each point.
   Assert(indices.size() % dofs_per_cell == 0,
@@ -4137,7 +4137,7 @@ FEValuesBase<dim, spacedim>::get_function_laplacians(
   std::vector<std::vector<typename InputVector::value_type>> &   laplacians,
   bool quadrature_points_fastest) const
 {
-  typedef typename InputVector::value_type Number;
+  using Number = typename InputVector::value_type;
   Assert(indices.size() % dofs_per_cell == 0,
          ExcNotMultiple(indices.size(), dofs_per_cell));
   Assert(this->update_flags & update_hessians,
@@ -4166,7 +4166,7 @@ FEValuesBase<dim, spacedim>::get_function_third_derivatives(
   std::vector<Tensor<3, spacedim, typename InputVector::value_type>>
     &third_derivatives) const
 {
-  typedef typename InputVector::value_type Number;
+  using Number = typename InputVector::value_type;
   AssertDimension(fe->n_components(), 1);
   Assert(this->update_flags & update_3rd_derivatives,
          ExcAccessToUninitializedField("update_3rd_derivatives"));
@@ -4194,7 +4194,7 @@ FEValuesBase<dim, spacedim>::get_function_third_derivatives(
   std::vector<Tensor<3, spacedim, typename InputVector::value_type>>
     &third_derivatives) const
 {
-  typedef typename InputVector::value_type Number;
+  using Number = typename InputVector::value_type;
   Assert(this->update_flags & update_3rd_derivatives,
          ExcAccessToUninitializedField("update_3rd_derivatives"));
   AssertDimension(fe_function.size(), present_cell->n_dofs_for_dof_handler());
@@ -4221,7 +4221,7 @@ FEValuesBase<dim, spacedim>::get_function_third_derivatives(
     &  third_derivatives,
   bool quadrature_points_fastest) const
 {
-  typedef typename InputVector::value_type Number;
+  using Number = typename InputVector::value_type;
   Assert(this->update_flags & update_3rd_derivatives,
          ExcAccessToUninitializedField("update_3rd_derivatives"));
   Assert(present_cell.get() != nullptr,
@@ -4253,7 +4253,7 @@ FEValuesBase<dim, spacedim>::get_function_third_derivatives(
        third_derivatives,
   bool quadrature_points_fastest) const
 {
-  typedef typename InputVector::value_type Number;
+  using Number = typename InputVector::value_type;
   Assert(this->update_flags & update_3rd_derivatives,
          ExcAccessToUninitializedField("update_3rd_derivatives"));
   Assert(indices.size() % dofs_per_cell == 0,
index a2b53566152d9c60bbf9cbb52e4e367539f33047..94d4b74088a5fa18e8259db91573246b39bb3109 100644 (file)
@@ -4112,7 +4112,7 @@ namespace internal
               const GridOutFlags::Eps<2> &                eps_flags_2,
               const GridOutFlags::Eps<3> &                eps_flags_3)
     {
-      typedef std::list<LineEntry> LineList;
+      using LineList = std::list<LineEntry>;
 
       // We should never get here in 1D since this function is overloaded for
       // all dim == 1 cases.
index 6d6215e99e09f7bae226497839371e2ae2122296..3030f6678a0084344bf79d48344565dd878a636c 100644 (file)
@@ -209,7 +209,7 @@ namespace
      * An iterator that allows iterating over all cells adjacent
      * to the edge represented by the current object.
      */
-    typedef const AdjacentCell *const_iterator;
+    using const_iterator = const AdjacentCell *;
 
     /**
      * Add the given cell to the collection of cells adjacent to
@@ -435,7 +435,7 @@ namespace
     /**
      * Iterator type for the elements of the set.
      */
-    typedef const unsigned int *const_iterator;
+    using const_iterator = const unsigned int *;
 
     /**
      * Default constructor. Initialize both slots as unused, corresponding
index 5f00abc06ddb35e784b1fce534b7f3dd05756401..caca997698c61bc4d37d0d93a999fec8cc81afcf 100644 (file)
@@ -1982,8 +1982,8 @@ namespace GridTools
 
 #else
 
-    typedef typename Triangulation<dim, spacedim>::active_cell_iterator
-      active_cell_iterator;
+    using active_cell_iterator =
+      typename Triangulation<dim, spacedim>::active_cell_iterator;
     const std::vector<std::set<active_cell_iterator>> vertex_to_cell =
       vertex_to_cell_map(triangulation);
 
index 578353c4643805c9b3fefa8cb47a27f172c9f96c..4571319a2ddbf008fc1e52f5a5b4e47378234db4 100644 (file)
@@ -354,12 +354,11 @@ namespace GridTools
 #endif
     {
 #ifndef _MSC_VER
-      typedef
-        typename MeshType<dim, spacedim>::active_cell_iterator cell_iterator;
+      using cell_iterator =
+        typename MeshType<dim, spacedim>::active_cell_iterator;
 #else
-      typedef typename dealii::internal::
-        ActiveCellIterator<dim, spacedim, MeshType<dim, spacedim>>::type
-          cell_iterator;
+      using cell_iterator = typename dealii::internal::
+        ActiveCellIterator<dim, spacedim, MeshType<dim, spacedim>>::type;
 #endif
 
       // update the searched cells
@@ -423,9 +422,8 @@ namespace GridTools
       const std::vector<bool> &      marked_vertices,
       const double                   tolerance)
     {
-      typedef typename dealii::internal::
-        ActiveCellIterator<dim, spacedim, MeshType<dim, spacedim>>::type
-          active_cell_iterator;
+      using active_cell_iterator = typename dealii::internal::
+        ActiveCellIterator<dim, spacedim, MeshType<dim, spacedim>>::type;
 
       // The best distance is set to the
       // maximum allowable distance from
@@ -1154,10 +1152,8 @@ namespace GridTools
     // non-active cells, we will get to
     // the later on for further
     // consideration
-    typedef std::list<std::pair<typename MeshType::cell_iterator,
-                                typename MeshType::cell_iterator>>
-      CellList;
-
+    using CellList = std::list<std::pair<typename MeshType::cell_iterator,
+                                         typename MeshType::cell_iterator>>;
     CellList cell_list;
 
     // first push the coarse level cells
@@ -1275,8 +1271,8 @@ namespace GridTools
                       "or size equal to the number of elements in "
                       "the FECollection."));
 
-    typedef typename hp::DoFHandler<dim, spacedim>::active_cell_iterator
-      cell_iterator;
+    using cell_iterator =
+      typename hp::DoFHandler<dim, spacedim>::active_cell_iterator;
 
     std::pair<cell_iterator, Point<dim>> best_cell;
     // If we have only one element in the MappingCollection,
@@ -2056,9 +2052,8 @@ namespace GridTools
 
     // Match with a complexity of O(n^2). This could be improved...
     std::bitset<3> orientation;
-    typedef
-      typename std::set<std::pair<CellIterator, unsigned int>>::const_iterator
-        PairIterator;
+    using PairIterator =
+      typename std::set<std::pair<CellIterator, unsigned int>>::const_iterator;
     for (PairIterator it1 = pairs1.begin(); it1 != pairs1.end(); ++it1)
       {
         for (PairIterator it2 = pairs2.begin(); it2 != pairs2.end(); ++it2)
@@ -2303,8 +2298,8 @@ namespace GridTools
   template <>
   struct OrientationLookupTable<1>
   {
-    typedef std::array<unsigned int, GeometryInfo<1>::vertices_per_face>
-      MATCH_T;
+    using MATCH_T =
+      std::array<unsigned int, GeometryInfo<1>::vertices_per_face>;
     static inline std::bitset<3>
     lookup(const MATCH_T &)
     {
@@ -2316,8 +2311,8 @@ namespace GridTools
   template <>
   struct OrientationLookupTable<2>
   {
-    typedef std::array<unsigned int, GeometryInfo<2>::vertices_per_face>
-      MATCH_T;
+    using MATCH_T =
+      std::array<unsigned int, GeometryInfo<2>::vertices_per_face>;
     static inline std::bitset<3>
     lookup(const MATCH_T &matching)
     {
@@ -2342,8 +2337,8 @@ namespace GridTools
   template <>
   struct OrientationLookupTable<3>
   {
-    typedef std::array<unsigned int, GeometryInfo<3>::vertices_per_face>
-      MATCH_T;
+    using MATCH_T =
+      std::array<unsigned int, GeometryInfo<3>::vertices_per_face>;
     static inline std::bitset<3>
     lookup(const MATCH_T &matching)
     {
index e7dccc92a2307cca5985fc49849edbf8c302e370..634de4fafb4cd849919f874ee7c9d7d1edac2bc7 100644 (file)
@@ -927,7 +927,7 @@ namespace
                           unsigned int>,
                 std::bitset<3>>> &periodic_face_map)
   {
-    typedef typename Triangulation<dim, spacedim>::face_iterator FaceIterator;
+    using FaceIterator = typename Triangulation<dim, spacedim>::face_iterator;
     const FaceIterator face_1 = cell_1->face(n_face_1);
     const FaceIterator face_2 = cell_2->face(n_face_2);
 
@@ -952,9 +952,9 @@ namespace
            ExcMessage("Periodic faces must be on the boundary"));
 
     // insert periodic face pair for both cells
-    typedef std::pair<typename Triangulation<dim, spacedim>::cell_iterator,
-                      unsigned int>
-                                              CellFace;
+    using CellFace =
+      std::pair<typename Triangulation<dim, spacedim>::cell_iterator,
+                unsigned int>;
     const CellFace                            cell_face_1(cell_1, n_face_1);
     const CellFace                            cell_face_2(cell_2, n_face_2);
     const std::pair<CellFace, std::bitset<3>> cell_face_orientation_2(
@@ -1312,7 +1312,7 @@ namespace internal
      *
      * Ideally, we would make this class a member class of the
      * Triangulation<dim,spacedim> class, since then our implementation
-     * functions have immediate access to the typedefs and static functions of
+     * functions have immediate access to the alias and static functions of
      * the surrounding Triangulation class. I.e., we do not have to write
      * "typename Triangulation<dim,spacedim>::active_cell_iterator" but can
      * write "active_cell_iterator" right away. This is, in fact, the way it was
@@ -1374,8 +1374,8 @@ namespace internal
         const unsigned int                                     level_objects,
         internal::TriangulationImplementation::NumberCache<1> &number_cache)
       {
-        typedef
-          typename Triangulation<dim, spacedim>::line_iterator line_iterator;
+        using line_iterator =
+          typename Triangulation<dim, spacedim>::line_iterator;
 
         number_cache.n_levels = 0;
         if (level_objects > 0)
@@ -1475,8 +1475,8 @@ namespace internal
           static_cast<internal::TriangulationImplementation::NumberCache<1> &>(
             number_cache));
 
-        typedef
-          typename Triangulation<dim, spacedim>::quad_iterator quad_iterator;
+        using quad_iterator =
+          typename Triangulation<dim, spacedim>::quad_iterator;
 
         ///////////////////////////////////
         // update the number of quads on the different levels in the
@@ -1581,8 +1581,8 @@ namespace internal
           static_cast<internal::TriangulationImplementation::NumberCache<2> &>(
             number_cache));
 
-        typedef
-          typename Triangulation<dim, spacedim>::hex_iterator hex_iterator;
+        using hex_iterator =
+          typename Triangulation<dim, spacedim>::hex_iterator;
 
         ///////////////////////////////////
         // update the number of hexes on the different levels in the
index ac8f3b745636492482bcac70198881deb53d2c44..5e58dc5ac691d1fb433909bd60403dafd4e87b71 100644 (file)
@@ -2523,7 +2523,7 @@ CellAccessor<dim, spacedim>::has_periodic_neighbor(
    * We decided to use the 2nd option.
    */
   AssertIndexRange(i_face, GeometryInfo<dim>::faces_per_cell);
-  typedef TriaIterator<CellAccessor<dim, spacedim>> cell_iterator;
+  using cell_iterator = TriaIterator<CellAccessor<dim, spacedim>>;
   // my_it : is the iterator to the current cell.
   cell_iterator my_it(*this);
   if (this->tria->periodic_face_map.find(
@@ -2548,8 +2548,8 @@ CellAccessor<dim, spacedim>::periodic_neighbor(const unsigned int i_face) const
    * being the current cell_face.
    */
   AssertIndexRange(i_face, GeometryInfo<dim>::faces_per_cell);
-  typedef TriaIterator<CellAccessor<dim, spacedim>> cell_iterator;
-  cell_iterator                                     my_it(*this);
+  using cell_iterator = TriaIterator<CellAccessor<dim, spacedim>>;
+  cell_iterator my_it(*this);
 
   const typename std::map<std::pair<cell_iterator, unsigned int>,
                           std::pair<std::pair<cell_iterator, unsigned int>,
@@ -2600,8 +2600,8 @@ CellAccessor<dim, spacedim>::periodic_neighbor_child_on_subface(
    *                    neighboring face.
    */
   AssertIndexRange(i_face, GeometryInfo<dim>::faces_per_cell);
-  typedef TriaIterator<CellAccessor<dim, spacedim>> cell_iterator;
-  cell_iterator                                     my_it(*this);
+  using cell_iterator = TriaIterator<CellAccessor<dim, spacedim>>;
+  cell_iterator my_it(*this);
   const typename std::map<std::pair<cell_iterator, unsigned int>,
                           std::pair<std::pair<cell_iterator, unsigned int>,
                                     std::bitset<3>>>::const_iterator
@@ -2653,7 +2653,7 @@ CellAccessor<dim, spacedim>::periodic_neighbor_of_coarser_periodic_neighbor(
    * cell.
    */
   AssertIndexRange(i_face, GeometryInfo<dim>::faces_per_cell);
-  typedef TriaIterator<CellAccessor<dim, spacedim>> cell_iterator;
+  using cell_iterator         = TriaIterator<CellAccessor<dim, spacedim>>;
   const int     my_face_index = this->face_index(i_face);
   cell_iterator my_it(*this);
   const typename std::map<std::pair<cell_iterator, unsigned int>,
@@ -2744,8 +2744,8 @@ CellAccessor<dim, spacedim>::periodic_neighbor_face_no(
    * being the current cell_face.
    */
   AssertIndexRange(i_face, GeometryInfo<dim>::faces_per_cell);
-  typedef TriaIterator<CellAccessor<dim, spacedim>> cell_iterator;
-  cell_iterator                                     my_it(*this);
+  using cell_iterator = TriaIterator<CellAccessor<dim, spacedim>>;
+  cell_iterator my_it(*this);
   const typename std::map<std::pair<cell_iterator, unsigned int>,
                           std::pair<std::pair<cell_iterator, unsigned int>,
                                     std::bitset<3>>>::const_iterator
@@ -2786,8 +2786,8 @@ CellAccessor<dim, spacedim>::periodic_neighbor_is_coarser(
    * first pair being the periodic neighbor cell_face.
    */
   AssertIndexRange(i_face, GeometryInfo<dim>::faces_per_cell);
-  typedef TriaIterator<CellAccessor<dim, spacedim>> cell_iterator;
-  cell_iterator                                     my_it(*this);
+  using cell_iterator = TriaIterator<CellAccessor<dim, spacedim>>;
+  cell_iterator my_it(*this);
   const typename std::map<std::pair<cell_iterator, unsigned int>,
                           std::pair<std::pair<cell_iterator, unsigned int>,
                                     std::bitset<3>>>::const_iterator
index 7d5675fe64bfaf2f95a4868e598b9f386173efbf..b4e6d9ed5fb10d62f48d4de4cf2c5ab8fb05b7f0 100644 (file)
@@ -23,7 +23,7 @@ namespace PETScWrappers
 {
   namespace MPI
   {
-    typedef types::global_dof_index size_type;
+    using size_type = types::global_dof_index;
 
     void
     BlockVector::reinit(const unsigned int num_blocks)
index a968b3c01dda463bc6b22accdf4ef3e4aa819099..d060d882cd1b9a6bcfbb4773cc1f465328d5663d 100644 (file)
@@ -929,9 +929,8 @@ namespace SparsityTools
     for (DynamicSparsityPattern::size_type i = 0; i < rows_per_cpu.size(); ++i)
       start_index[i + 1] = start_index[i] + rows_per_cpu[i];
 
-    typedef std::map<DynamicSparsityPattern::size_type,
-                     std::vector<DynamicSparsityPattern::size_type>>
-      map_vec_t;
+    using map_vec_t = std::map<DynamicSparsityPattern::size_type,
+                               std::vector<DynamicSparsityPattern::size_type>>;
 
     map_vec_t send_data;
 
@@ -1073,9 +1072,9 @@ namespace SparsityTools
   {
     const unsigned int myid = Utilities::MPI::this_mpi_process(mpi_comm);
 
-    typedef std::map<BlockDynamicSparsityPattern::size_type,
-                     std::vector<BlockDynamicSparsityPattern::size_type>>
-              map_vec_t;
+    using map_vec_t =
+      std::map<BlockDynamicSparsityPattern::size_type,
+               std::vector<BlockDynamicSparsityPattern::size_type>>;
     map_vec_t send_data;
 
     {
index 808a5a89e82d621909aca34b93e0187d1e008e1f..375a465e7e54a0633f201c0691dfbd2b3d3e1162 100644 (file)
@@ -210,7 +210,7 @@ namespace TrilinosWrappers
     // std::shared_ptr.
 
     // For now, just use serial node, i.e. no multithreaing or GPU.
-    typedef KokkosClassic::DefaultNode::DefaultNodeType node;
+    using node = KokkosClassic::DefaultNode::DefaultNodeType;
     preconditioner.reset();
 
     // Cast matrix into a MueLu::Matrix. The constness needs to be cast away.
index fe657772ef6d0225f4072c85cdbef2ae7ffb9856..decc2096a4ef72e127472cb638f0375dcd931389 100644 (file)
@@ -468,7 +468,7 @@ namespace TrilinosWrappers
 
   namespace
   {
-    typedef SparseMatrix::size_type size_type;
+    using size_type = SparseMatrix::size_type;
 
     template <typename SparsityPatternType>
     void
@@ -2223,7 +2223,7 @@ namespace TrilinosWrappers
 
   namespace internals
   {
-    typedef dealii::types::global_dof_index size_type;
+    using size_type = dealii::types::global_dof_index;
 
     void
     perform_mmult(const SparseMatrix &inputleft,
@@ -3219,10 +3219,10 @@ namespace TrilinosWrappers
       operator+(const TrilinosPayload &first_op,
                 const TrilinosPayload &second_op)
       {
-        typedef typename TrilinosPayload::Domain     Domain;
-        typedef typename TrilinosPayload::Range      Range;
-        typedef typename TrilinosPayload::VectorType Intermediate;
-        typedef TrilinosWrappers::MPI::Vector        GVMVectorType;
+        using Domain        = typename TrilinosPayload::Domain;
+        using Range         = typename TrilinosPayload::Range;
+        using Intermediate  = typename TrilinosPayload::VectorType;
+        using GVMVectorType = TrilinosWrappers::MPI::Vector;
 
         Assert(first_op.locally_owned_domain_indices() ==
                  second_op.locally_owned_domain_indices(),
@@ -3414,10 +3414,10 @@ namespace TrilinosWrappers
       TrilinosPayload operator*(const TrilinosPayload &first_op,
                                 const TrilinosPayload &second_op)
       {
-        typedef typename TrilinosPayload::Domain     Domain;
-        typedef typename TrilinosPayload::Range      Range;
-        typedef typename TrilinosPayload::VectorType Intermediate;
-        typedef TrilinosWrappers::MPI::Vector        GVMVectorType;
+        using Domain        = typename TrilinosPayload::Domain;
+        using Range         = typename TrilinosPayload::Range;
+        using Intermediate  = typename TrilinosPayload::VectorType;
+        using GVMVectorType = TrilinosWrappers::MPI::Vector;
 
         AssertThrow(first_op.locally_owned_domain_indices() ==
                       second_op.locally_owned_range_indices(),
index 45a5c62ddb016764609f967796c8fe5014568aae..6960fc94d7aa3d7a923fe5ea5688b0fd07e6d2b1 100644 (file)
@@ -270,7 +270,7 @@ namespace TrilinosWrappers
 
   namespace
   {
-    typedef SparsityPattern::size_type size_type;
+    using size_type = SparsityPattern::size_type;
 
     void
     reinit_sp(const Epetra_Map &                  row_map,
index 015355c836867cffbde70beffa9c0c8817df9ad5..5d770bdf8b1927424b951a4336938c3341a9434f 100644 (file)
@@ -243,8 +243,8 @@ MGTransferSelect<number>::do_copy_to_mg(
     {
       --level;
 
-      typedef std::vector<
-        std::pair<types::global_dof_index, unsigned int>>::const_iterator IT;
+      using IT = std::vector<
+        std::pair<types::global_dof_index, unsigned int>>::const_iterator;
       for (IT i = copy_to_and_from_indices[level].begin();
            i != copy_to_and_from_indices[level].end();
            ++i)
index a65f52d7d3b145d35c39a6481bea1d671aeb8998..ac0086e2f4bc9f9baf684adc7aec677ed18c1ab3 100644 (file)
@@ -88,13 +88,13 @@ namespace DerivativeApproximation
        * Declare the data type which holds the derivative described by this
        * class.
        */
-      typedef Tensor<1, dim> Derivative;
+      using Derivative = Tensor<1, dim>;
 
       /**
        * Likewise declare the data type that holds the derivative projected to a
        * certain directions.
        */
-      typedef Tensor<0, dim> ProjectedDerivative;
+      using ProjectedDerivative = Tensor<0, dim>;
 
       /**
        * Given an FEValues object initialized to a cell, and a solution vector,
@@ -201,13 +201,13 @@ namespace DerivativeApproximation
        * Declare the data type which holds the derivative described by this
        * class.
        */
-      typedef Tensor<2, dim> Derivative;
+      using Derivative = Tensor<2, dim>;
 
       /**
        * Likewise declare the data type that holds the derivative projected to a
        * certain directions.
        */
-      typedef Tensor<1, dim> ProjectedDerivative;
+      using ProjectedDerivative = Tensor<1, dim>;
 
       /**
        * Given an FEValues object initialized to a cell, and a solution vector,
@@ -538,13 +538,13 @@ namespace DerivativeApproximation
        * holds the derivative described
        * by this class.
        */
-      typedef Tensor<3, dim> Derivative;
+      using Derivative = Tensor<3, dim>;
 
       /**
        * Likewise declare the data type that holds the derivative projected to a
        * certain directions.
        */
-      typedef Tensor<2, dim> ProjectedDerivative;
+      using ProjectedDerivative = Tensor<2, dim>;
 
       /**
        * Given an FEValues object initialized to a cell, and a solution vector,
@@ -676,32 +676,32 @@ namespace DerivativeApproximation
     {
     public:
       /**
-       * typedef to select the DerivativeDescription corresponding to the
+       * alias to select the DerivativeDescription corresponding to the
        * <tt>order</tt>th derivative. In this general template we set an unvalid
-       * typedef to void, the real typedefs have to be specialized.
+       * alias to void, the real alias have to be specialized.
        */
-      typedef void DerivDescr;
+      using DerivDescr = void;
     };
 
     template <int dim>
     class DerivativeSelector<1, dim>
     {
     public:
-      typedef Gradient<dim> DerivDescr;
+      using DerivDescr = Gradient<dim>;
     };
 
     template <int dim>
     class DerivativeSelector<2, dim>
     {
     public:
-      typedef SecondDerivative<dim> DerivDescr;
+      using DerivDescr = SecondDerivative<dim>;
     };
 
     template <int dim>
     class DerivativeSelector<3, dim>
     {
     public:
-      typedef ThirdDerivative<dim> DerivDescr;
+      using DerivDescr = ThirdDerivative<dim>;
     };
   } // namespace internal
 } // namespace DerivativeApproximation
@@ -986,11 +986,10 @@ namespace DerivativeApproximation
       Assert(component < dof_handler.get_fe(0).n_components(),
              ExcIndexRange(component, 0, dof_handler.get_fe(0).n_components()));
 
-      typedef std::tuple<
+      using Iterators = std::tuple<
         TriaActiveIterator<
           dealii::DoFCellAccessor<DoFHandlerType<dim, spacedim>, false>>,
-        Vector<float>::iterator>
-                                      Iterators;
+        Vector<float>::iterator>;
       SynchronousIterators<Iterators> begin(
         Iterators(dof_handler.begin_active(), derivative_norm.begin())),
         end(Iterators(dof_handler.end(), derivative_norm.end()));
index f4aad3e0629a502ed6316e3783ad06520b2951d3..ce3650a2d6178167a3d08505f5a7368467ac5c2f 100644 (file)
@@ -312,7 +312,7 @@ KellyErrorEstimator<1, spacedim>::estimate(
   const Strategy            strategy)
 {
   AssertThrow(strategy == cell_diameter_over_24, ExcNotImplemented());
-  typedef typename InputVector::value_type number;
+  using number = typename InputVector::value_type;
 #ifdef DEAL_II_WITH_P4EST
   if (dynamic_cast<const parallel::distributed::Triangulation<1, spacedim> *>(
         &dof_handler.get_triangulation()) != nullptr)
index d543657f39fd45e2289f2ea034f04c4511313649..b3ecbcf0de6457500e2b76f738ea521959bee7a9 100644 (file)
@@ -96,8 +96,7 @@ Histogram::evaluate(const std::vector<Vector<number>> &values,
 
       case logarithmic:
         {
-          typedef bool (*comparator)(const number, const number);
-          const comparator logarithmic_less_function =
+          const auto logarithmic_less_function =
             &Histogram::template logarithmic_less<number>;
 
           min_value = *std::min_element(values[0].begin(),
index 2c2cd70a1b2f8cd234f460df8523761e95b29878..7055a47f764fb744158d5718ddc3f3c4dcd57cef 100644 (file)
@@ -902,7 +902,7 @@ PointValueHistory<dim>::evaluate_field_at_requested_location(
   const std::string &vector_name,
   const VectorType & solution)
 {
-  typedef typename VectorType::value_type number;
+  using number = typename VectorType::value_type;
   // must be closed to add data to internal
   // members.
   Assert(closed, ExcInvalidState());
index 618e34990138941168dd094511f874f5fc8ba3e4..cd6f3833312f56e014f75c6cb7651660c7c5cfce 100644 (file)
@@ -540,7 +540,7 @@ namespace Particles
     // sizes for these vectors. If more space is needed an automatic and
     // relatively fast (compared to other parts of this algorithm)
     // re-allocation will happen.
-    typedef typename std::vector<particle_iterator>::size_type vector_size;
+    using vector_size = typename std::vector<particle_iterator>::size_type;
     sorted_particles.reserve(
       static_cast<vector_size>(particles_out_of_cell.size() * 1.25));
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.