From: Wolfgang Bangerth Date: Tue, 14 Aug 2018 15:21:43 +0000 (-0600) Subject: Use brace initializers for default arguments. X-Git-Tag: v9.1.0-rc1~823^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b33faa0c34ca75dd07de4240a4db83db6d25e7d;p=dealii.git Use brace initializers for default arguments. --- diff --git a/include/deal.II/dofs/dof_tools.h b/include/deal.II/dofs/dof_tools.h index 74cd5edcfa..3bad1c8312 100644 --- a/include/deal.II/dofs/dof_tools.h +++ b/include/deal.II/dofs/dof_tools.h @@ -1947,7 +1947,7 @@ namespace DoFTools SparsityPattern & block_list, const DoFHandler &dof_handler, const unsigned int level, - const std::vector & selected_dofs = std::vector(), + const std::vector & selected_dofs = {}, const types::global_dof_index offset = 0); /** @@ -2156,7 +2156,7 @@ namespace DoFTools const DoFHandlerType & dof_handler, std::vector &dofs_per_component, const bool vector_valued_once = false, - std::vector target_component = std::vector()); + std::vector target_component = {}); /** * Count the degrees of freedom in each block. This function is similar to diff --git a/include/deal.II/grid/grid_generator.h b/include/deal.II/grid/grid_generator.h index 6908b05d85..1d087408ed 100644 --- a/include/deal.II/grid/grid_generator.h +++ b/include/deal.II/grid/grid_generator.h @@ -488,7 +488,7 @@ namespace GridGenerator Triangulation & tria, const Point & origin, const std::array, dim> &edges, - const std::vector &subdivisions = std::vector(), + const std::vector &subdivisions = {}, const bool colorize = false); /** diff --git a/include/deal.II/grid/grid_tools.h b/include/deal.II/grid/grid_tools.h index 0322381f38..32b2a1c789 100644 --- a/include/deal.II/grid/grid_tools.h +++ b/include/deal.II/grid/grid_tools.h @@ -892,7 +892,7 @@ namespace GridTools find_closest_vertex( const MeshType &mesh, const Point & p, - const std::vector & marked_vertices = std::vector()); + const std::vector & marked_vertices = {}); /** * Find and return the index of the used vertex (or marked vertex) in a @@ -925,7 +925,7 @@ namespace GridTools const Mapping & mapping, const MeshType &mesh, const Point & p, - const std::vector & marked_vertices = std::vector()); + const std::vector & marked_vertices = {}); /** @@ -998,7 +998,7 @@ namespace GridTools find_active_cell_around_point( const MeshType &mesh, const Point & p, - const std::vector & marked_vertices = std::vector()); + const std::vector & marked_vertices = {}); /** * Find and return an iterator to the active cell that surrounds a given @@ -1098,7 +1098,7 @@ namespace GridTools const Mapping & mapping, const MeshType &mesh, const Point & p, - const std::vector & marked_vertices = std::vector()); + const std::vector & marked_vertices = {}); /** * A version of the previous function that exploits an already existing @@ -1127,7 +1127,7 @@ namespace GridTools const std::vector>> &vertex_to_cell_centers, const typename MeshType::active_cell_iterator &cell_hint = typename MeshType::active_cell_iterator(), - const std::vector &marked_vertices = std::vector()); + const std::vector &marked_vertices = {}); /** * A version of the previous function where we use that mapping on a given @@ -1172,7 +1172,7 @@ namespace GridTools const Point & p, const typename Triangulation::active_cell_iterator & cell_hint = typename Triangulation::active_cell_iterator(), - const std::vector &marked_vertices = std::vector()); + const std::vector &marked_vertices = {}); /** * A variant of the previous find_active_cell_around_point() function that, @@ -1206,7 +1206,7 @@ namespace GridTools const MeshType &mesh, const Point & p, const double tolerance = 1e-12, - const std::vector & marked_vertices = std::vector()); + const std::vector & marked_vertices = {}); /** * Return a list of all descendants of the given cell that are active. For diff --git a/include/deal.II/multigrid/mg_tools.h b/include/deal.II/multigrid/mg_tools.h index 229e2ef72b..0d19320aca 100644 --- a/include/deal.II/multigrid/mg_tools.h +++ b/include/deal.II/multigrid/mg_tools.h @@ -169,7 +169,7 @@ namespace MGTools count_dofs_per_block( const DoFHandlerType & dof_handler, std::vector> &dofs_per_block, - std::vector target_block = std::vector()); + std::vector target_block = {}); /** * Count the dofs component-wise on each level. @@ -184,7 +184,7 @@ namespace MGTools const DoFHandler & mg_dof, std::vector> &result, const bool only_once = false, - std::vector target_component = std::vector()); + std::vector target_component = {}); /** * Generate a list of those degrees of freedom at the boundary of the domain diff --git a/include/deal.II/numerics/matrix_tools.h b/include/deal.II/numerics/matrix_tools.h index 9ec667af1b..e7e7f1d3b9 100644 --- a/include/deal.II/numerics/matrix_tools.h +++ b/include/deal.II/numerics/matrix_tools.h @@ -411,7 +411,7 @@ namespace MatrixCreator Vector & rhs_vector, std::vector & dof_to_boundary_mapping, const Function *const weight = 0, - std::vector component_mapping = std::vector()); + std::vector component_mapping = {}); /** @@ -429,7 +429,7 @@ namespace MatrixCreator Vector & rhs_vector, std::vector & dof_to_boundary_mapping, const Function *const a = nullptr, - std::vector component_mapping = std::vector()); + std::vector component_mapping = {}); /** * Same function as above, but for hp objects. @@ -446,7 +446,7 @@ namespace MatrixCreator Vector & rhs_vector, std::vector & dof_to_boundary_mapping, const Function *const a = nullptr, - std::vector component_mapping = std::vector()); + std::vector component_mapping = {}); /** * Same function as above, but for hp objects. @@ -462,7 +462,7 @@ namespace MatrixCreator Vector & rhs_vector, std::vector & dof_to_boundary_mapping, const Function *const a = nullptr, - std::vector component_mapping = std::vector()); + std::vector component_mapping = {}); /** * Assemble the Laplace matrix. If no coefficient is given (i.e., if the diff --git a/include/deal.II/numerics/vector_tools.h b/include/deal.II/numerics/vector_tools.h index 58c4101a8e..8625c536ce 100644 --- a/include/deal.II/numerics/vector_tools.h +++ b/include/deal.II/numerics/vector_tools.h @@ -1356,7 +1356,7 @@ namespace VectorTools & boundary_functions, const Quadrature & q, std::map &boundary_values, - std::vector component_mapping = std::vector()); + std::vector component_mapping = {}); /** * Call the project_boundary_values() function, see above, with @@ -1370,7 +1370,7 @@ namespace VectorTools & boundary_function, const Quadrature & q, std::map &boundary_values, - std::vector component_mapping = std::vector()); + std::vector component_mapping = {}); /** * Same as above, but for objects of type hp::DoFHandler @@ -1384,7 +1384,7 @@ namespace VectorTools & boundary_functions, const hp::QCollection & q, std::map &boundary_values, - std::vector component_mapping = std::vector()); + std::vector component_mapping = {}); /** * Call the project_boundary_values() function, see above, with @@ -1398,7 +1398,7 @@ namespace VectorTools & boundary_function, const hp::QCollection & q, std::map &boundary_values, - std::vector component_mapping = std::vector()); + std::vector component_mapping = {}); /** * Project a function to the boundary of the domain, using the given @@ -1447,7 +1447,7 @@ namespace VectorTools & boundary_functions, const Quadrature &q, AffineConstraints &constraints, - std::vector component_mapping = std::vector()); + std::vector component_mapping = {}); /** * Call the project_boundary_values() function, see above, with @@ -1463,7 +1463,7 @@ namespace VectorTools & boundary_function, const Quadrature &q, AffineConstraints &constraints, - std::vector component_mapping = std::vector()); + std::vector component_mapping = {}); /** @@ -3055,7 +3055,7 @@ namespace VectorTools template void subtract_mean_value(VectorType & v, - const std::vector &p_select = std::vector()); + const std::vector &p_select = {}); /**