]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use brace initializers for default arguments.
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 14 Aug 2018 15:21:43 +0000 (09:21 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 14 Aug 2018 15:21:43 +0000 (09:21 -0600)
include/deal.II/dofs/dof_tools.h
include/deal.II/grid/grid_generator.h
include/deal.II/grid/grid_tools.h
include/deal.II/multigrid/mg_tools.h
include/deal.II/numerics/matrix_tools.h
include/deal.II/numerics/vector_tools.h

index 74cd5edcfa975c1e1ae09d1b752b8b06ddecb707..3bad1c8312accef4ad719a3c779bb8f588116716 100644 (file)
@@ -1947,7 +1947,7 @@ namespace DoFTools
     SparsityPattern &                block_list,
     const DoFHandler<dim, spacedim> &dof_handler,
     const unsigned int               level,
-    const std::vector<bool> &        selected_dofs = std::vector<bool>(),
+    const std::vector<bool> &        selected_dofs = {},
     const types::global_dof_index    offset        = 0);
 
   /**
@@ -2156,7 +2156,7 @@ namespace DoFTools
     const DoFHandlerType &                dof_handler,
     std::vector<types::global_dof_index> &dofs_per_component,
     const bool                            vector_valued_once = false,
-    std::vector<unsigned int> target_component = std::vector<unsigned int>());
+    std::vector<unsigned int> target_component = {});
 
   /**
    * Count the degrees of freedom in each block. This function is similar to
index 6908b05d8572ed909a145f9b29d1cb31d77183c5..1d087408ed725903e2f9f7263052684cb9c45db6 100644 (file)
@@ -488,7 +488,7 @@ namespace GridGenerator
     Triangulation<dim, spacedim> &              tria,
     const Point<spacedim> &                     origin,
     const std::array<Tensor<1, spacedim>, dim> &edges,
-    const std::vector<unsigned int> &subdivisions = std::vector<unsigned int>(),
+    const std::vector<unsigned int> &subdivisions = {},
     const bool                       colorize     = false);
 
   /**
index 0322381f385c9b4b614a1b71c2bdef5e9ce78395..32b2a1c789850849191dde3d3c053719c49445e9 100644 (file)
@@ -892,7 +892,7 @@ namespace GridTools
   find_closest_vertex(
     const MeshType<dim, spacedim> &mesh,
     const Point<spacedim> &        p,
-    const std::vector<bool> &      marked_vertices = std::vector<bool>());
+    const std::vector<bool> &      marked_vertices = {});
 
   /**
    * Find and return the index of the used vertex (or marked vertex) in a
@@ -925,7 +925,7 @@ namespace GridTools
     const Mapping<dim, spacedim> & mapping,
     const MeshType<dim, spacedim> &mesh,
     const Point<spacedim> &        p,
-    const std::vector<bool> &      marked_vertices = std::vector<bool>());
+    const std::vector<bool> &      marked_vertices = {});
 
 
   /**
@@ -998,7 +998,7 @@ namespace GridTools
   find_active_cell_around_point(
     const MeshType<dim, spacedim> &mesh,
     const Point<spacedim> &        p,
-    const std::vector<bool> &      marked_vertices = std::vector<bool>());
+    const std::vector<bool> &      marked_vertices = {});
 
   /**
    * Find and return an iterator to the active cell that surrounds a given
@@ -1098,7 +1098,7 @@ namespace GridTools
     const Mapping<dim, spacedim> & mapping,
     const MeshType<dim, spacedim> &mesh,
     const Point<spacedim> &        p,
-    const std::vector<bool> &      marked_vertices = std::vector<bool>());
+    const std::vector<bool> &      marked_vertices = {});
 
   /**
    * A version of the previous function that exploits an already existing
@@ -1127,7 +1127,7 @@ namespace GridTools
     const std::vector<std::vector<Tensor<1, spacedim>>> &vertex_to_cell_centers,
     const typename MeshType<dim, spacedim>::active_cell_iterator &cell_hint =
       typename MeshType<dim, spacedim>::active_cell_iterator(),
-    const std::vector<bool> &marked_vertices = std::vector<bool>());
+    const std::vector<bool> &marked_vertices = {});
 
   /**
    * A version of the previous function where we use that mapping on a given
@@ -1172,7 +1172,7 @@ namespace GridTools
     const Point<spacedim> &     p,
     const typename Triangulation<dim, spacedim>::active_cell_iterator &
                              cell_hint = typename Triangulation<dim, spacedim>::active_cell_iterator(),
-    const std::vector<bool> &marked_vertices = std::vector<bool>());
+    const std::vector<bool> &marked_vertices = {});
 
   /**
    * A variant of the previous find_active_cell_around_point() function that,
@@ -1206,7 +1206,7 @@ namespace GridTools
     const MeshType<dim, spacedim> &mesh,
     const Point<spacedim> &        p,
     const double                   tolerance       = 1e-12,
-    const std::vector<bool> &      marked_vertices = std::vector<bool>());
+    const std::vector<bool> &      marked_vertices = {});
 
   /**
    * Return a list of all descendants of the given cell that are active. For
index 229e2ef72b30cb67af55d8a36bbaca0fdf80baa0..0d19320aca66ac1f2f66856a94e8c4f6b475a3e9 100644 (file)
@@ -169,7 +169,7 @@ namespace MGTools
   count_dofs_per_block(
     const DoFHandlerType &                             dof_handler,
     std::vector<std::vector<types::global_dof_index>> &dofs_per_block,
-    std::vector<unsigned int> target_block = std::vector<unsigned int>());
+    std::vector<unsigned int> target_block = {});
 
   /**
    * Count the dofs component-wise on each level.
@@ -184,7 +184,7 @@ namespace MGTools
     const DoFHandler<dim, spacedim> &                  mg_dof,
     std::vector<std::vector<types::global_dof_index>> &result,
     const bool                                         only_once = false,
-    std::vector<unsigned int> target_component = std::vector<unsigned int>());
+    std::vector<unsigned int> target_component = {});
 
   /**
    * Generate a list of those degrees of freedom at the boundary of the domain
index 9ec667af1b0792155ddbb3e2ac51a51aadc4a95d..e7e7f1d3b9f8e91fb4cf29661f2ff3196a09367f 100644 (file)
@@ -411,7 +411,7 @@ namespace MatrixCreator
     Vector<number> &                        rhs_vector,
     std::vector<types::global_dof_index> &  dof_to_boundary_mapping,
     const Function<spacedim, number> *const weight = 0,
-    std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
+    std::vector<unsigned int> component_mapping = {});
 
 
   /**
@@ -429,7 +429,7 @@ namespace MatrixCreator
     Vector<number> &                        rhs_vector,
     std::vector<types::global_dof_index> &  dof_to_boundary_mapping,
     const Function<spacedim, number> *const a   = nullptr,
-    std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
+    std::vector<unsigned int> component_mapping = {});
 
   /**
    * Same function as above, but for hp objects.
@@ -446,7 +446,7 @@ namespace MatrixCreator
     Vector<number> &                        rhs_vector,
     std::vector<types::global_dof_index> &  dof_to_boundary_mapping,
     const Function<spacedim, number> *const a   = nullptr,
-    std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
+    std::vector<unsigned int> component_mapping = {});
 
   /**
    * Same function as above, but for hp objects.
@@ -462,7 +462,7 @@ namespace MatrixCreator
     Vector<number> &                        rhs_vector,
     std::vector<types::global_dof_index> &  dof_to_boundary_mapping,
     const Function<spacedim, number> *const a   = nullptr,
-    std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
+    std::vector<unsigned int> component_mapping = {});
 
   /**
    * Assemble the Laplace matrix. If no coefficient is given (i.e., if the
index 58c4101a8e32a1ad26b35998fe64b6dd8f3e89dd..8625c536ce7a8bdeefb8ffac26bc2dc391e8334f 100644 (file)
@@ -1356,7 +1356,7 @@ namespace VectorTools
       &                                        boundary_functions,
     const Quadrature<dim - 1> &                q,
     std::map<types::global_dof_index, number> &boundary_values,
-    std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
+    std::vector<unsigned int> component_mapping = {});
 
   /**
    * Call the project_boundary_values() function, see above, with
@@ -1370,7 +1370,7 @@ namespace VectorTools
       &                                        boundary_function,
     const Quadrature<dim - 1> &                q,
     std::map<types::global_dof_index, number> &boundary_values,
-    std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
+    std::vector<unsigned int> component_mapping = {});
 
   /**
    * Same as above, but for objects of type hp::DoFHandler
@@ -1384,7 +1384,7 @@ namespace VectorTools
       &                                        boundary_functions,
     const hp::QCollection<dim - 1> &           q,
     std::map<types::global_dof_index, number> &boundary_values,
-    std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
+    std::vector<unsigned int> component_mapping = {});
 
   /**
    * Call the project_boundary_values() function, see above, with
@@ -1398,7 +1398,7 @@ namespace VectorTools
       &                                        boundary_function,
     const hp::QCollection<dim - 1> &           q,
     std::map<types::global_dof_index, number> &boundary_values,
-    std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
+    std::vector<unsigned int> component_mapping = {});
 
   /**
    * Project a function to the boundary of the domain, using the given
@@ -1447,7 +1447,7 @@ namespace VectorTools
       &                        boundary_functions,
     const Quadrature<dim - 1> &q,
     AffineConstraints<number> &constraints,
-    std::vector<unsigned int>  component_mapping = std::vector<unsigned int>());
+    std::vector<unsigned int>  component_mapping = {});
 
   /**
    * Call the project_boundary_values() function, see above, with
@@ -1463,7 +1463,7 @@ namespace VectorTools
       &                        boundary_function,
     const Quadrature<dim - 1> &q,
     AffineConstraints<number> &constraints,
-    std::vector<unsigned int>  component_mapping = std::vector<unsigned int>());
+    std::vector<unsigned int>  component_mapping = {});
 
 
   /**
@@ -3055,7 +3055,7 @@ namespace VectorTools
   template <typename VectorType>
   void
   subtract_mean_value(VectorType &             v,
-                      const std::vector<bool> &p_select = std::vector<bool>());
+                      const std::vector<bool> &p_select = {});
 
 
   /**

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.