From: Matthias Maier Date: Wed, 23 Aug 2023 18:29:59 +0000 (-0500) Subject: clang-format: run indent-all X-Git-Tag: relicensing~558^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4e31a6498126ff6b63589ca622ce314f3ed6440;p=dealii.git clang-format: run indent-all --- diff --git a/contrib/python-bindings/include/mapping_wrapper.h b/contrib/python-bindings/include/mapping_wrapper.h index 3a6bea4714..52c2ee2aa8 100644 --- a/contrib/python-bindings/include/mapping_wrapper.h +++ b/contrib/python-bindings/include/mapping_wrapper.h @@ -67,7 +67,7 @@ namespace python PointWrapper project_real_point_to_unit_point_on_face(CellAccessorWrapper &cell, const unsigned int face_no, - PointWrapper & point); + PointWrapper &point); /** * Get the underlying mapping. diff --git a/contrib/python-bindings/include/tria_accessor_wrapper.h b/contrib/python-bindings/include/tria_accessor_wrapper.h index 410134ed1c..c81e060cb3 100644 --- a/contrib/python-bindings/include/tria_accessor_wrapper.h +++ b/contrib/python-bindings/include/tria_accessor_wrapper.h @@ -38,7 +38,7 @@ namespace python /** * Constructor. */ - TriaAccessorWrapper(void * tria_accessor, + TriaAccessorWrapper(void *tria_accessor, const int structdim, const int dim, const int spacedim); diff --git a/contrib/python-bindings/include/triangulation_wrapper.h b/contrib/python-bindings/include/triangulation_wrapper.h index 6be5b44fe6..995aeb170b 100644 --- a/contrib/python-bindings/include/triangulation_wrapper.h +++ b/contrib/python-bindings/include/triangulation_wrapper.h @@ -145,8 +145,8 @@ namespace python */ void generate_subdivided_hyper_rectangle(boost::python::list &repetitions, - PointWrapper & p1, - PointWrapper & p2, + PointWrapper &p1, + PointWrapper &p2, const bool colorize = false); /** @@ -159,8 +159,8 @@ namespace python */ void generate_subdivided_steps_hyper_rectangle(boost::python::list &step_sizes, - PointWrapper & p1, - PointWrapper & p2, + PointWrapper &p1, + PointWrapper &p2, const bool colorize = false); /** @@ -174,7 +174,7 @@ namespace python void generate_subdivided_material_hyper_rectangle( boost::python::list &spacing, - PointWrapper & p, + PointWrapper &p, boost::python::list &material_id, const bool colorize = false); @@ -260,7 +260,7 @@ namespace python /*! @copydoc GridGenerator::hyper_shell */ void - generate_hyper_shell(PointWrapper & center, + generate_hyper_shell(PointWrapper ¢er, const double inner_radius, const double outer_radius, const unsigned n_cells = 0, @@ -287,7 +287,7 @@ namespace python */ void replicate_triangulation(TriangulationWrapper &tria_in, - boost::python::list & extents); + boost::python::list &extents); /*! @copydoc GridGenerator::flatten_triangulation */ @@ -319,7 +319,7 @@ namespace python /*! @copydoc GridTools::find_active_cell_around_point */ CellAccessorWrapper - find_active_cell_around_point(PointWrapper & p, + find_active_cell_around_point(PointWrapper &p, MappingQWrapper mapping = MappingQWrapper()); /*! @copydoc GridTools::find_cells_adjacent_to_vertex @@ -384,7 +384,7 @@ namespace python /*! @copydoc GridTools::compute_aspect_ratio_of_cells */ boost::python::list - compute_aspect_ratio_of_cells(const MappingQWrapper & mapping, + compute_aspect_ratio_of_cells(const MappingQWrapper &mapping, const QuadratureWrapper &quadrature); /** diff --git a/contrib/python-bindings/source/mapping_wrapper.cc b/contrib/python-bindings/source/mapping_wrapper.cc index 3c09468413..5e7dd18f29 100644 --- a/contrib/python-bindings/source/mapping_wrapper.cc +++ b/contrib/python-bindings/source/mapping_wrapper.cc @@ -91,7 +91,7 @@ namespace python project_real_point_to_unit_point_on_face(void *mapping_ptr, void *cell_accessor_ptr, const unsigned int face_no, - void * point_ptr) + void *point_ptr) { const MappingQ *mapping = static_cast *>(mapping_ptr); @@ -218,7 +218,7 @@ namespace python PointWrapper MappingQWrapper::transform_unit_to_real_cell(CellAccessorWrapper &cell, - PointWrapper & p) + PointWrapper &p) { AssertThrow( dim == p.get_dim(), @@ -243,7 +243,7 @@ namespace python PointWrapper MappingQWrapper::transform_real_to_unit_cell(CellAccessorWrapper &cell, - PointWrapper & p) + PointWrapper &p) { AssertThrow( spacedim == p.get_dim(), @@ -270,7 +270,7 @@ namespace python MappingQWrapper::project_real_point_to_unit_point_on_face( CellAccessorWrapper &cell, const unsigned int face_no, - PointWrapper & p) + PointWrapper &p) { AssertThrow( spacedim == p.get_dim(), diff --git a/contrib/python-bindings/source/tria_accessor_wrapper.cc b/contrib/python-bindings/source/tria_accessor_wrapper.cc index 37c442e13c..2d11854974 100644 --- a/contrib/python-bindings/source/tria_accessor_wrapper.cc +++ b/contrib/python-bindings/source/tria_accessor_wrapper.cc @@ -211,7 +211,7 @@ namespace python ExcMessage("Wrong structdim-dim-spacedim combination.")); } - TriaAccessorWrapper::TriaAccessorWrapper(void * tria_accessor, + TriaAccessorWrapper::TriaAccessorWrapper(void *tria_accessor, const int structdim, const int dim, const int spacedim) diff --git a/contrib/python-bindings/source/triangulation_wrapper.cc b/contrib/python-bindings/source/triangulation_wrapper.cc index 5eb2bb611e..e802415a7c 100644 --- a/contrib/python-bindings/source/triangulation_wrapper.cc +++ b/contrib/python-bindings/source/triangulation_wrapper.cc @@ -39,7 +39,7 @@ namespace python void create_triangulation(const boost::python::list &vertices_list, const boost::python::list &cells_vertices, - void * triangulation) + void *triangulation) { Triangulation *tria = static_cast *>(triangulation); @@ -77,7 +77,7 @@ namespace python generate_hyper_cube(const double left, const double right, const bool colorize, - void * triangulation) + void *triangulation) { Triangulation *tria = static_cast *>(triangulation); @@ -90,7 +90,7 @@ namespace python template void generate_simplex(std::vector &wrapped_points, - void * triangulation) + void *triangulation) { // Cast the PointWrapper objects to Point std::vector> points(dim + 1); @@ -111,7 +111,7 @@ namespace python generate_subdivided_hyper_cube(const unsigned int repetitions, const double left, const double right, - void * triangulation) + void *triangulation) { Triangulation *tria = static_cast *>(triangulation); @@ -126,7 +126,7 @@ namespace python generate_hyper_rectangle(PointWrapper &p1, PointWrapper &p2, const bool colorize, - void * triangulation) + void *triangulation) { AssertThrow( p1.get_dim() == dim, @@ -154,7 +154,7 @@ namespace python const double L, const unsigned int repetitions, const bool colorize, - void * triangulation) + void *triangulation) { Triangulation *tria = static_cast *>(triangulation); @@ -169,10 +169,10 @@ namespace python void generate_subdivided_hyper_rectangle( const std::vector &repetitions, - PointWrapper & p1, - PointWrapper & p2, + PointWrapper &p1, + PointWrapper &p2, const bool colorize, - void * triangulation) + void *triangulation) { AssertThrow( p1.get_dim() == dim, @@ -199,10 +199,10 @@ namespace python void generate_subdivided_steps_hyper_rectangle( const std::vector> &step_sizes, - PointWrapper & p1, - PointWrapper & p2, + PointWrapper &p1, + PointWrapper &p2, const bool colorize, - void * triangulation) + void *triangulation) { AssertThrow( p1.get_dim() == dim, @@ -229,10 +229,10 @@ namespace python void generate_subdivided_material_hyper_rectangle( const std::vector> &spacing, - PointWrapper & p, - const Table & material_ids, + PointWrapper &p, + const Table &material_ids, const bool colorize, - void * triangulation) + void *triangulation) { AssertThrow( p.get_dim() == dim, @@ -265,7 +265,7 @@ namespace python void generate_general_cell(std::vector &wrapped_points, const bool colorize, - void * triangulation) + void *triangulation) { // Cast the PointWrapper objects to Point const unsigned int size = wrapped_points.size(); @@ -286,7 +286,7 @@ namespace python void generate_parallelogram(std::vector &wrapped_points, const bool colorize, - void * triangulation) + void *triangulation) { // Cast the PointWrapper objects to Point Point points[dim]; @@ -306,7 +306,7 @@ namespace python void generate_parallelepiped(std::vector &wrapped_points, const bool colorize, - void * triangulation) + void *triangulation) { // Cast the PointWrapper objects to Point Point points[dim]; @@ -328,7 +328,7 @@ namespace python unsigned int n_subdivisions, std::vector &wrapped_points, const bool colorize, - void * triangulation) + void *triangulation) { // Cast the PointWrapper objects to Point Point points[dim]; @@ -353,7 +353,7 @@ namespace python std::vector &n_subdivisions, std::vector &wrapped_points, const bool colorize, - void * triangulation) + void *triangulation) { // Cast the PointWrapper objects to Point Point points[dim]; @@ -382,7 +382,7 @@ namespace python const double right, const double thickness, const bool colorize, - void * triangulation) + void *triangulation) { Triangulation *tria = static_cast *>(triangulation); @@ -397,7 +397,7 @@ namespace python void generate_hyper_ball(PointWrapper ¢er, const double radius, - void * triangulation) + void *triangulation) { // Cast the PointWrapper object to Point Point center_point = @@ -415,7 +415,7 @@ namespace python void generate_hyper_sphere(PointWrapper ¢er, const double radius, - void * triangulation) + void *triangulation) { // Cast the PointWrapper object to Point Point center_point = @@ -430,12 +430,12 @@ namespace python template void - generate_hyper_shell(PointWrapper & center, + generate_hyper_shell(PointWrapper ¢er, const double inner_radius, const double outer_radius, const unsigned n_cells, bool colorize, - void * triangulation) + void *triangulation) { // Cast the PointWrapper object to Point Point center_point = @@ -453,7 +453,7 @@ namespace python void generate_quarter_hyper_ball(PointWrapper ¢er, const double radius, - void * triangulation) + void *triangulation) { // Cast the PointWrapper object to Point Point center_point = @@ -471,7 +471,7 @@ namespace python void generate_half_hyper_ball(PointWrapper ¢er, const double radius, - void * triangulation) + void *triangulation) { // Cast the PointWrapper object to Point Point center_point = @@ -515,7 +515,7 @@ namespace python template void merge_triangulations(boost::python::list &triangulations, - void * triangulation, + void *triangulation, const double duplicated_vertex_tolerance, const bool copy_manifold_ids) { @@ -557,7 +557,7 @@ namespace python template void - convert_hypercube_to_simplex_mesh(void * triangulation, + convert_hypercube_to_simplex_mesh(void *triangulation, TriangulationWrapper &tria_out) { Triangulation *tria = @@ -572,9 +572,9 @@ namespace python template void - replicate_triangulation(TriangulationWrapper & tria_in, + replicate_triangulation(TriangulationWrapper &tria_in, const boost::python::list &extents, - void * tria_out) + void *tria_out) { Triangulation *replicated_triangulation = static_cast *>(tria_out); @@ -598,7 +598,7 @@ namespace python void distort_random(const double factor, const bool keep_boundary, - void * triangulation) + void *triangulation) { Triangulation *tria = static_cast *>(triangulation); @@ -640,9 +640,9 @@ namespace python template std::pair - find_active_cell_around_point(PointWrapper & p, + find_active_cell_around_point(PointWrapper &p, MappingQWrapper &mapping_wrapper, - void * triangulation) + void *triangulation) { Triangulation *tria = static_cast *>(triangulation); @@ -671,8 +671,8 @@ namespace python template boost::python::list compute_aspect_ratio_of_cells( - const MappingQWrapper & mapping_wrapper, - const QuadratureWrapper & quadrature_wrapper, + const MappingQWrapper &mapping_wrapper, + const QuadratureWrapper &quadrature_wrapper, const TriangulationWrapper &triangulation_wrapper) { const Triangulation *tria = @@ -783,7 +783,7 @@ namespace python void write(const std::string &filename, const std::string &format, - const void * triangulation) + const void *triangulation) { const Triangulation *tria = static_cast *>(triangulation); @@ -824,7 +824,7 @@ namespace python void read(const std::string &filename, const std::string &format, - void * triangulation) + void *triangulation) { Triangulation *tria = static_cast *>(triangulation); @@ -1046,8 +1046,8 @@ namespace python void TriangulationWrapper::generate_subdivided_hyper_rectangle( boost::python::list &repetition_list, - PointWrapper & p1, - PointWrapper & p2, + PointWrapper &p1, + PointWrapper &p2, const bool colorize) { AssertThrow( @@ -1076,8 +1076,8 @@ namespace python void TriangulationWrapper::generate_subdivided_steps_hyper_rectangle( boost::python::list &step_sizes_list, - PointWrapper & p1, - PointWrapper & p2, + PointWrapper &p1, + PointWrapper &p2, const bool colorize) { AssertThrow( @@ -1112,7 +1112,7 @@ namespace python void TriangulationWrapper::generate_subdivided_material_hyper_rectangle( boost::python::list &spacing_list, - PointWrapper & p, + PointWrapper &p, boost::python::list &material_id_list, const bool colorize) { @@ -1375,7 +1375,7 @@ namespace python void - TriangulationWrapper::generate_hyper_shell(PointWrapper & center, + TriangulationWrapper::generate_hyper_shell(PointWrapper ¢er, const double inner_radius, const double outer_radius, const unsigned n_cells, @@ -1604,7 +1604,7 @@ namespace python void TriangulationWrapper::replicate_triangulation( TriangulationWrapper &triangulation_in, - boost::python::list & extents) + boost::python::list &extents) { AssertThrow( boost::python::len(extents) == dim, @@ -1661,7 +1661,7 @@ namespace python CellAccessorWrapper - TriangulationWrapper::find_active_cell_around_point(PointWrapper & p, + TriangulationWrapper::find_active_cell_around_point(PointWrapper &p, MappingQWrapper mapping) { std::pair level_index_pair; @@ -1704,7 +1704,7 @@ namespace python boost::python::list TriangulationWrapper::compute_aspect_ratio_of_cells( - const MappingQWrapper & mapping, + const MappingQWrapper &mapping, const QuadratureWrapper &quadrature) { if ((dim == 2) && (spacedim == 2)) diff --git a/examples/step-12/step-12.cc b/examples/step-12/step-12.cc index 796bf858ed..82b56297a8 100644 --- a/examples/step-12/step-12.cc +++ b/examples/step-12/step-12.cc @@ -82,7 +82,7 @@ namespace Step12 public: BoundaryValues() = default; virtual void value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component = 0) const override; }; @@ -93,7 +93,7 @@ namespace Step12 // scheme. template void BoundaryValues::value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component) const { (void)component; @@ -142,9 +142,9 @@ namespace Step12 template struct ScratchData { - ScratchData(const Mapping & mapping, - const FiniteElement & fe, - const Quadrature & quadrature, + ScratchData(const Mapping &mapping, + const FiniteElement &fe, + const Quadrature &quadrature, const Quadrature &quadrature_face, const UpdateFlags update_flags = update_values | update_gradients | @@ -301,9 +301,9 @@ namespace Step12 const BoundaryValues boundary_function; // This is the function that will be executed for each cell. - const auto cell_worker = [&](const Iterator & cell, + const auto cell_worker = [&](const Iterator &cell, ScratchData &scratch_data, - CopyData & copy_data) { + CopyData ©_data) { const unsigned int n_dofs = scratch_data.fe_values.get_fe().n_dofs_per_cell(); copy_data.reinit(cell, n_dofs); @@ -311,7 +311,7 @@ namespace Step12 const auto &q_points = scratch_data.fe_values.get_quadrature_points(); - const FEValues & fe_v = scratch_data.fe_values; + const FEValues &fe_v = scratch_data.fe_values; const std::vector &JxW = fe_v.get_JxW_values(); // We solve a homogeneous equation, thus no right hand side shows up in @@ -334,10 +334,10 @@ namespace Step12 // This is the function called for boundary faces and consists of a normal // integration using FEFaceValues. New is the logic to decide if the term // goes into the system matrix (outflow) or the right-hand side (inflow). - const auto boundary_worker = [&](const Iterator & cell, + const auto boundary_worker = [&](const Iterator &cell, const unsigned int &face_no, - ScratchData & scratch_data, - CopyData & copy_data) { + ScratchData &scratch_data, + CopyData ©_data) { scratch_data.fe_interface_values.reinit(cell, face_no); const FEFaceValuesBase &fe_face = scratch_data.fe_interface_values.get_fe_face_values(0); @@ -345,7 +345,7 @@ namespace Step12 const auto &q_points = fe_face.get_quadrature_points(); const unsigned int n_facet_dofs = fe_face.get_fe().n_dofs_per_cell(); - const std::vector & JxW = fe_face.get_JxW_values(); + const std::vector &JxW = fe_face.get_JxW_values(); const std::vector> &normals = fe_face.get_normal_vectors(); std::vector g(q_points.size()); @@ -377,14 +377,14 @@ namespace Step12 // This is the function called on interior faces. The arguments specify // cells, face and subface indices (for adaptive refinement). We just pass // them along to the reinit() function of FEInterfaceValues. - const auto face_worker = [&](const Iterator & cell, + const auto face_worker = [&](const Iterator &cell, const unsigned int &f, const unsigned int &sf, - const Iterator & ncell, + const Iterator &ncell, const unsigned int &nf, const unsigned int &nsf, - ScratchData & scratch_data, - CopyData & copy_data) { + ScratchData &scratch_data, + CopyData ©_data) { FEInterfaceValues &fe_iv = scratch_data.fe_interface_values; fe_iv.reinit(cell, f, sf, ncell, nf, nsf); const auto &q_points = fe_iv.get_quadrature_points(); @@ -397,7 +397,7 @@ namespace Step12 copy_data_face.cell_matrix.reinit(n_dofs, n_dofs); - const std::vector & JxW = fe_iv.get_JxW_values(); + const std::vector &JxW = fe_iv.get_JxW_values(); const std::vector> &normals = fe_iv.get_normal_vectors(); for (unsigned int qpoint = 0; qpoint < q_points.size(); ++qpoint) diff --git a/examples/step-12b/step-12b.cc b/examples/step-12b/step-12b.cc index 83a0462649..57446a6c14 100644 --- a/examples/step-12b/step-12b.cc +++ b/examples/step-12b/step-12b.cc @@ -87,7 +87,7 @@ namespace Step12 public: BoundaryValues() = default; virtual void value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component = 0) const override; }; @@ -98,7 +98,7 @@ namespace Step12 // scheme. template void BoundaryValues::value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component) const { (void)component; @@ -205,8 +205,8 @@ namespace Step12 // bound. static void integrate_cell_term(DoFInfo &dinfo, CellInfo &info); static void integrate_boundary_term(DoFInfo &dinfo, CellInfo &info); - static void integrate_face_term(DoFInfo & dinfo1, - DoFInfo & dinfo2, + static void integrate_face_term(DoFInfo &dinfo1, + DoFInfo &dinfo2, CellInfo &info1, CellInfo &info2); }; @@ -331,14 +331,14 @@ namespace Step12 // just above. They compute the local contributions to the system matrix and // right hand side on cells and faces. template - void AdvectionProblem::integrate_cell_term(DoFInfo & dinfo, + void AdvectionProblem::integrate_cell_term(DoFInfo &dinfo, CellInfo &info) { // First, let us retrieve some of the objects used here from @p info. Note // that these objects can handle much more complex structures, thus the // access here looks more complicated than might seem necessary. - const FEValuesBase & fe_values = info.fe_values(); - FullMatrix & local_matrix = dinfo.matrix(0).matrix; + const FEValuesBase &fe_values = info.fe_values(); + FullMatrix &local_matrix = dinfo.matrix(0).matrix; const std::vector &JxW = fe_values.get_JxW_values(); // With these objects, we continue local integration like always. First, we @@ -364,14 +364,14 @@ namespace Step12 // base class for both FEFaceValues and FESubfaceValues, in order to get // access to normal vectors. template - void AdvectionProblem::integrate_boundary_term(DoFInfo & dinfo, + void AdvectionProblem::integrate_boundary_term(DoFInfo &dinfo, CellInfo &info) { const FEValuesBase &fe_face_values = info.fe_values(); - FullMatrix & local_matrix = dinfo.matrix(0).matrix; - Vector & local_vector = dinfo.vector(0).block(0); + FullMatrix &local_matrix = dinfo.matrix(0).matrix; + Vector &local_vector = dinfo.vector(0).block(0); - const std::vector & JxW = fe_face_values.get_JxW_values(); + const std::vector &JxW = fe_face_values.get_JxW_values(); const std::vector> &normals = fe_face_values.get_normal_vectors(); @@ -405,8 +405,8 @@ namespace Step12 // two info objects, one for each cell adjacent to the face and we assemble // four matrices, one for each cell and two for coupling back and forth. template - void AdvectionProblem::integrate_face_term(DoFInfo & dinfo1, - DoFInfo & dinfo2, + void AdvectionProblem::integrate_face_term(DoFInfo &dinfo1, + DoFInfo &dinfo2, CellInfo &info1, CellInfo &info2) { @@ -436,7 +436,7 @@ namespace Step12 // hand side vectors. Fortunately, the interface terms only involve the // solution and the right hand side does not receive any contributions. - const std::vector & JxW = fe_face_values.get_JxW_values(); + const std::vector &JxW = fe_face_values.get_JxW_values(); const std::vector> &normals = fe_face_values.get_normal_vectors(); diff --git a/examples/step-13/step-13.cc b/examples/step-13/step-13.cc index f85fb16107..5072b39775 100644 --- a/examples/step-13/step-13.cc +++ b/examples/step-13/step-13.cc @@ -121,7 +121,7 @@ namespace Step13 void set_refinement_cycle(const unsigned int refinement_cycle); virtual void operator()(const DoFHandler &dof_handler, - const Vector & solution) const = 0; + const Vector &solution) const = 0; protected: unsigned int refinement_cycle; @@ -167,10 +167,10 @@ namespace Step13 { public: PointValueEvaluation(const Point &evaluation_point, - TableHandler & results_table); + TableHandler &results_table); virtual void operator()(const DoFHandler &dof_handler, - const Vector & solution) const override; + const Vector &solution) const override; DeclException1( ExcEvaluationPointNotFound, @@ -180,7 +180,7 @@ namespace Step13 private: const Point evaluation_point; - TableHandler & results_table; + TableHandler &results_table; }; @@ -189,7 +189,7 @@ namespace Step13 template PointValueEvaluation::PointValueEvaluation( const Point &evaluation_point, - TableHandler & results_table) + TableHandler &results_table) : evaluation_point(evaluation_point) , results_table(results_table) {} @@ -201,7 +201,7 @@ namespace Step13 template void PointValueEvaluation::operator()(const DoFHandler &dof_handler, - const Vector & solution) const + const Vector &solution) const { // First allocate a variable that will hold the point value. Initialize // it with a value that is clearly bogus, so that if we fail to set it @@ -354,11 +354,11 @@ namespace Step13 class SolutionOutput : public EvaluationBase { public: - SolutionOutput(const std::string & output_name_base, + SolutionOutput(const std::string &output_name_base, const DataOutBase::OutputFormat output_format); virtual void operator()(const DoFHandler &dof_handler, - const Vector & solution) const override; + const Vector &solution) const override; private: const std::string output_name_base; @@ -368,7 +368,7 @@ namespace Step13 template SolutionOutput::SolutionOutput( - const std::string & output_name_base, + const std::string &output_name_base, const DataOutBase::OutputFormat output_format) : output_name_base(output_name_base) , output_format(output_format) @@ -393,7 +393,7 @@ namespace Step13 // there). template void SolutionOutput::operator()(const DoFHandler &dof_handler, - const Vector & solution) const + const Vector &solution) const { DataOut data_out; data_out.attach_dof_handler(dof_handler); @@ -554,10 +554,10 @@ namespace Step13 class Solver : public virtual Base { public: - Solver(Triangulation & triangulation, + Solver(Triangulation &triangulation, const FiniteElement &fe, - const Quadrature & quadrature, - const Function & boundary_values); + const Quadrature &quadrature, + const Function &boundary_values); virtual ~Solver() override; virtual void solve_problem() override; @@ -614,7 +614,7 @@ namespace Step13 struct AssemblyScratchData { AssemblyScratchData(const FiniteElement &fe, - const Quadrature & quadrature); + const Quadrature &quadrature); AssemblyScratchData(const AssemblyScratchData &scratch_data); FEValues fe_values; @@ -630,11 +630,11 @@ namespace Step13 void local_assemble_matrix( const typename DoFHandler::active_cell_iterator &cell, - AssemblyScratchData & scratch_data, - AssemblyCopyData & copy_data) const; + AssemblyScratchData &scratch_data, + AssemblyCopyData ©_data) const; void copy_local_to_global(const AssemblyCopyData ©_data, - LinearSystem & linear_system) const; + LinearSystem &linear_system) const; }; @@ -646,10 +646,10 @@ namespace Step13 // does not already generate a finite element numbering (we only ask for // that in the solve_problem function). template - Solver::Solver(Triangulation & triangulation, + Solver::Solver(Triangulation &triangulation, const FiniteElement &fe, - const Quadrature & quadrature, - const Function & boundary_values) + const Quadrature &quadrature, + const Function &boundary_values) : Base(triangulation) , fe(&fe) , quadrature(&quadrature) @@ -735,7 +735,7 @@ namespace Step13 auto worker = [this](const typename DoFHandler::active_cell_iterator &cell, AssemblyScratchData &scratch_data, - AssemblyCopyData & copy_data) { + AssemblyCopyData ©_data) { this->local_assemble_matrix(cell, scratch_data, copy_data); }; @@ -851,7 +851,7 @@ namespace Step13 template Solver::AssemblyScratchData::AssemblyScratchData( const FiniteElement &fe, - const Quadrature & quadrature) + const Quadrature &quadrature) : fe_values(fe, quadrature, update_gradients | update_JxW_values) {} @@ -868,8 +868,8 @@ namespace Step13 template void Solver::local_assemble_matrix( const typename DoFHandler::active_cell_iterator &cell, - AssemblyScratchData & scratch_data, - AssemblyCopyData & copy_data) const + AssemblyScratchData &scratch_data, + AssemblyCopyData ©_data) const { const unsigned int dofs_per_cell = fe->n_dofs_per_cell(); const unsigned int n_q_points = quadrature->size(); @@ -1009,11 +1009,11 @@ namespace Step13 class PrimalSolver : public Solver { public: - PrimalSolver(Triangulation & triangulation, + PrimalSolver(Triangulation &triangulation, const FiniteElement &fe, - const Quadrature & quadrature, - const Function & rhs_function, - const Function & boundary_values); + const Quadrature &quadrature, + const Function &rhs_function, + const Function &boundary_values); protected: const SmartPointer> rhs_function; @@ -1024,11 +1024,11 @@ namespace Step13 // The constructor of this class basically does what it is announced to do // above... template - PrimalSolver::PrimalSolver(Triangulation & triangulation, + PrimalSolver::PrimalSolver(Triangulation &triangulation, const FiniteElement &fe, - const Quadrature & quadrature, - const Function & rhs_function, - const Function & boundary_values) + const Quadrature &quadrature, + const Function &rhs_function, + const Function &boundary_values) : Base(triangulation) , Solver(triangulation, fe, quadrature, boundary_values) , rhs_function(&rhs_function) @@ -1097,11 +1097,11 @@ namespace Step13 class RefinementGlobal : public PrimalSolver { public: - RefinementGlobal(Triangulation & coarse_grid, + RefinementGlobal(Triangulation &coarse_grid, const FiniteElement &fe, - const Quadrature & quadrature, - const Function & rhs_function, - const Function & boundary_values); + const Quadrature &quadrature, + const Function &rhs_function, + const Function &boundary_values); virtual void refine_grid() override; }; @@ -1110,11 +1110,11 @@ namespace Step13 template RefinementGlobal::RefinementGlobal( - Triangulation & coarse_grid, + Triangulation &coarse_grid, const FiniteElement &fe, - const Quadrature & quadrature, - const Function & rhs_function, - const Function & boundary_values) + const Quadrature &quadrature, + const Function &rhs_function, + const Function &boundary_values) : Base(coarse_grid) , PrimalSolver(coarse_grid, fe, @@ -1147,11 +1147,11 @@ namespace Step13 class RefinementKelly : public PrimalSolver { public: - RefinementKelly(Triangulation & coarse_grid, + RefinementKelly(Triangulation &coarse_grid, const FiniteElement &fe, - const Quadrature & quadrature, - const Function & rhs_function, - const Function & boundary_values); + const Quadrature &quadrature, + const Function &rhs_function, + const Function &boundary_values); virtual void refine_grid() override; }; @@ -1159,9 +1159,9 @@ namespace Step13 template - RefinementKelly::RefinementKelly(Triangulation & coarse_grid, + RefinementKelly::RefinementKelly(Triangulation &coarse_grid, const FiniteElement &fe, - const Quadrature & quadrature, + const Quadrature &quadrature, const Function &rhs_function, const Function &boundary_values) : Base(coarse_grid) @@ -1214,13 +1214,13 @@ namespace Step13 class Solution : public Function { public: - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component) const override; }; template - double Solution::value(const Point & p, + double Solution::value(const Point &p, const unsigned int component) const { (void)component; @@ -1238,13 +1238,13 @@ namespace Step13 class RightHandSide : public Function { public: - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component) const override; }; template - double RightHandSide::value(const Point & p, + double RightHandSide::value(const Point &p, const unsigned int component) const { (void)component; @@ -1281,7 +1281,7 @@ namespace Step13 // intermittent mesh refinement: template void run_simulation( - LaplaceSolver::Base & solver, + LaplaceSolver::Base &solver, const std::list *> &postprocessor_list) { // We will give an indicator of the step we are presently computing, in diff --git a/examples/step-14/step-14.cc b/examples/step-14/step-14.cc index 5df33680d3..234e365430 100644 --- a/examples/step-14/step-14.cc +++ b/examples/step-14/step-14.cc @@ -79,7 +79,7 @@ namespace Step14 void set_refinement_cycle(const unsigned int refinement_cycle); virtual void operator()(const DoFHandler &dof_handler, - const Vector & solution) const = 0; + const Vector &solution) const = 0; protected: unsigned int refinement_cycle; @@ -102,7 +102,7 @@ namespace Step14 PointValueEvaluation(const Point &evaluation_point); virtual void operator()(const DoFHandler &dof_handler, - const Vector & solution) const override; + const Vector &solution) const override; DeclException1( ExcEvaluationPointNotFound, @@ -126,7 +126,7 @@ namespace Step14 template void PointValueEvaluation::operator()(const DoFHandler &dof_handler, - const Vector & solution) const + const Vector &solution) const { double point_value = 1e20; @@ -170,7 +170,7 @@ namespace Step14 PointXDerivativeEvaluation(const Point &evaluation_point); virtual void operator()(const DoFHandler &dof_handler, - const Vector & solution) const; + const Vector &solution) const; DeclException1( ExcEvaluationPointNotFound, @@ -195,7 +195,7 @@ namespace Step14 template void PointXDerivativeEvaluation::operator()( const DoFHandler &dof_handler, - const Vector & solution) const + const Vector &solution) const { // This time initialize the return value with something useful, since we // will have to add up a number of contributions and take the mean value @@ -301,7 +301,7 @@ namespace Step14 GridOutput(const std::string &output_name_base); virtual void operator()(const DoFHandler &dof_handler, - const Vector & solution) const override; + const Vector &solution) const override; private: const std::string output_name_base; @@ -387,11 +387,11 @@ namespace Step14 class Solver : public virtual Base { public: - Solver(Triangulation & triangulation, - const FiniteElement & fe, - const Quadrature & quadrature, + Solver(Triangulation &triangulation, + const FiniteElement &fe, + const Quadrature &quadrature, const Quadrature &face_quadrature, - const Function & boundary_values); + const Function &boundary_values); virtual ~Solver() override; virtual void solve_problem() override; @@ -432,7 +432,7 @@ namespace Step14 struct AssemblyScratchData { AssemblyScratchData(const FiniteElement &fe, - const Quadrature & quadrature); + const Quadrature &quadrature); AssemblyScratchData(const AssemblyScratchData &scratch_data); FEValues fe_values; @@ -449,22 +449,22 @@ namespace Step14 void local_assemble_matrix( const typename DoFHandler::active_cell_iterator &cell, - AssemblyScratchData & scratch_data, - AssemblyCopyData & copy_data) const; + AssemblyScratchData &scratch_data, + AssemblyCopyData ©_data) const; void copy_local_to_global(const AssemblyCopyData ©_data, - LinearSystem & linear_system) const; + LinearSystem &linear_system) const; }; template - Solver::Solver(Triangulation & triangulation, - const FiniteElement & fe, - const Quadrature & quadrature, + Solver::Solver(Triangulation &triangulation, + const FiniteElement &fe, + const Quadrature &quadrature, const Quadrature &face_quadrature, - const Function & boundary_values) + const Function &boundary_values) : Base(triangulation) , fe(&fe) , quadrature(&quadrature) @@ -519,7 +519,7 @@ namespace Step14 auto worker = [this](const typename DoFHandler::active_cell_iterator &cell, AssemblyScratchData &scratch_data, - AssemblyCopyData & copy_data) { + AssemblyCopyData ©_data) { this->local_assemble_matrix(cell, scratch_data, copy_data); }; @@ -554,7 +554,7 @@ namespace Step14 template Solver::AssemblyScratchData::AssemblyScratchData( const FiniteElement &fe, - const Quadrature & quadrature) + const Quadrature &quadrature) : fe_values(fe, quadrature, update_gradients | update_JxW_values) {} @@ -571,8 +571,8 @@ namespace Step14 template void Solver::local_assemble_matrix( const typename DoFHandler::active_cell_iterator &cell, - AssemblyScratchData & scratch_data, - AssemblyCopyData & copy_data) const + AssemblyScratchData &scratch_data, + AssemblyCopyData ©_data) const { const unsigned int dofs_per_cell = fe->n_dofs_per_cell(); const unsigned int n_q_points = quadrature->size(); @@ -702,12 +702,12 @@ namespace Step14 class PrimalSolver : public Solver { public: - PrimalSolver(Triangulation & triangulation, - const FiniteElement & fe, - const Quadrature & quadrature, + PrimalSolver(Triangulation &triangulation, + const FiniteElement &fe, + const Quadrature &quadrature, const Quadrature &face_quadrature, - const Function & rhs_function, - const Function & boundary_values); + const Function &rhs_function, + const Function &boundary_values); virtual void output_solution() const override; @@ -718,12 +718,12 @@ namespace Step14 template - PrimalSolver::PrimalSolver(Triangulation & triangulation, - const FiniteElement & fe, - const Quadrature & quadrature, + PrimalSolver::PrimalSolver(Triangulation &triangulation, + const FiniteElement &fe, + const Quadrature &quadrature, const Quadrature &face_quadrature, - const Function & rhs_function, - const Function & boundary_values) + const Function &rhs_function, + const Function &boundary_values) : Base(triangulation) , Solver(triangulation, fe, @@ -795,12 +795,12 @@ namespace Step14 class RefinementGlobal : public PrimalSolver { public: - RefinementGlobal(Triangulation & coarse_grid, - const FiniteElement & fe, - const Quadrature & quadrature, + RefinementGlobal(Triangulation &coarse_grid, + const FiniteElement &fe, + const Quadrature &quadrature, const Quadrature &face_quadrature, - const Function & rhs_function, - const Function & boundary_values); + const Function &rhs_function, + const Function &boundary_values); virtual void refine_grid() override; }; @@ -809,12 +809,12 @@ namespace Step14 template RefinementGlobal::RefinementGlobal( - Triangulation & coarse_grid, - const FiniteElement & fe, - const Quadrature & quadrature, + Triangulation &coarse_grid, + const FiniteElement &fe, + const Quadrature &quadrature, const Quadrature &face_quadrature, - const Function & rhs_function, - const Function & boundary_values) + const Function &rhs_function, + const Function &boundary_values) : Base(coarse_grid) , PrimalSolver(coarse_grid, fe, @@ -838,12 +838,12 @@ namespace Step14 class RefinementKelly : public PrimalSolver { public: - RefinementKelly(Triangulation & coarse_grid, - const FiniteElement & fe, - const Quadrature & quadrature, + RefinementKelly(Triangulation &coarse_grid, + const FiniteElement &fe, + const Quadrature &quadrature, const Quadrature &face_quadrature, - const Function & rhs_function, - const Function & boundary_values); + const Function &rhs_function, + const Function &boundary_values); virtual void refine_grid() override; }; @@ -852,12 +852,12 @@ namespace Step14 template RefinementKelly::RefinementKelly( - Triangulation & coarse_grid, - const FiniteElement & fe, - const Quadrature & quadrature, + Triangulation &coarse_grid, + const FiniteElement &fe, + const Quadrature &quadrature, const Quadrature &face_quadrature, - const Function & rhs_function, - const Function & boundary_values) + const Function &rhs_function, + const Function &boundary_values) : Base(coarse_grid) , PrimalSolver(coarse_grid, fe, @@ -905,13 +905,13 @@ namespace Step14 class RefinementWeightedKelly : public PrimalSolver { public: - RefinementWeightedKelly(Triangulation & coarse_grid, - const FiniteElement & fe, - const Quadrature & quadrature, + RefinementWeightedKelly(Triangulation &coarse_grid, + const FiniteElement &fe, + const Quadrature &quadrature, const Quadrature &face_quadrature, - const Function & rhs_function, - const Function & boundary_values, - const Function & weighting_function); + const Function &rhs_function, + const Function &boundary_values, + const Function &weighting_function); virtual void refine_grid() override; @@ -923,13 +923,13 @@ namespace Step14 template RefinementWeightedKelly::RefinementWeightedKelly( - Triangulation & coarse_grid, - const FiniteElement & fe, - const Quadrature & quadrature, + Triangulation &coarse_grid, + const FiniteElement &fe, + const Quadrature &quadrature, const Quadrature &face_quadrature, - const Function & rhs_function, - const Function & boundary_values, - const Function & weighting_function) + const Function &rhs_function, + const Function &boundary_values, + const Function &weighting_function) : Base(coarse_grid) , PrimalSolver(coarse_grid, fe, @@ -1130,7 +1130,7 @@ namespace Step14 class BoundaryValues : public Function { public: - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component) const; }; @@ -1138,7 +1138,7 @@ namespace Step14 class RightHandSide : public Function { public: - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component) const; }; @@ -1390,7 +1390,7 @@ namespace Step14 { public: virtual void assemble_rhs(const DoFHandler &dof_handler, - Vector & rhs) const = 0; + Vector &rhs) const = 0; }; @@ -1408,7 +1408,7 @@ namespace Step14 PointValueEvaluation(const Point &evaluation_point); virtual void assemble_rhs(const DoFHandler &dof_handler, - Vector & rhs) const override; + Vector &rhs) const override; DeclException1( ExcEvaluationPointNotFound, @@ -1444,7 +1444,7 @@ namespace Step14 template void PointValueEvaluation::assemble_rhs(const DoFHandler &dof_handler, - Vector & rhs) const + Vector &rhs) const { // So, first set everything to zeros... rhs.reinit(dof_handler.n_dofs()); @@ -1482,7 +1482,7 @@ namespace Step14 PointXDerivativeEvaluation(const Point &evaluation_point); virtual void assemble_rhs(const DoFHandler &dof_handler, - Vector & rhs) const; + Vector &rhs) const; DeclException1( ExcEvaluationPointNotFound, @@ -1522,7 +1522,7 @@ namespace Step14 template void PointXDerivativeEvaluation::assemble_rhs( const DoFHandler &dof_handler, - Vector & rhs) const + Vector &rhs) const { // Again, first set all entries to zero: rhs.reinit(dof_handler.n_dofs()); @@ -1620,10 +1620,10 @@ namespace Step14 { public: DualSolver( - Triangulation & triangulation, - const FiniteElement & fe, - const Quadrature & quadrature, - const Quadrature & face_quadrature, + Triangulation &triangulation, + const FiniteElement &fe, + const Quadrature &quadrature, + const Quadrature &face_quadrature, const DualFunctional::DualFunctionalBase &dual_functional); protected: @@ -1639,10 +1639,10 @@ namespace Step14 template DualSolver::DualSolver( - Triangulation & triangulation, - const FiniteElement & fe, - const Quadrature & quadrature, - const Quadrature & face_quadrature, + Triangulation &triangulation, + const FiniteElement &fe, + const Quadrature &quadrature, + const Quadrature &face_quadrature, const DualFunctional::DualFunctionalBase &dual_functional) : Base(triangulation) , Solver(triangulation, @@ -1677,13 +1677,13 @@ namespace Step14 { public: WeightedResidual( - Triangulation & coarse_grid, - const FiniteElement & primal_fe, - const FiniteElement & dual_fe, - const Quadrature & quadrature, - const Quadrature & face_quadrature, - const Function & rhs_function, - const Function & boundary_values, + Triangulation &coarse_grid, + const FiniteElement &primal_fe, + const FiniteElement &dual_fe, + const Quadrature &quadrature, + const Quadrature &face_quadrature, + const Function &rhs_function, + const Function &boundary_values, const DualFunctional::DualFunctionalBase &dual_functional); virtual void solve_problem() override; @@ -1768,8 +1768,8 @@ namespace Step14 std::vector dual_weights; std::vector cell_laplacians; CellData(const FiniteElement &fe, - const Quadrature & quadrature, - const Function & right_hand_side); + const Quadrature &quadrature, + const Function &right_hand_side); CellData(const CellData &cell_data); }; @@ -1783,7 +1783,7 @@ namespace Step14 std::vector dual_weights; typename std::vector> cell_grads; typename std::vector> neighbor_grads; - FaceData(const FiniteElement & fe, + FaceData(const FiniteElement &fe, const Quadrature &face_quadrature); FaceData(const FaceData &face_data); }; @@ -1791,12 +1791,12 @@ namespace Step14 struct WeightedResidualScratchData { WeightedResidualScratchData( - const FiniteElement & primal_fe, - const Quadrature & primal_quadrature, + const FiniteElement &primal_fe, + const Quadrature &primal_quadrature, const Quadrature &primal_face_quadrature, - const Function & rhs_function, - const Vector & primal_solution, - const Vector & dual_weights); + const Function &rhs_function, + const Vector &primal_solution, + const Vector &dual_weights); WeightedResidualScratchData( const WeightedResidualScratchData &scratch_data); @@ -1824,10 +1824,10 @@ namespace Step14 // every cell: void estimate_error(Vector &error_indicators) const; - void estimate_on_one_cell(const active_cell_iterator & cell, + void estimate_on_one_cell(const active_cell_iterator &cell, WeightedResidualScratchData &scratch_data, - WeightedResidualCopyData & copy_data, - Vector & error_indicators, + WeightedResidualCopyData ©_data, + Vector &error_indicators, FaceIntegrals &face_integrals) const; // Then we have functions that do the actual integration of the error @@ -1835,22 +1835,22 @@ namespace Step14 // interiors, on those faces that have no hanging nodes, and on those // faces with hanging nodes, respectively: void integrate_over_cell(const active_cell_iterator &cell, - const Vector & primal_solution, - const Vector & dual_weights, - CellData & cell_data, + const Vector &primal_solution, + const Vector &dual_weights, + CellData &cell_data, Vector &error_indicators) const; void integrate_over_regular_face(const active_cell_iterator &cell, const unsigned int face_no, const Vector &primal_solution, const Vector &dual_weights, - FaceData & face_data, + FaceData &face_data, FaceIntegrals &face_integrals) const; void integrate_over_irregular_face(const active_cell_iterator &cell, const unsigned int face_no, const Vector &primal_solution, const Vector &dual_weights, - FaceData & face_data, + FaceData &face_data, FaceIntegrals &face_integrals) const; }; @@ -1864,8 +1864,8 @@ namespace Step14 template WeightedResidual::CellData::CellData( const FiniteElement &fe, - const Quadrature & quadrature, - const Function & right_hand_side) + const Quadrature &quadrature, + const Function &right_hand_side) : fe_values(fe, quadrature, update_values | update_hessians | update_quadrature_points | @@ -1896,7 +1896,7 @@ namespace Step14 template WeightedResidual::FaceData::FaceData( - const FiniteElement & fe, + const FiniteElement &fe, const Quadrature &face_quadrature) : fe_face_values_cell(fe, face_quadrature, @@ -1944,12 +1944,12 @@ namespace Step14 template WeightedResidual::WeightedResidualScratchData:: WeightedResidualScratchData( - const FiniteElement & primal_fe, - const Quadrature & primal_quadrature, + const FiniteElement &primal_fe, + const Quadrature &primal_quadrature, const Quadrature &primal_face_quadrature, - const Function & rhs_function, - const Vector & primal_solution, - const Vector & dual_weights) + const Function &rhs_function, + const Vector &primal_solution, + const Vector &dual_weights) : cell_data(primal_fe, primal_quadrature, rhs_function) , face_data(primal_fe, primal_face_quadrature) , primal_solution(primal_solution) @@ -1970,13 +1970,13 @@ namespace Step14 template WeightedResidual::WeightedResidual( - Triangulation & coarse_grid, - const FiniteElement & primal_fe, - const FiniteElement & dual_fe, - const Quadrature & quadrature, - const Quadrature & face_quadrature, - const Function & rhs_function, - const Function & bv, + Triangulation &coarse_grid, + const FiniteElement &primal_fe, + const FiniteElement &dual_fe, + const Quadrature &quadrature, + const Quadrature &face_quadrature, + const Function &rhs_function, + const Function &bv, const DualFunctional::DualFunctionalBase &dual_functional) : Base(coarse_grid) , PrimalSolver(coarse_grid, @@ -2196,9 +2196,9 @@ namespace Step14 auto worker = [this, &error_indicators, - &face_integrals](const active_cell_iterator & cell, + &face_integrals](const active_cell_iterator &cell, WeightedResidualScratchData &scratch_data, - WeightedResidualCopyData & copy_data) { + WeightedResidualCopyData ©_data) { this->estimate_on_one_cell( cell, scratch_data, copy_data, error_indicators, face_integrals); }; @@ -2254,11 +2254,11 @@ namespace Step14 // configured to use multithreading. Here it goes: template void WeightedResidual::estimate_on_one_cell( - const active_cell_iterator & cell, + const active_cell_iterator &cell, WeightedResidualScratchData &scratch_data, - WeightedResidualCopyData & copy_data, - Vector & error_indicators, - FaceIntegrals & face_integrals) const + WeightedResidualCopyData ©_data, + Vector &error_indicators, + FaceIntegrals &face_integrals) const { // Because of WorkStream, estimate_on_one_cell requires a CopyData object // even if it is no used. The next line silences a warning about this @@ -2347,10 +2347,10 @@ namespace Step14 template void WeightedResidual::integrate_over_cell( const active_cell_iterator &cell, - const Vector & primal_solution, - const Vector & dual_weights, - CellData & cell_data, - Vector & error_indicators) const + const Vector &primal_solution, + const Vector &dual_weights, + CellData &cell_data, + Vector &error_indicators) const { // The tasks to be done are what appears natural from looking at the // error estimation formula: first get the right hand side and Laplacian @@ -2387,10 +2387,10 @@ namespace Step14 void WeightedResidual::integrate_over_regular_face( const active_cell_iterator &cell, const unsigned int face_no, - const Vector & primal_solution, - const Vector & dual_weights, - FaceData & face_data, - FaceIntegrals & face_integrals) const + const Vector &primal_solution, + const Vector &dual_weights, + FaceData &face_data, + FaceIntegrals &face_integrals) const { const unsigned int n_q_points = face_data.fe_face_values_cell.n_quadrature_points; @@ -2475,10 +2475,10 @@ namespace Step14 void WeightedResidual::integrate_over_irregular_face( const active_cell_iterator &cell, const unsigned int face_no, - const Vector & primal_solution, - const Vector & dual_weights, - FaceData & face_data, - FaceIntegrals & face_integrals) const + const Vector &primal_solution, + const Vector &dual_weights, + FaceData &face_data, + FaceIntegrals &face_integrals) const { // First again two abbreviations, and some consistency checks whether // the function is called only on faces for which it is supposed to be diff --git a/examples/step-15/step-15.cc b/examples/step-15/step-15.cc index 819a63d392..060c8fd1d9 100644 --- a/examples/step-15/step-15.cc +++ b/examples/step-15/step-15.cc @@ -136,7 +136,7 @@ namespace Step15 class BoundaryValues : public Function { public: - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; }; diff --git a/examples/step-16/step-16.cc b/examples/step-16/step-16.cc index c8e997415c..2002e66b56 100644 --- a/examples/step-16/step-16.cc +++ b/examples/step-16/step-16.cc @@ -90,7 +90,7 @@ namespace Step16 template struct ScratchData { - ScratchData(const Mapping & mapping, + ScratchData(const Mapping &mapping, const FiniteElement &fe, const unsigned int quadrature_degree, const UpdateFlags update_flags) @@ -143,9 +143,9 @@ namespace Step16 private: template - void cell_worker(const Iterator & cell, + void cell_worker(const Iterator &cell, ScratchData &scratch_data, - CopyData & copy_data); + CopyData ©_data); void setup_system(); void assemble_system(); @@ -329,9 +329,9 @@ namespace Step16 // assemble_multigrid() even though it is not used. template template - void LaplaceProblem::cell_worker(const Iterator & cell, + void LaplaceProblem::cell_worker(const Iterator &cell, ScratchData &scratch_data, - CopyData & copy_data) + CopyData ©_data) { FEValues &fe_values = scratch_data.fe_values; fe_values.reinit(cell); @@ -379,8 +379,8 @@ namespace Step16 auto cell_worker = [&](const typename DoFHandler::active_cell_iterator &cell, - ScratchData & scratch_data, - CopyData & copy_data) { + ScratchData &scratch_data, + CopyData ©_data) { this->cell_worker(cell, scratch_data, copy_data); }; @@ -445,8 +445,8 @@ namespace Step16 auto cell_worker = [&](const typename DoFHandler::level_cell_iterator &cell, - ScratchData & scratch_data, - CopyData & copy_data) { + ScratchData &scratch_data, + CopyData ©_data) { this->cell_worker(cell, scratch_data, copy_data); }; diff --git a/examples/step-16b/step-16b.cc b/examples/step-16b/step-16b.cc index d2ad576f6c..858a539120 100644 --- a/examples/step-16b/step-16b.cc +++ b/examples/step-16b/step-16b.cc @@ -102,7 +102,7 @@ namespace Step16 { public: LaplaceIntegrator(); - virtual void cell(MeshWorker::DoFInfo & dinfo, + virtual void cell(MeshWorker::DoFInfo &dinfo, MeshWorker::IntegrationInfo &info) const override; }; @@ -142,7 +142,7 @@ namespace Step16 // information into block zero of vector zero. template void - LaplaceIntegrator::cell(MeshWorker::DoFInfo & dinfo, + LaplaceIntegrator::cell(MeshWorker::DoFInfo &dinfo, MeshWorker::IntegrationInfo &info) const { AssertDimension(dinfo.n_matrices(), 1); diff --git a/examples/step-17/step-17.cc b/examples/step-17/step-17.cc index 970f28c5e9..06ac293ec0 100644 --- a/examples/step-17/step-17.cc +++ b/examples/step-17/step-17.cc @@ -182,7 +182,7 @@ namespace Step17 { public: virtual void vector_value(const Point &p, - Vector & values) const override + Vector &values) const override { AssertDimension(values.size(), dim); Assert(dim >= 2, ExcInternalError()); @@ -205,7 +205,7 @@ namespace Step17 virtual void vector_value_list(const std::vector> &points, - std::vector> & value_list) const override + std::vector> &value_list) const override { const unsigned int n_points = points.size(); diff --git a/examples/step-18/step-18.cc b/examples/step-18/step-18.cc index 973b104bb1..60e1acb5af 100644 --- a/examples/step-18/step-18.cc +++ b/examples/step-18/step-18.cc @@ -541,11 +541,11 @@ namespace Step18 BodyForce(); virtual void vector_value(const Point &p, - Vector & values) const override; + Vector &values) const override; virtual void vector_value_list(const std::vector> &points, - std::vector> & value_list) const override; + std::vector> &value_list) const override; }; @@ -573,7 +573,7 @@ namespace Step18 template void BodyForce::vector_value_list( const std::vector> &points, - std::vector> & value_list) const + std::vector> &value_list) const { const unsigned int n_points = points.size(); @@ -620,11 +620,11 @@ namespace Step18 const double present_timestep); virtual void vector_value(const Point &p, - Vector & values) const override; + Vector &values) const override; virtual void vector_value_list(const std::vector> &points, - std::vector> & value_list) const override; + std::vector> &value_list) const override; private: const double velocity; @@ -660,7 +660,7 @@ namespace Step18 template void IncrementalBoundaryValues::vector_value_list( const std::vector> &points, - std::vector> & value_list) const + std::vector> &value_list) const { const unsigned int n_points = points.size(); diff --git a/examples/step-19/step-19.cc b/examples/step-19/step-19.cc index 3a5e062e13..e9d7bd59e8 100644 --- a/examples/step-19/step-19.cc +++ b/examples/step-19/step-19.cc @@ -137,7 +137,7 @@ namespace Step19 void create_particles(); void move_particles(); void track_lost_particle( - const typename Particles::ParticleIterator & particle, + const typename Particles::ParticleIterator &particle, const typename Triangulation::active_cell_iterator &cell); @@ -210,7 +210,7 @@ namespace Step19 , time(0, 1e-4) { particle_handler.signals.particle_lost.connect( - [this](const typename Particles::ParticleIterator & particle, + [this](const typename Particles::ParticleIterator &particle, const typename Triangulation::active_cell_iterator &cell) { this->track_lost_particle(particle, cell); }); @@ -753,7 +753,7 @@ namespace Step19 // the hole and increment a counter. template void CathodeRaySimulator::track_lost_particle( - const typename Particles::ParticleIterator & particle, + const typename Particles::ParticleIterator &particle, const typename Triangulation::active_cell_iterator &cell) { ++n_recently_lost_particles; diff --git a/examples/step-2/step-2.cc b/examples/step-2/step-2.cc index 5fa3aacfde..0ad704ae3a 100644 --- a/examples/step-2/step-2.cc +++ b/examples/step-2/step-2.cc @@ -131,7 +131,7 @@ void make_grid(Triangulation<2> &triangulation) // gnuplot program that we will use for visualization in the results // section. void write_dof_locations(const DoFHandler<2> &dof_handler, - const std::string & filename) + const std::string &filename) { std::map> dof_location_map = DoFTools::map_dofs_to_support_points(MappingQ1<2>(), dof_handler); diff --git a/examples/step-20/step-20.cc b/examples/step-20/step-20.cc index 7676c1eeca..119d143185 100644 --- a/examples/step-20/step-20.cc +++ b/examples/step-20/step-20.cc @@ -136,7 +136,7 @@ namespace Step20 : Function(1) {} - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; }; @@ -150,7 +150,7 @@ namespace Step20 : Function(1) {} - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; }; @@ -164,7 +164,7 @@ namespace Step20 {} virtual void vector_value(const Point &p, - Vector & value) const override; + Vector &value) const override; }; @@ -193,7 +193,7 @@ namespace Step20 template void ExactSolution::vector_value(const Point &p, - Vector & values) const + Vector &values) const { AssertDimension(values.size(), dim + 1); @@ -241,7 +241,7 @@ namespace Step20 virtual void value_list(const std::vector> &points, - std::vector> & values) const override; + std::vector> &values) const override; }; @@ -274,7 +274,7 @@ namespace Step20 // necessary in debug mode.) template void KInverse::value_list(const std::vector> &points, - std::vector> & values) const + std::vector> &values) const { (void)points; AssertDimension(points.size(), values.size()); diff --git a/examples/step-21/step-21.cc b/examples/step-21/step-21.cc index 59de4bec66..52ccc5a364 100644 --- a/examples/step-21/step-21.cc +++ b/examples/step-21/step-21.cc @@ -224,14 +224,14 @@ namespace Step21 : Function(dim + 2) {} - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override { return Functions::ZeroFunction(dim + 2).value(p, component); } virtual void vector_value(const Point &p, - Vector & values) const override + Vector &values) const override { Functions::ZeroFunction(dim + 2).vector_value(p, values); } @@ -265,7 +265,7 @@ namespace Step21 virtual void value_list(const std::vector> &points, - std::vector> & values) const override + std::vector> &values) const override { AssertDimension(points.size(), values.size()); @@ -333,7 +333,7 @@ namespace Step21 virtual void value_list(const std::vector> &points, - std::vector> & values) const override + std::vector> &values) const override { AssertDimension(points.size(), values.size()); @@ -374,8 +374,8 @@ namespace Step21 template - std::vector> - KInverse::centers = KInverse::get_centers(); + std::vector> KInverse::centers = + KInverse::get_centers(); } // namespace RandomMedium @@ -440,7 +440,7 @@ namespace Step21 class SchurComplement : public Subscriptor { public: - SchurComplement(const BlockSparseMatrix & A, + SchurComplement(const BlockSparseMatrix &A, const InverseMatrix> &Minv) : system_matrix(&A) , m_inverse(&Minv) diff --git a/examples/step-22/step-22.cc b/examples/step-22/step-22.cc index 022fbb9bfb..59776ddec5 100644 --- a/examples/step-22/step-22.cc +++ b/examples/step-22/step-22.cc @@ -186,16 +186,16 @@ namespace Step22 : Function(dim + 1) {} - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; virtual void vector_value(const Point &p, - Vector & value) const override; + Vector &value) const override; }; template - double BoundaryValues::value(const Point & p, + double BoundaryValues::value(const Point &p, const unsigned int component) const { Assert(component < this->n_components, @@ -217,7 +217,7 @@ namespace Step22 template void BoundaryValues::vector_value(const Point &p, - Vector & values) const + Vector &values) const { for (unsigned int c = 0; c < this->n_components; ++c) values(c) = BoundaryValues::value(p, c); @@ -286,7 +286,7 @@ namespace Step22 class InverseMatrix : public Subscriptor { public: - InverseMatrix(const MatrixType & m, + InverseMatrix(const MatrixType &m, const PreconditionerType &preconditioner); void vmult(Vector &dst, const Vector &src) const; @@ -299,7 +299,7 @@ namespace Step22 template InverseMatrix::InverseMatrix( - const MatrixType & m, + const MatrixType &m, const PreconditionerType &preconditioner) : matrix(&m) , preconditioner(&preconditioner) @@ -318,7 +318,7 @@ namespace Step22 // tolerance, either. template void InverseMatrix::vmult( - Vector & dst, + Vector &dst, const Vector &src) const { SolverControl solver_control(src.size(), 1e-6 * src.l2_norm()); @@ -374,7 +374,7 @@ namespace Step22 template void - SchurComplement::vmult(Vector & dst, + SchurComplement::vmult(Vector &dst, const Vector &src) const { system_matrix->block(0, 1).vmult(tmp1, src); diff --git a/examples/step-23/step-23.cc b/examples/step-23/step-23.cc index 76ca6c169d..ad50d0cd66 100644 --- a/examples/step-23/step-23.cc +++ b/examples/step-23/step-23.cc @@ -206,7 +206,7 @@ namespace Step23 class BoundaryValuesU : public Function { public: - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override { (void)component; @@ -226,7 +226,7 @@ namespace Step23 class BoundaryValuesV : public Function { public: - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override { (void)component; diff --git a/examples/step-25/step-25.cc b/examples/step-25/step-25.cc index d2cf93bb36..92db5829bf 100644 --- a/examples/step-25/step-25.cc +++ b/examples/step-25/step-25.cc @@ -106,7 +106,7 @@ namespace Step25 void assemble_system(); void compute_nl_term(const Vector &old_data, const Vector &new_data, - Vector & nl_term) const; + Vector &nl_term) const; void compute_nl_matrix(const Vector &old_data, const Vector &new_data, SparseMatrix &nl_matrix) const; @@ -223,7 +223,7 @@ namespace Step25 : Function(n_components, time) {} - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override { return ExactSolution(1, this->get_time()).value(p, component); diff --git a/examples/step-26/step-26.cc b/examples/step-26/step-26.cc index 238bcdb360..6d82db26d7 100644 --- a/examples/step-26/step-26.cc +++ b/examples/step-26/step-26.cc @@ -128,7 +128,7 @@ namespace Step26 , period(0.2) {} - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; private: @@ -138,7 +138,7 @@ namespace Step26 template - double RightHandSide::value(const Point & p, + double RightHandSide::value(const Point &p, const unsigned int component) const { (void)component; @@ -173,7 +173,7 @@ namespace Step26 class BoundaryValues : public Function { public: - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; }; diff --git a/examples/step-27/step-27.cc b/examples/step-27/step-27.cc index b253c4850f..c7f39af256 100644 --- a/examples/step-27/step-27.cc +++ b/examples/step-27/step-27.cc @@ -127,7 +127,7 @@ namespace Step27 class RightHandSide : public Function { public: - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component) const override; }; diff --git a/examples/step-28/step-28.cc b/examples/step-28/step-28.cc index 49065123f3..079d275bf9 100644 --- a/examples/step-28/step-28.cc +++ b/examples/step-28/step-28.cc @@ -412,7 +412,7 @@ namespace Step28 // DoF handler member variables private, and do not have to grant external // use to it, enhancing encapsulation: EnergyGroup(const unsigned int group, - const MaterialData & material_data, + const MaterialData &material_data, const Triangulation &coarse_grid, const FiniteElement &fe); @@ -515,10 +515,10 @@ namespace Step28 // coarser of the two cells to the finer one: private: void assemble_cross_group_rhs_recursive( - const EnergyGroup & g_prime, + const EnergyGroup &g_prime, const typename DoFHandler::cell_iterator &cell_g, const typename DoFHandler::cell_iterator &cell_g_prime, - const FullMatrix & prolongation_matrix); + const FullMatrix &prolongation_matrix); }; @@ -531,7 +531,7 @@ namespace Step28 // members, thereby enabling us to make these data members private. template EnergyGroup::EnergyGroup(const unsigned int group, - const MaterialData & material_data, + const MaterialData &material_data, const Triangulation &coarse_grid, const FiniteElement &fe) : group(group) @@ -835,10 +835,10 @@ namespace Step28 // active. These two cases will be discussed below: template void EnergyGroup::assemble_cross_group_rhs_recursive( - const EnergyGroup & g_prime, + const EnergyGroup &g_prime, const typename DoFHandler::cell_iterator &cell_g, const typename DoFHandler::cell_iterator &cell_g_prime, - const FullMatrix & prolongation_matrix) + const FullMatrix &prolongation_matrix) { // The first case is that both cells are no further refined. In that case, // we can assemble the relevant terms (see the introduction). This @@ -1194,7 +1194,7 @@ namespace Step28 // describing the material parameters for the number of energy groups // requested in the input file, and (iii) the finite element to be used by // all energy groups: - const Parameters & parameters; + const Parameters ¶meters; const MaterialData material_data; FE_Q fe; diff --git a/examples/step-29/step-29.cc b/examples/step-29/step-29.cc index ef4d7a46b3..130bd2d8fd 100644 --- a/examples/step-29/step-29.cc +++ b/examples/step-29/step-29.cc @@ -110,7 +110,7 @@ namespace Step29 virtual void vector_value_list(const std::vector> &points, - std::vector> & value_list) const override + std::vector> &value_list) const override { AssertDimension(value_list.size(), points.size()); @@ -323,7 +323,7 @@ namespace Step29 template void ComputeIntensity::evaluate_vector_field( const DataPostprocessorInputs::Vector &inputs, - std::vector> & computed_quantities) const + std::vector> &computed_quantities) const { AssertDimension(computed_quantities.size(), inputs.solution_values.size()); diff --git a/examples/step-30/step-30.cc b/examples/step-30/step-30.cc index ba7b5ae996..fd2e0fcb9f 100644 --- a/examples/step-30/step-30.cc +++ b/examples/step-30/step-30.cc @@ -59,7 +59,7 @@ namespace Step30 { public: virtual void value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int /*component*/ = 0) const override { (void)points; @@ -75,7 +75,7 @@ namespace Step30 { public: virtual void value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int /*component*/ = 0) const override { AssertDimension(values.size(), points.size()); @@ -106,7 +106,7 @@ namespace Step30 // of a cell. On the other hand, the solution $u(x,y)$ is exactly the same // as before. void value_list(const std::vector> &points, - std::vector> & values) const + std::vector> &values) const { AssertDimension(values.size(), points.size()); @@ -139,19 +139,19 @@ namespace Step30 DGTransportEquation(); void assemble_cell_term(const FEValues &fe_v, - FullMatrix & ui_vi_matrix, - Vector & cell_vector) const; + FullMatrix &ui_vi_matrix, + Vector &cell_vector) const; void assemble_boundary_term(const FEFaceValues &fe_v, - FullMatrix & ui_vi_matrix, - Vector & cell_vector) const; + FullMatrix &ui_vi_matrix, + Vector &cell_vector) const; void assemble_face_term(const FEFaceValuesBase &fe_v, const FEFaceValuesBase &fe_v_neighbor, - FullMatrix & ui_vi_matrix, - FullMatrix & ue_vi_matrix, - FullMatrix & ui_ve_matrix, - FullMatrix & ue_ve_matrix) const; + FullMatrix &ui_vi_matrix, + FullMatrix &ue_vi_matrix, + FullMatrix &ui_ve_matrix, + FullMatrix &ue_ve_matrix) const; private: const Beta beta_function; @@ -182,8 +182,8 @@ namespace Step30 template void DGTransportEquation::assemble_cell_term( const FEValues &fe_v, - FullMatrix & ui_vi_matrix, - Vector & cell_vector) const + FullMatrix &ui_vi_matrix, + Vector &cell_vector) const { const std::vector &JxW = fe_v.get_JxW_values(); @@ -209,10 +209,10 @@ namespace Step30 template void DGTransportEquation::assemble_boundary_term( const FEFaceValues &fe_v, - FullMatrix & ui_vi_matrix, - Vector & cell_vector) const + FullMatrix &ui_vi_matrix, + Vector &cell_vector) const { - const std::vector & JxW = fe_v.get_JxW_values(); + const std::vector &JxW = fe_v.get_JxW_values(); const std::vector> &normals = fe_v.get_normal_vectors(); std::vector> beta(fe_v.n_quadrature_points); @@ -241,12 +241,12 @@ namespace Step30 void DGTransportEquation::assemble_face_term( const FEFaceValuesBase &fe_v, const FEFaceValuesBase &fe_v_neighbor, - FullMatrix & ui_vi_matrix, - FullMatrix & ue_vi_matrix, - FullMatrix & ui_ve_matrix, - FullMatrix & ue_ve_matrix) const + FullMatrix &ui_vi_matrix, + FullMatrix &ue_vi_matrix, + FullMatrix &ui_ve_matrix, + FullMatrix &ue_ve_matrix) const { - const std::vector & JxW = fe_v.get_JxW_values(); + const std::vector &JxW = fe_v.get_JxW_values(); const std::vector> &normals = fe_v.get_normal_vectors(); std::vector> beta(fe_v.n_quadrature_points); diff --git a/examples/step-31/step-31.cc b/examples/step-31/step-31.cc index 5c97bf0db8..4b01b57787 100644 --- a/examples/step-31/step-31.cc +++ b/examples/step-31/step-31.cc @@ -137,7 +137,7 @@ namespace Step31 } virtual void vector_value(const Point &p, - Vector & value) const override + Vector &value) const override { for (unsigned int c = 0; c < this->n_components; ++c) value(c) = TemperatureInitialValues::value(p, c); @@ -154,7 +154,7 @@ namespace Step31 : Function(1) {} - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override { (void)component; @@ -177,7 +177,7 @@ namespace Step31 } virtual void vector_value(const Point &p, - Vector & value) const override + Vector &value) const override { for (unsigned int c = 0; c < this->n_components; ++c) value(c) = TemperatureRightHandSide::value(p, c); @@ -241,7 +241,7 @@ namespace Step31 class InverseMatrix : public Subscriptor { public: - InverseMatrix(const MatrixType & m, + InverseMatrix(const MatrixType &m, const PreconditionerType &preconditioner); @@ -250,13 +250,13 @@ namespace Step31 private: const SmartPointer matrix; - const PreconditionerType & preconditioner; + const PreconditionerType &preconditioner; }; template InverseMatrix::InverseMatrix( - const MatrixType & m, + const MatrixType &m, const PreconditionerType &preconditioner) : matrix(&m) , preconditioner(preconditioner) @@ -267,7 +267,7 @@ namespace Step31 template template void InverseMatrix::vmult( - VectorType & dst, + VectorType &dst, const VectorType &src) const { SolverControl solver_control(src.size(), 1e-7 * src.l2_norm()); @@ -345,9 +345,9 @@ namespace Step31 const TrilinosWrappers::BlockSparseMatrix &S, const InverseMatrix &Mpinv, - const PreconditionerTypeA & Apreconditioner); + const PreconditionerTypeA &Apreconditioner); - void vmult(TrilinosWrappers::MPI::BlockVector & dst, + void vmult(TrilinosWrappers::MPI::BlockVector &dst, const TrilinosWrappers::MPI::BlockVector &src) const; private: @@ -378,7 +378,7 @@ namespace Step31 const TrilinosWrappers::BlockSparseMatrix &S, const InverseMatrix &Mpinv, - const PreconditionerTypeA & Apreconditioner) + const PreconditionerTypeA &Apreconditioner) : stokes_matrix(&S) , m_inverse(&Mpinv) , a_preconditioner(Apreconditioner) @@ -404,7 +404,7 @@ namespace Step31 template void BlockSchurPreconditioner::vmult( - TrilinosWrappers::MPI::BlockVector & dst, + TrilinosWrappers::MPI::BlockVector &dst, const TrilinosWrappers::MPI::BlockVector &src) const { a_preconditioner.vmult(dst.block(0), src.block(0)); @@ -460,15 +460,15 @@ namespace Step31 void refine_mesh(const unsigned int max_grid_level); double compute_viscosity( - const std::vector & old_temperature, - const std::vector & old_old_temperature, + const std::vector &old_temperature, + const std::vector &old_old_temperature, const std::vector> &old_temperature_grads, const std::vector> &old_old_temperature_grads, - const std::vector & old_temperature_laplacians, - const std::vector & old_old_temperature_laplacians, + const std::vector &old_temperature_laplacians, + const std::vector &old_old_temperature_laplacians, const std::vector> &old_velocity_values, const std::vector> &old_old_velocity_values, - const std::vector & gamma_values, + const std::vector &gamma_values, const double global_u_infty, const double global_T_variation, const double cell_diameter) const; @@ -743,15 +743,15 @@ namespace Step31 // discussed in the introduction: template double BoussinesqFlowProblem::compute_viscosity( - const std::vector & old_temperature, - const std::vector & old_old_temperature, + const std::vector &old_temperature, + const std::vector &old_old_temperature, const std::vector> &old_temperature_grads, const std::vector> &old_old_temperature_grads, - const std::vector & old_temperature_laplacians, - const std::vector & old_old_temperature_laplacians, + const std::vector &old_temperature_laplacians, + const std::vector &old_old_temperature_laplacians, const std::vector> &old_velocity_values, const std::vector> &old_old_velocity_values, - const std::vector & gamma_values, + const std::vector &gamma_values, const double global_u_infty, const double global_T_variation, const double cell_diameter) const diff --git a/examples/step-32/step-32.cc b/examples/step-32/step-32.cc index b9cf7b7d5f..44297b0502 100644 --- a/examples/step-32/step-32.cc +++ b/examples/step-32/step-32.cc @@ -152,11 +152,11 @@ namespace Step32 : Function(1) {} - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; virtual void vector_value(const Point &p, - Vector & value) const override; + Vector &value) const override; }; @@ -181,7 +181,7 @@ namespace Step32 template void TemperatureInitialValues::vector_value(const Point &p, - Vector & values) const + Vector &values) const { for (unsigned int c = 0; c < this->n_components; ++c) values(c) = TemperatureInitialValues::value(p, c); @@ -234,7 +234,7 @@ namespace Step32 BlockSchurPreconditioner(const TrilinosWrappers::BlockSparseMatrix &S, const TrilinosWrappers::BlockSparseMatrix &Spre, const PreconditionerTypeMp &Mppreconditioner, - const PreconditionerTypeA & Apreconditioner, + const PreconditionerTypeA &Apreconditioner, const bool do_solve_A) : stokes_matrix(&S) , stokes_preconditioner_matrix(&Spre) @@ -243,7 +243,7 @@ namespace Step32 , do_solve_A(do_solve_A) {} - void vmult(TrilinosWrappers::MPI::BlockVector & dst, + void vmult(TrilinosWrappers::MPI::BlockVector &dst, const TrilinosWrappers::MPI::BlockVector &src) const { TrilinosWrappers::MPI::Vector utmp(src.block(0)); @@ -286,7 +286,7 @@ namespace Step32 const SmartPointer stokes_preconditioner_matrix; const PreconditionerTypeMp &mp_preconditioner; - const PreconditionerTypeA & a_preconditioner; + const PreconditionerTypeA &a_preconditioner; const bool do_solve_A; }; } // namespace LinearSolvers @@ -343,8 +343,8 @@ namespace Step32 struct StokesPreconditioner { StokesPreconditioner(const FiniteElement &stokes_fe, - const Quadrature & stokes_quadrature, - const Mapping & mapping, + const Quadrature &stokes_quadrature, + const Mapping &mapping, const UpdateFlags update_flags); StokesPreconditioner(const StokesPreconditioner &data); @@ -359,8 +359,8 @@ namespace Step32 template StokesPreconditioner::StokesPreconditioner( const FiniteElement &stokes_fe, - const Quadrature & stokes_quadrature, - const Mapping & mapping, + const Quadrature &stokes_quadrature, + const Mapping &mapping, const UpdateFlags update_flags) : stokes_fe_values(mapping, stokes_fe, stokes_quadrature, update_flags) , grad_phi_u(stokes_fe.n_dofs_per_cell()) @@ -396,8 +396,8 @@ namespace Step32 struct StokesSystem : public StokesPreconditioner { StokesSystem(const FiniteElement &stokes_fe, - const Mapping & mapping, - const Quadrature & stokes_quadrature, + const Mapping &mapping, + const Quadrature &stokes_quadrature, const UpdateFlags stokes_update_flags, const FiniteElement &temperature_fe, const UpdateFlags temperature_update_flags); @@ -418,8 +418,8 @@ namespace Step32 template StokesSystem::StokesSystem( const FiniteElement &stokes_fe, - const Mapping & mapping, - const Quadrature & stokes_quadrature, + const Mapping &mapping, + const Quadrature &stokes_quadrature, const UpdateFlags stokes_update_flags, const FiniteElement &temperature_fe, const UpdateFlags temperature_update_flags) @@ -460,8 +460,8 @@ namespace Step32 struct TemperatureMatrix { TemperatureMatrix(const FiniteElement &temperature_fe, - const Mapping & mapping, - const Quadrature & temperature_quadrature); + const Mapping &mapping, + const Quadrature &temperature_quadrature); TemperatureMatrix(const TemperatureMatrix &data); @@ -476,8 +476,8 @@ namespace Step32 template TemperatureMatrix::TemperatureMatrix( const FiniteElement &temperature_fe, - const Mapping & mapping, - const Quadrature & temperature_quadrature) + const Mapping &mapping, + const Quadrature &temperature_quadrature) : temperature_fe_values(mapping, temperature_fe, temperature_quadrature, @@ -516,8 +516,8 @@ namespace Step32 { TemperatureRHS(const FiniteElement &temperature_fe, const FiniteElement &stokes_fe, - const Mapping & mapping, - const Quadrature & quadrature); + const Mapping &mapping, + const Quadrature &quadrature); TemperatureRHS(const TemperatureRHS &data); @@ -547,8 +547,8 @@ namespace Step32 TemperatureRHS::TemperatureRHS( const FiniteElement &temperature_fe, const FiniteElement &stokes_fe, - const Mapping & mapping, - const Quadrature & quadrature) + const Mapping &mapping, + const Quadrature &quadrature) : temperature_fe_values(mapping, temperature_fe, quadrature, @@ -747,12 +747,12 @@ namespace Step32 void refine_mesh(const unsigned int max_grid_level); double compute_viscosity( - const std::vector & old_temperature, - const std::vector & old_old_temperature, + const std::vector &old_temperature, + const std::vector &old_old_temperature, const std::vector> &old_temperature_grads, const std::vector> &old_old_temperature_grads, - const std::vector & old_temperature_laplacians, - const std::vector & old_old_temperature_laplacians, + const std::vector &old_temperature_laplacians, + const std::vector &old_old_temperature_laplacians, const std::vector> &old_velocity_values, const std::vector> &old_old_velocity_values, const std::vector> &old_strain_rates, @@ -916,8 +916,8 @@ namespace Step32 // in this program. The following eight functions do exactly this: void local_assemble_stokes_preconditioner( const typename DoFHandler::active_cell_iterator &cell, - Assembly::Scratch::StokesPreconditioner & scratch, - Assembly::CopyData::StokesPreconditioner & data); + Assembly::Scratch::StokesPreconditioner &scratch, + Assembly::CopyData::StokesPreconditioner &data); void copy_local_to_global_stokes_preconditioner( const Assembly::CopyData::StokesPreconditioner &data); @@ -925,8 +925,8 @@ namespace Step32 void local_assemble_stokes_system( const typename DoFHandler::active_cell_iterator &cell, - Assembly::Scratch::StokesSystem & scratch, - Assembly::CopyData::StokesSystem & data); + Assembly::Scratch::StokesSystem &scratch, + Assembly::CopyData::StokesSystem &data); void copy_local_to_global_stokes_system( const Assembly::CopyData::StokesSystem &data); @@ -934,8 +934,8 @@ namespace Step32 void local_assemble_temperature_matrix( const typename DoFHandler::active_cell_iterator &cell, - Assembly::Scratch::TemperatureMatrix & scratch, - Assembly::CopyData::TemperatureMatrix & data); + Assembly::Scratch::TemperatureMatrix &scratch, + Assembly::CopyData::TemperatureMatrix &data); void copy_local_to_global_temperature_matrix( const Assembly::CopyData::TemperatureMatrix &data); @@ -947,8 +947,8 @@ namespace Step32 const double global_max_velocity, const double global_entropy_variation, const typename DoFHandler::active_cell_iterator &cell, - Assembly::Scratch::TemperatureRHS & scratch, - Assembly::CopyData::TemperatureRHS & data); + Assembly::Scratch::TemperatureRHS &scratch, + Assembly::CopyData::TemperatureRHS &data); void copy_local_to_global_temperature_rhs( const Assembly::CopyData::TemperatureRHS &data); @@ -1529,14 +1529,14 @@ namespace Step32 // updated formulation of the viscosity if $\alpha=2$ is chosen: template double BoussinesqFlowProblem::compute_viscosity( - const std::vector & old_temperature, - const std::vector & old_old_temperature, - const std::vector> & old_temperature_grads, - const std::vector> & old_old_temperature_grads, - const std::vector & old_temperature_laplacians, - const std::vector & old_old_temperature_laplacians, - const std::vector> & old_velocity_values, - const std::vector> & old_old_velocity_values, + const std::vector &old_temperature, + const std::vector &old_old_temperature, + const std::vector> &old_temperature_grads, + const std::vector> &old_old_temperature_grads, + const std::vector &old_temperature_laplacians, + const std::vector &old_old_temperature_laplacians, + const std::vector> &old_velocity_values, + const std::vector> &old_old_velocity_values, const std::vector> &old_strain_rates, const std::vector> &old_old_strain_rates, const double global_u_infty, @@ -2007,8 +2007,8 @@ namespace Step32 template void BoussinesqFlowProblem::local_assemble_stokes_preconditioner( const typename DoFHandler::active_cell_iterator &cell, - Assembly::Scratch::StokesPreconditioner & scratch, - Assembly::CopyData::StokesPreconditioner & data) + Assembly::Scratch::StokesPreconditioner &scratch, + Assembly::CopyData::StokesPreconditioner &data) { const unsigned int dofs_per_cell = stokes_fe.n_dofs_per_cell(); const unsigned int n_q_points = @@ -2115,8 +2115,8 @@ namespace Step32 auto worker = [this](const typename DoFHandler::active_cell_iterator &cell, - Assembly::Scratch::StokesPreconditioner & scratch, - Assembly::CopyData::StokesPreconditioner & data) { + Assembly::Scratch::StokesPreconditioner &scratch, + Assembly::CopyData::StokesPreconditioner &data) { this->local_assemble_stokes_preconditioner(cell, scratch, data); }; @@ -2203,8 +2203,8 @@ namespace Step32 template void BoussinesqFlowProblem::local_assemble_stokes_system( const typename DoFHandler::active_cell_iterator &cell, - Assembly::Scratch::StokesSystem & scratch, - Assembly::CopyData::StokesSystem & data) + Assembly::Scratch::StokesSystem &scratch, + Assembly::CopyData::StokesSystem &data) { const unsigned int dofs_per_cell = scratch.stokes_fe_values.get_fe().n_dofs_per_cell(); @@ -2310,8 +2310,8 @@ namespace Step32 stokes_dof_handler.begin_active()), CellFilter(IteratorFilters::LocallyOwnedCell(), stokes_dof_handler.end()), [this](const typename DoFHandler::active_cell_iterator &cell, - Assembly::Scratch::StokesSystem & scratch, - Assembly::CopyData::StokesSystem & data) { + Assembly::Scratch::StokesSystem &scratch, + Assembly::CopyData::StokesSystem &data) { this->local_assemble_stokes_system(cell, scratch, data); }, [this](const Assembly::CopyData::StokesSystem &data) { @@ -2350,8 +2350,8 @@ namespace Step32 template void BoussinesqFlowProblem::local_assemble_temperature_matrix( const typename DoFHandler::active_cell_iterator &cell, - Assembly::Scratch::TemperatureMatrix & scratch, - Assembly::CopyData::TemperatureMatrix & data) + Assembly::Scratch::TemperatureMatrix &scratch, + Assembly::CopyData::TemperatureMatrix &data) { const unsigned int dofs_per_cell = scratch.temperature_fe_values.get_fe().n_dofs_per_cell(); @@ -2424,8 +2424,8 @@ namespace Step32 CellFilter(IteratorFilters::LocallyOwnedCell(), temperature_dof_handler.end()), [this](const typename DoFHandler::active_cell_iterator &cell, - Assembly::Scratch::TemperatureMatrix & scratch, - Assembly::CopyData::TemperatureMatrix & data) { + Assembly::Scratch::TemperatureMatrix &scratch, + Assembly::CopyData::TemperatureMatrix &data) { this->local_assemble_temperature_matrix(cell, scratch, data); }, [this](const Assembly::CopyData::TemperatureMatrix &data) { @@ -2465,8 +2465,8 @@ namespace Step32 const double global_max_velocity, const double global_entropy_variation, const typename DoFHandler::active_cell_iterator &cell, - Assembly::Scratch::TemperatureRHS & scratch, - Assembly::CopyData::TemperatureRHS & data) + Assembly::Scratch::TemperatureRHS &scratch, + Assembly::CopyData::TemperatureRHS &data) { const bool use_bdf2_scheme = (timestep_number != 0); @@ -2688,8 +2688,8 @@ namespace Step32 auto worker = [this, global_T_range, maximal_velocity, global_entropy_variation]( const typename DoFHandler::active_cell_iterator &cell, - Assembly::Scratch::TemperatureRHS & scratch, - Assembly::CopyData::TemperatureRHS & data) { + Assembly::Scratch::TemperatureRHS &scratch, + Assembly::CopyData::TemperatureRHS &data) { this->local_assemble_temperature_rhs(global_T_range, maximal_velocity, global_entropy_variation, @@ -3054,7 +3054,7 @@ namespace Step32 template void BoussinesqFlowProblem::Postprocessor::evaluate_vector_field( const DataPostprocessorInputs::Vector &inputs, - std::vector> & computed_quantities) const + std::vector> &computed_quantities) const { const unsigned int n_evaluation_points = inputs.solution_values.size(); Assert(inputs.solution_gradients.size() == n_evaluation_points, diff --git a/examples/step-33/step-33.cc b/examples/step-33/step-33.cc index 2d0b7ab60d..80f85e3b3b 100644 --- a/examples/step-33/step-33.cc +++ b/examples/step-33/step-33.cc @@ -207,7 +207,7 @@ namespace Step33 static void compute_flux_matrix(const InputVector &W, ndarray::n_components, - dim> & flux) + dim> &flux) { // First compute the pressure that appears in the flux matrix, and then // compute the first dim columns of the matrix that @@ -244,9 +244,9 @@ namespace Step33 // $\alpha$. It's form has also been given already in the introduction: template static void numerical_normal_flux( - const Tensor<1, dim> & normal, - const InputVector & Wplus, - const InputVector & Wminus, + const Tensor<1, dim> &normal, + const InputVector &Wplus, + const InputVector &Wminus, const double alpha, std::array &normal_flux) { @@ -280,7 +280,7 @@ namespace Step33 // 2d. This naturally leads to the following function: template static void compute_forcing_vector( - const InputVector & W, + const InputVector &W, std::array &forcing) { const double gravity = -1.0; @@ -354,10 +354,10 @@ namespace Step33 template static void compute_Wminus(const std::array &boundary_kind, - const Tensor<1, dim> & normal_vector, - const DataVector & Wplus, + const Tensor<1, dim> &normal_vector, + const DataVector &Wplus, const Vector &boundary_values, - const DataVector & Wminus) + const DataVector &Wminus) { for (unsigned int c = 0; c < n_components; ++c) switch (boundary_kind[c]) @@ -441,9 +441,9 @@ namespace Step33 // indicators, but this one does, and it is easy to compute: static void compute_refinement_indicators(const DoFHandler &dof_handler, - const Mapping & mapping, - const Vector & solution, - Vector & refinement_indicators) + const Mapping &mapping, + const Vector &solution, + Vector &refinement_indicators) { const unsigned int dofs_per_cell = dof_handler.get_fe().n_dofs_per_cell(); std::vector dofs(dofs_per_cell); @@ -557,7 +557,7 @@ namespace Step33 template void EulerEquations::Postprocessor::evaluate_vector_field( const DataPostprocessorInputs::Vector &inputs, - std::vector> & computed_quantities) const + std::vector> &computed_quantities) const { // At the beginning of the function, let us make sure that all variables // have the correct sizes, so that we can access individual vector @@ -1298,12 +1298,12 @@ namespace Step33 void setup_system(); void assemble_system(); - void assemble_cell_term(const FEValues & fe_v, + void assemble_cell_term(const FEValues &fe_v, const std::vector &dofs); void assemble_face_term( const unsigned int face_no, - const FEFaceValuesBase & fe_v, - const FEFaceValuesBase & fe_v_neighbor, + const FEFaceValuesBase &fe_v, + const FEFaceValuesBase &fe_v_neighbor, const std::vector &dofs, const std::vector &dofs_neighbor, const bool external_face, @@ -1674,7 +1674,7 @@ namespace Step33 // residual: template void ConservationLaw::assemble_cell_term( - const FEValues & fe_v, + const FEValues &fe_v, const std::vector &dof_indices) { const unsigned int dofs_per_cell = fe_v.dofs_per_cell; @@ -1904,8 +1904,8 @@ namespace Step33 template void ConservationLaw::assemble_face_term( const unsigned int face_no, - const FEFaceValuesBase & fe_v, - const FEFaceValuesBase & fe_v_neighbor, + const FEFaceValuesBase &fe_v, + const FEFaceValuesBase &fe_v_neighbor, const std::vector &dof_indices, const std::vector &dof_indices_neighbor, const bool external_face, diff --git a/examples/step-35/step-35.cc b/examples/step-35/step-35.cc index c2981564f5..374dfff568 100644 --- a/examples/step-35/step-35.cc +++ b/examples/step-35/step-35.cc @@ -331,11 +331,11 @@ namespace Step35 public: Velocity(const double initial_time = 0.0); - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; virtual void value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component = 0) const override; }; @@ -348,7 +348,7 @@ namespace Step35 template void Velocity::value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int) const { const unsigned int n_points = points.size(); @@ -379,11 +379,11 @@ namespace Step35 public: Pressure(const double initial_time = 0.0); - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; virtual void value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component = 0) const override; }; @@ -394,7 +394,7 @@ namespace Step35 template - double Pressure::value(const Point & p, + double Pressure::value(const Point &p, const unsigned int component) const { (void)component; @@ -404,7 +404,7 @@ namespace Step35 template void Pressure::value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component) const { (void)component; @@ -579,8 +579,8 @@ namespace Step35 unsigned int nqp; FEValues fe_val_vel; FEValues fe_val_pres; - InitGradScratchData(const FE_Q & fe_v, - const FE_Q & fe_p, + InitGradScratchData(const FE_Q &fe_v, + const FE_Q &fe_p, const QGauss &quad, const UpdateFlags flags_v, const UpdateFlags flags_p) @@ -599,7 +599,7 @@ namespace Step35 {} }; - void assemble_one_cell_of_gradient(const IteratorPair & SI, + void assemble_one_cell_of_gradient(const IteratorPair &SI, InitGradScratchData &scratch, InitGradPerTaskData &data); @@ -627,7 +627,7 @@ namespace Step35 std::vector> grad_u_star; std::vector u_star_tmp; FEValues fe_val; - AdvectionScratchData(const FE_Q & fe, + AdvectionScratchData(const FE_Q &fe, const QGauss &quad, const UpdateFlags flags) : nqp(quad.size()) @@ -652,8 +652,8 @@ namespace Step35 void assemble_one_cell_of_advection( const typename DoFHandler::active_cell_iterator &cell, - AdvectionScratchData & scratch, - AdvectionPerTaskData & data); + AdvectionScratchData &scratch, + AdvectionPerTaskData &data); void copy_advection_local_to_global(const AdvectionPerTaskData &data); @@ -907,7 +907,7 @@ namespace Step35 template void NavierStokesProjection::assemble_one_cell_of_gradient( - const IteratorPair & SI, + const IteratorPair &SI, InitGradScratchData &scratch, InitGradPerTaskData &data) { @@ -1148,8 +1148,8 @@ namespace Step35 template void NavierStokesProjection::assemble_one_cell_of_advection( const typename DoFHandler::active_cell_iterator &cell, - AdvectionScratchData & scratch, - AdvectionPerTaskData & data) + AdvectionScratchData &scratch, + AdvectionPerTaskData &data) { scratch.fe_val.reinit(cell); cell->get_dof_indices(data.local_dof_indices); diff --git a/examples/step-37/step-37.cc b/examples/step-37/step-37.cc index 03eb0b1cdd..e9bd5a3aa0 100644 --- a/examples/step-37/step-37.cc +++ b/examples/step-37/step-37.cc @@ -87,7 +87,7 @@ namespace Step37 class Coefficient : public Function { public: - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; template @@ -128,7 +128,7 @@ namespace Step37 template - double Coefficient::value(const Point & p, + double Coefficient::value(const Point &p, const unsigned int component) const { return value(p, component); @@ -228,19 +228,19 @@ namespace Step37 private: virtual void apply_add( - LinearAlgebra::distributed::Vector & dst, + LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src) const override; void - local_apply(const MatrixFree & data, - LinearAlgebra::distributed::Vector & dst, + local_apply(const MatrixFree &data, + LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src, const std::pair &cell_range) const; void local_compute_diagonal( - const MatrixFree & data, - LinearAlgebra::distributed::Vector & dst, - const unsigned int & dummy, + const MatrixFree &data, + LinearAlgebra::distributed::Vector &dst, + const unsigned int &dummy, const std::pair &cell_range) const; Table<2, VectorizedArray> coefficient; @@ -390,10 +390,10 @@ namespace Step37 // degrees of freedom). template void LaplaceOperator::local_apply( - const MatrixFree & data, - LinearAlgebra::distributed::Vector & dst, + const MatrixFree &data, + LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src, - const std::pair & cell_range) const + const std::pair &cell_range) const { FEEvaluation phi(data); @@ -492,7 +492,7 @@ namespace Step37 // entry of vmult() functions, so no information gets lost. template void LaplaceOperator::apply_add( - LinearAlgebra::distributed::Vector & dst, + LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src) const { this->data->cell_loop(&LaplaceOperator::local_apply, this, dst, src); @@ -611,7 +611,7 @@ namespace Step37 // level matrices where no hanging node constraints appear. template void LaplaceOperator::local_compute_diagonal( - const MatrixFree & data, + const MatrixFree &data, LinearAlgebra::distributed::Vector &dst, const unsigned int &, const std::pair &cell_range) const diff --git a/examples/step-38/step-38.cc b/examples/step-38/step-38.cc index 8f6121e1f6..20905ef4aa 100644 --- a/examples/step-38/step-38.cc +++ b/examples/step-38/step-38.cc @@ -141,11 +141,11 @@ namespace Step38 class Solution : public Function { public: - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; virtual Tensor<1, dim> - gradient(const Point & p, + gradient(const Point &p, const unsigned int component = 0) const override; }; @@ -198,7 +198,7 @@ namespace Step38 class RightHandSide : public Function { public: - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; }; diff --git a/examples/step-39/step-39.cc b/examples/step-39/step-39.cc index 7822054c12..beecfc2e28 100644 --- a/examples/step-39/step-39.cc +++ b/examples/step-39/step-39.cc @@ -96,13 +96,13 @@ namespace Step39 class MatrixIntegrator : public MeshWorker::LocalIntegrator { public: - void cell(MeshWorker::DoFInfo & dinfo, + void cell(MeshWorker::DoFInfo &dinfo, typename MeshWorker::IntegrationInfo &info) const override; void - boundary(MeshWorker::DoFInfo & dinfo, + boundary(MeshWorker::DoFInfo &dinfo, typename MeshWorker::IntegrationInfo &info) const override; - void face(MeshWorker::DoFInfo & dinfo1, - MeshWorker::DoFInfo & dinfo2, + void face(MeshWorker::DoFInfo &dinfo1, + MeshWorker::DoFInfo &dinfo2, typename MeshWorker::IntegrationInfo &info1, typename MeshWorker::IntegrationInfo &info2) const override; }; @@ -119,7 +119,7 @@ namespace Step39 // LocalIntegrators::Laplace::compute_penalty() and we use this below. template void MatrixIntegrator::cell( - MeshWorker::DoFInfo & dinfo, + MeshWorker::DoFInfo &dinfo, typename MeshWorker::IntegrationInfo &info) const { LocalIntegrators::Laplace::cell_matrix(dinfo.matrix(0, false).matrix, @@ -129,7 +129,7 @@ namespace Step39 template void MatrixIntegrator::boundary( - MeshWorker::DoFInfo & dinfo, + MeshWorker::DoFInfo &dinfo, typename MeshWorker::IntegrationInfo &info) const { const unsigned int degree = info.fe_values(0).get_fe().tensor_degree(); @@ -142,8 +142,8 @@ namespace Step39 // Interior faces use the interior penalty method template void MatrixIntegrator::face( - MeshWorker::DoFInfo & dinfo1, - MeshWorker::DoFInfo & dinfo2, + MeshWorker::DoFInfo &dinfo1, + MeshWorker::DoFInfo &dinfo2, typename MeshWorker::IntegrationInfo &info1, typename MeshWorker::IntegrationInfo &info2) const { @@ -166,13 +166,13 @@ namespace Step39 class RHSIntegrator : public MeshWorker::LocalIntegrator { public: - void cell(MeshWorker::DoFInfo & dinfo, + void cell(MeshWorker::DoFInfo &dinfo, typename MeshWorker::IntegrationInfo &info) const override; void - boundary(MeshWorker::DoFInfo & dinfo, + boundary(MeshWorker::DoFInfo &dinfo, typename MeshWorker::IntegrationInfo &info) const override; - void face(MeshWorker::DoFInfo & dinfo1, - MeshWorker::DoFInfo & dinfo2, + void face(MeshWorker::DoFInfo &dinfo1, + MeshWorker::DoFInfo &dinfo2, typename MeshWorker::IntegrationInfo &info1, typename MeshWorker::IntegrationInfo &info2) const override; }; @@ -187,11 +187,11 @@ namespace Step39 template void RHSIntegrator::boundary( - MeshWorker::DoFInfo & dinfo, + MeshWorker::DoFInfo &dinfo, typename MeshWorker::IntegrationInfo &info) const { const FEValuesBase &fe = info.fe_values(); - Vector & local_vector = dinfo.vector(0).block(0); + Vector &local_vector = dinfo.vector(0).block(0); std::vector boundary_values(fe.n_quadrature_points); exact_solution.value_list(fe.get_quadrature_points(), boundary_values); @@ -225,13 +225,13 @@ namespace Step39 class Estimator : public MeshWorker::LocalIntegrator { public: - void cell(MeshWorker::DoFInfo & dinfo, + void cell(MeshWorker::DoFInfo &dinfo, typename MeshWorker::IntegrationInfo &info) const override; void - boundary(MeshWorker::DoFInfo & dinfo, + boundary(MeshWorker::DoFInfo &dinfo, typename MeshWorker::IntegrationInfo &info) const override; - void face(MeshWorker::DoFInfo & dinfo1, - MeshWorker::DoFInfo & dinfo2, + void face(MeshWorker::DoFInfo &dinfo1, + MeshWorker::DoFInfo &dinfo2, typename MeshWorker::IntegrationInfo &info1, typename MeshWorker::IntegrationInfo &info2) const override; }; @@ -241,7 +241,7 @@ namespace Step39 // the right hand side is zero. template void - Estimator::cell(MeshWorker::DoFInfo & dinfo, + Estimator::cell(MeshWorker::DoFInfo &dinfo, typename MeshWorker::IntegrationInfo &info) const { const FEValuesBase &fe = info.fe_values(); @@ -260,7 +260,7 @@ namespace Step39 // the correct boundary condition. template void Estimator::boundary( - MeshWorker::DoFInfo & dinfo, + MeshWorker::DoFInfo &dinfo, typename MeshWorker::IntegrationInfo &info) const { const FEValuesBase &fe = info.fe_values(); @@ -287,14 +287,14 @@ namespace Step39 // solution and its normal derivative, weighted appropriately. template void - Estimator::face(MeshWorker::DoFInfo & dinfo1, - MeshWorker::DoFInfo & dinfo2, + Estimator::face(MeshWorker::DoFInfo &dinfo1, + MeshWorker::DoFInfo &dinfo2, typename MeshWorker::IntegrationInfo &info1, typename MeshWorker::IntegrationInfo &info2) const { - const FEValuesBase & fe = info1.fe_values(); - const std::vector & uh1 = info1.values[0][0]; - const std::vector & uh2 = info2.values[0][0]; + const FEValuesBase &fe = info1.fe_values(); + const std::vector &uh1 = info1.values[0][0]; + const std::vector &uh2 = info2.values[0][0]; const std::vector> &Duh1 = info1.gradients[0][0]; const std::vector> &Duh2 = info2.gradients[0][0]; @@ -335,13 +335,13 @@ namespace Step39 class ErrorIntegrator : public MeshWorker::LocalIntegrator { public: - void cell(MeshWorker::DoFInfo & dinfo, + void cell(MeshWorker::DoFInfo &dinfo, typename MeshWorker::IntegrationInfo &info) const override; void - boundary(MeshWorker::DoFInfo & dinfo, + boundary(MeshWorker::DoFInfo &dinfo, typename MeshWorker::IntegrationInfo &info) const override; - void face(MeshWorker::DoFInfo & dinfo1, - MeshWorker::DoFInfo & dinfo2, + void face(MeshWorker::DoFInfo &dinfo1, + MeshWorker::DoFInfo &dinfo2, typename MeshWorker::IntegrationInfo &info1, typename MeshWorker::IntegrationInfo &info2) const override; }; @@ -360,10 +360,10 @@ namespace Step39 // on cells. template void ErrorIntegrator::cell( - MeshWorker::DoFInfo & dinfo, + MeshWorker::DoFInfo &dinfo, typename MeshWorker::IntegrationInfo &info) const { - const FEValuesBase & fe = info.fe_values(); + const FEValuesBase &fe = info.fe_values(); std::vector> exact_gradients(fe.n_quadrature_points); std::vector exact_values(fe.n_quadrature_points); @@ -371,7 +371,7 @@ namespace Step39 exact_solution.value_list(fe.get_quadrature_points(), exact_values); const std::vector> &Duh = info.gradients[0][0]; - const std::vector & uh = info.values[0][0]; + const std::vector &uh = info.values[0][0]; for (unsigned k = 0; k < fe.n_quadrature_points; ++k) { @@ -392,7 +392,7 @@ namespace Step39 template void ErrorIntegrator::boundary( - MeshWorker::DoFInfo & dinfo, + MeshWorker::DoFInfo &dinfo, typename MeshWorker::IntegrationInfo &info) const { const FEValuesBase &fe = info.fe_values(); @@ -417,12 +417,12 @@ namespace Step39 template void ErrorIntegrator::face( - MeshWorker::DoFInfo & dinfo1, - MeshWorker::DoFInfo & dinfo2, + MeshWorker::DoFInfo &dinfo1, + MeshWorker::DoFInfo &dinfo2, typename MeshWorker::IntegrationInfo &info1, typename MeshWorker::IntegrationInfo &info2) const { - const FEValuesBase & fe = info1.fe_values(); + const FEValuesBase &fe = info1.fe_values(); const std::vector &uh1 = info1.values[0][0]; const std::vector &uh2 = info2.values[0][0]; diff --git a/examples/step-4/step-4.cc b/examples/step-4/step-4.cc index 2e651db8e7..665a4c3df6 100644 --- a/examples/step-4/step-4.cc +++ b/examples/step-4/step-4.cc @@ -125,7 +125,7 @@ template class RightHandSide : public Function { public: - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; }; @@ -135,7 +135,7 @@ template class BoundaryValues : public Function { public: - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; }; diff --git a/examples/step-41/step-41.cc b/examples/step-41/step-41.cc index 48b77b8312..e84726485b 100644 --- a/examples/step-41/step-41.cc +++ b/examples/step-41/step-41.cc @@ -152,7 +152,7 @@ namespace Step41 class Obstacle : public Function { public: - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override { (void)component; diff --git a/examples/step-42/step-42.cc b/examples/step-42/step-42.cc index e6b437ce36..8ce2def015 100644 --- a/examples/step-42/step-42.cc +++ b/examples/step-42/step-42.cc @@ -114,12 +114,12 @@ namespace Step42 bool get_stress_strain_tensor( const SymmetricTensor<2, dim> &strain_tensor, - SymmetricTensor<4, dim> & stress_strain_tensor) const; + SymmetricTensor<4, dim> &stress_strain_tensor) const; void get_linearized_stress_strain_tensors( const SymmetricTensor<2, dim> &strain_tensor, - SymmetricTensor<4, dim> & stress_strain_tensor_linearized, - SymmetricTensor<4, dim> & stress_strain_tensor) const; + SymmetricTensor<4, dim> &stress_strain_tensor_linearized, + SymmetricTensor<4, dim> &stress_strain_tensor) const; private: const double kappa; @@ -193,7 +193,7 @@ namespace Step42 template bool ConstitutiveLaw::get_stress_strain_tensor( const SymmetricTensor<2, dim> &strain_tensor, - SymmetricTensor<4, dim> & stress_strain_tensor) const + SymmetricTensor<4, dim> &stress_strain_tensor) const { Assert(dim == 3, ExcNotImplemented()); @@ -232,8 +232,8 @@ namespace Step42 template void ConstitutiveLaw::get_linearized_stress_strain_tensors( const SymmetricTensor<2, dim> &strain_tensor, - SymmetricTensor<4, dim> & stress_strain_tensor_linearized, - SymmetricTensor<4, dim> & stress_strain_tensor) const + SymmetricTensor<4, dim> &stress_strain_tensor_linearized, + SymmetricTensor<4, dim> &stress_strain_tensor) const { Assert(dim == 3, ExcNotImplemented()); @@ -276,11 +276,11 @@ namespace Step42 public: BoundaryForce(); - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; virtual void vector_value(const Point &p, - Vector & values) const override; + Vector &values) const override; }; template @@ -298,7 +298,7 @@ namespace Step42 template void BoundaryForce::vector_value(const Point &p, - Vector & values) const + Vector &values) const { for (unsigned int c = 0; c < this->n_components; ++c) values(c) = BoundaryForce::value(p, c); @@ -312,7 +312,7 @@ namespace Step42 public: BoundaryValues(); - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; }; @@ -349,11 +349,11 @@ namespace Step42 public: SphereObstacle(const double z_surface); - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; virtual void vector_value(const Point &p, - Vector & values) const override; + Vector &values) const override; private: const double z_surface; @@ -368,7 +368,7 @@ namespace Step42 template - double SphereObstacle::value(const Point & p, + double SphereObstacle::value(const Point &p, const unsigned int component) const { if (component == 0) @@ -393,7 +393,7 @@ namespace Step42 template void SphereObstacle::vector_value(const Point &p, - Vector & values) const + Vector &values) const { for (unsigned int c = 0; c < this->n_components; ++c) values(c) = SphereObstacle::value(p, c); @@ -524,11 +524,11 @@ namespace Step42 public: ChineseObstacle(const std::string &filename, const double z_surface); - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; virtual void vector_value(const Point &p, - Vector & values) const override; + Vector &values) const override; private: const BitmapFile input_obstacle; @@ -546,7 +546,7 @@ namespace Step42 template - double ChineseObstacle::value(const Point & p, + double ChineseObstacle::value(const Point &p, const unsigned int component) const { if (component == 0) @@ -566,7 +566,7 @@ namespace Step42 template void ChineseObstacle::vector_value(const Point &p, - Vector & values) const + Vector &values) const { for (unsigned int c = 0; c < this->n_components; ++c) values(c) = ChineseObstacle::value(p, c); diff --git a/examples/step-43/step-43.cc b/examples/step-43/step-43.cc index f805288e73..32294220f9 100644 --- a/examples/step-43/step-43.cc +++ b/examples/step-43/step-43.cc @@ -87,7 +87,7 @@ namespace Step43 : Function(1) {} - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; }; @@ -109,7 +109,7 @@ namespace Step43 : Function(1) {} - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; }; @@ -135,11 +135,11 @@ namespace Step43 : Function(1) {} - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; virtual void vector_value(const Point &p, - Vector & value) const override; + Vector &value) const override; }; @@ -177,13 +177,13 @@ namespace Step43 virtual void value_list(const std::vector> &points, - std::vector> & values) const override; + std::vector> &values) const override; }; template void KInverse::value_list(const std::vector> &points, - std::vector> & values) const + std::vector> &values) const { AssertDimension(points.size(), values.size()); @@ -218,7 +218,7 @@ namespace Step43 virtual void value_list(const std::vector> &points, - std::vector> & values) const override; + std::vector> &values) const override; private: static std::vector> centers; @@ -243,7 +243,7 @@ namespace Step43 template void KInverse::value_list(const std::vector> &points, - std::vector> & values) const + std::vector> &values) const { AssertDimension(points.size(), values.size()); @@ -324,7 +324,7 @@ namespace Step43 class InverseMatrix : public Subscriptor { public: - InverseMatrix(const MatrixType & m, + InverseMatrix(const MatrixType &m, const PreconditionerType &preconditioner); @@ -333,13 +333,13 @@ namespace Step43 private: const SmartPointer matrix; - const PreconditionerType & preconditioner; + const PreconditionerType &preconditioner; }; template InverseMatrix::InverseMatrix( - const MatrixType & m, + const MatrixType &m, const PreconditionerType &preconditioner) : matrix(&m) , preconditioner(preconditioner) @@ -350,7 +350,7 @@ namespace Step43 template template void InverseMatrix::vmult( - VectorType & dst, + VectorType &dst, const VectorType &src) const { SolverControl solver_control(src.size(), 1e-7 * src.l2_norm()); @@ -376,9 +376,9 @@ namespace Step43 const TrilinosWrappers::BlockSparseMatrix &S, const InverseMatrix &Mpinv, - const PreconditionerTypeA & Apreconditioner); + const PreconditionerTypeA &Apreconditioner); - void vmult(TrilinosWrappers::MPI::BlockVector & dst, + void vmult(TrilinosWrappers::MPI::BlockVector &dst, const TrilinosWrappers::MPI::BlockVector &src) const; private: @@ -400,7 +400,7 @@ namespace Step43 const TrilinosWrappers::BlockSparseMatrix &S, const InverseMatrix &Mpinv, - const PreconditionerTypeA & Apreconditioner) + const PreconditionerTypeA &Apreconditioner) : darcy_matrix(&S) , m_inverse(&Mpinv) , a_preconditioner(Apreconditioner) @@ -411,7 +411,7 @@ namespace Step43 template void BlockSchurPreconditioner::vmult( - TrilinosWrappers::MPI::BlockVector & dst, + TrilinosWrappers::MPI::BlockVector &dst, const TrilinosWrappers::MPI::BlockVector &src) const { a_preconditioner.vmult(dst.block(0), src.block(0)); @@ -466,14 +466,14 @@ namespace Step43 void assemble_saturation_matrix(); void assemble_saturation_rhs(); void assemble_saturation_rhs_cell_term( - const FEValues & saturation_fe_values, - const FEValues & darcy_fe_values, + const FEValues &saturation_fe_values, + const FEValues &darcy_fe_values, const double global_max_u_F_prime, const double global_S_variation, const std::vector &local_dof_indices); void assemble_saturation_rhs_boundary_term( - const FEFaceValues & saturation_fe_face_values, - const FEFaceValues & darcy_fe_face_values, + const FEFaceValues &saturation_fe_face_values, + const FEFaceValues &darcy_fe_face_values, const std::vector &local_dof_indices); void solve(); void refine_mesh(const unsigned int min_grid_level, @@ -487,8 +487,8 @@ namespace Step43 bool determine_whether_to_solve_for_pressure_and_velocity() const; void project_back_saturation(); double compute_viscosity( - const std::vector & old_saturation, - const std::vector & old_old_saturation, + const std::vector &old_saturation, + const std::vector &old_old_saturation, const std::vector> &old_saturation_grads, const std::vector> &old_old_saturation_grads, const std::vector> &present_darcy_values, @@ -1318,8 +1318,8 @@ namespace Step43 // global vector with position specified in local_dof_indices. template void TwoPhaseFlowProblem::assemble_saturation_rhs_cell_term( - const FEValues & saturation_fe_values, - const FEValues & darcy_fe_values, + const FEValues &saturation_fe_values, + const FEValues &darcy_fe_values, const double global_max_u_F_prime, const double global_S_variation, const std::vector &local_dof_indices) @@ -1395,8 +1395,8 @@ namespace Step43 // from giving more descriptions about that. template void TwoPhaseFlowProblem::assemble_saturation_rhs_boundary_term( - const FEFaceValues & saturation_fe_face_values, - const FEFaceValues & darcy_fe_face_values, + const FEFaceValues &saturation_fe_face_values, + const FEFaceValues &darcy_fe_face_values, const std::vector &local_dof_indices) { const unsigned int dofs_per_cell = saturation_fe_face_values.dofs_per_cell; @@ -2051,8 +2051,8 @@ namespace Step43 // need to be adjusted accordingly. template double TwoPhaseFlowProblem::compute_viscosity( - const std::vector & old_saturation, - const std::vector & old_old_saturation, + const std::vector &old_saturation, + const std::vector &old_old_saturation, const std::vector> &old_saturation_grads, const std::vector> &old_old_saturation_grads, const std::vector> &present_darcy_values, diff --git a/examples/step-44/step-44.cc b/examples/step-44/step-44.cc index 63e65f996f..c4f061ee20 100644 --- a/examples/step-44/step-44.cc +++ b/examples/step-44/step-44.cc @@ -853,16 +853,16 @@ namespace Step44 void assemble_system_one_cell( const typename DoFHandler::active_cell_iterator &cell, - ScratchData_ASM & scratch, - PerTaskData_ASM & data) const; + ScratchData_ASM &scratch, + PerTaskData_ASM &data) const; // And similar to perform global static condensation: void assemble_sc(); void assemble_sc_one_cell( const typename DoFHandler::active_cell_iterator &cell, - ScratchData_SC & scratch, - PerTaskData_SC & data); + ScratchData_SC &scratch, + PerTaskData_SC &data); void copy_local_to_global_sc(const PerTaskData_SC &data); @@ -875,8 +875,8 @@ namespace Step44 void update_qph_incremental_one_cell( const typename DoFHandler::active_cell_iterator &cell, - ScratchData_UQPH & scratch, - PerTaskData_UQPH & data); + ScratchData_UQPH &scratch, + PerTaskData_UQPH &data); void copy_local_to_global_UQPH(const PerTaskData_UQPH & /*data*/) {} @@ -1007,7 +1007,7 @@ namespace Step44 void get_error_residual(Errors &error_residual); void get_error_update(const BlockVector &newton_update, - Errors & error_update); + Errors &error_update); std::pair get_error_dilation() const; @@ -1182,9 +1182,9 @@ namespace Step44 std::vector>> symm_grad_Nx; ScratchData_ASM(const FiniteElement &fe_cell, - const QGauss & qf_cell, + const QGauss &qf_cell, const UpdateFlags uf_cell, - const QGauss & qf_face, + const QGauss &qf_face, const UpdateFlags uf_face) : fe_values(fe_cell, qf_cell, uf_cell) , fe_face_values(fe_cell, qf_face, uf_face) @@ -1328,8 +1328,8 @@ namespace Step44 FEValues fe_values; - ScratchData_UQPH(const FiniteElement & fe_cell, - const QGauss & qf_cell, + ScratchData_UQPH(const FiniteElement &fe_cell, + const QGauss &qf_cell, const UpdateFlags uf_cell, const BlockVector &solution_total) : solution_total(solution_total) @@ -1602,7 +1602,7 @@ namespace Step44 template void Solid::update_qph_incremental_one_cell( const typename DoFHandler::active_cell_iterator &cell, - ScratchData_UQPH & scratch, + ScratchData_UQPH &scratch, PerTaskData_UQPH & /*data*/) { const std::vector>> lqph = @@ -1902,7 +1902,7 @@ namespace Step44 // Determine the true Newton update error for the problem template void Solid::get_error_update(const BlockVector &newton_update, - Errors & error_update) + Errors &error_update) { BlockVector error_ud(dofs_per_block); for (unsigned int i = 0; i < dof_handler.n_dofs(); ++i) @@ -1963,8 +1963,8 @@ namespace Step44 WorkStream::run( dof_handler.active_cell_iterators(), [this](const typename DoFHandler::active_cell_iterator &cell, - ScratchData_ASM & scratch, - PerTaskData_ASM & data) { + ScratchData_ASM &scratch, + PerTaskData_ASM &data) { this->assemble_system_one_cell(cell, scratch, data); }, [this](const PerTaskData_ASM &data) { @@ -1991,8 +1991,8 @@ namespace Step44 template void Solid::assemble_system_one_cell( const typename DoFHandler::active_cell_iterator &cell, - ScratchData_ASM & scratch, - PerTaskData_ASM & data) const + ScratchData_ASM &scratch, + PerTaskData_ASM &data) const { data.reset(); scratch.reset(); @@ -2063,7 +2063,7 @@ namespace Step44 // Next we define some aliases to make the assembly process easier to // follow. - const std::vector & N = scratch.Nx[q_point]; + const std::vector &N = scratch.Nx[q_point]; const std::vector> &symm_grad_Nx = scratch.symm_grad_Nx[q_point]; const std::vector> &grad_Nx = scratch.grad_Nx[q_point]; @@ -2476,8 +2476,8 @@ namespace Step44 template void Solid::assemble_sc_one_cell( const typename DoFHandler::active_cell_iterator &cell, - ScratchData_SC & scratch, - PerTaskData_SC & data) + ScratchData_SC &scratch, + PerTaskData_SC &data) { data.reset(); scratch.reset(); diff --git a/examples/step-45/step-45.cc b/examples/step-45/step-45.cc index ed01fff61b..cbc7bda907 100644 --- a/examples/step-45/step-45.cc +++ b/examples/step-45/step-45.cc @@ -118,11 +118,11 @@ namespace Step45 : Function(dim + 1) {} - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; virtual void vector_value(const Point &p, - Vector & value) const override; + Vector &value) const override; }; @@ -140,7 +140,7 @@ namespace Step45 template void BoundaryValues::vector_value(const Point &p, - Vector & values) const + Vector &values) const { for (unsigned int c = 0; c < this->n_components; ++c) values(c) = BoundaryValues::value(p, c); @@ -155,16 +155,16 @@ namespace Step45 : Function(dim + 1) {} - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; virtual void vector_value(const Point &p, - Vector & value) const override; + Vector &value) const override; }; template - double RightHandSide::value(const Point & p, + double RightHandSide::value(const Point &p, const unsigned int component) const { const Point center(0.75, 0.1); @@ -178,7 +178,7 @@ namespace Step45 template void RightHandSide::vector_value(const Point &p, - Vector & values) const + Vector &values) const { for (unsigned int c = 0; c < this->n_components; ++c) values(c) = RightHandSide::value(p, c); @@ -190,12 +190,12 @@ namespace Step45 class InverseMatrix : public Subscriptor { public: - InverseMatrix(const MatrixType & m, + InverseMatrix(const MatrixType &m, const PreconditionerType &preconditioner, - const IndexSet & locally_owned, + const IndexSet &locally_owned, const MPI_Comm mpi_communicator); - void vmult(TrilinosWrappers::MPI::Vector & dst, + void vmult(TrilinosWrappers::MPI::Vector &dst, const TrilinosWrappers::MPI::Vector &src) const; private: @@ -209,9 +209,9 @@ namespace Step45 template InverseMatrix::InverseMatrix( - const MatrixType & m, + const MatrixType &m, const PreconditionerType &preconditioner, - const IndexSet & locally_owned, + const IndexSet &locally_owned, const MPI_Comm mpi_communicator) : matrix(&m) , preconditioner(&preconditioner) @@ -222,7 +222,7 @@ namespace Step45 template void InverseMatrix::vmult( - TrilinosWrappers::MPI::Vector & dst, + TrilinosWrappers::MPI::Vector &dst, const TrilinosWrappers::MPI::Vector &src) const { SolverControl solver_control(src.size(), 1e-6 * src.l2_norm()); @@ -242,11 +242,11 @@ namespace Step45 public: SchurComplement(const TrilinosWrappers::BlockSparseMatrix &system_matrix, const InverseMatrix & A_inverse, - const IndexSet & owned_pres, + PreconditionerType> &A_inverse, + const IndexSet &owned_pres, const MPI_Comm mpi_communicator); - void vmult(TrilinosWrappers::MPI::Vector & dst, + void vmult(TrilinosWrappers::MPI::Vector &dst, const TrilinosWrappers::MPI::Vector &src) const; private: @@ -263,7 +263,7 @@ namespace Step45 SchurComplement::SchurComplement( const TrilinosWrappers::BlockSparseMatrix &system_matrix, const InverseMatrix - & A_inverse, + &A_inverse, const IndexSet &owned_vel, const MPI_Comm mpi_communicator) : system_matrix(&system_matrix) @@ -276,7 +276,7 @@ namespace Step45 template void SchurComplement::vmult( - TrilinosWrappers::MPI::Vector & dst, + TrilinosWrappers::MPI::Vector &dst, const TrilinosWrappers::MPI::Vector &src) const { system_matrix->block(0, 1).vmult(tmp1, src); diff --git a/examples/step-46/step-46.cc b/examples/step-46/step-46.cc index 1cd4c8930c..4f653895bd 100644 --- a/examples/step-46/step-46.cc +++ b/examples/step-46/step-46.cc @@ -111,12 +111,12 @@ namespace Step46 void setup_dofs(); void assemble_system(); void assemble_interface_term( - const FEFaceValuesBase & elasticity_fe_face_values, - const FEFaceValuesBase & stokes_fe_face_values, - std::vector> & elasticity_phi, + const FEFaceValuesBase &elasticity_fe_face_values, + const FEFaceValuesBase &stokes_fe_face_values, + std::vector> &elasticity_phi, std::vector> &stokes_symgrad_phi_u, - std::vector & stokes_phi_p, - FullMatrix & local_interface_matrix) const; + std::vector &stokes_phi_p, + FullMatrix &local_interface_matrix) const; void solve(); void output_results(const unsigned int refinement_cycle) const; void refine_mesh(); @@ -160,16 +160,16 @@ namespace Step46 : Function(dim + 1 + dim) {} - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; virtual void vector_value(const Point &p, - Vector & value) const override; + Vector &value) const override; }; template - double StokesBoundaryValues::value(const Point & p, + double StokesBoundaryValues::value(const Point &p, const unsigned int component) const { Assert(component < this->n_components, @@ -192,7 +192,7 @@ namespace Step46 template void StokesBoundaryValues::vector_value(const Point &p, - Vector & values) const + Vector &values) const { for (unsigned int c = 0; c < this->n_components; ++c) values(c) = StokesBoundaryValues::value(p, c); @@ -767,12 +767,12 @@ namespace Step46 // here are given in the introduction. template void FluidStructureProblem::assemble_interface_term( - const FEFaceValuesBase & elasticity_fe_face_values, - const FEFaceValuesBase & stokes_fe_face_values, - std::vector> & elasticity_phi, + const FEFaceValuesBase &elasticity_fe_face_values, + const FEFaceValuesBase &stokes_fe_face_values, + std::vector> &elasticity_phi, std::vector> &stokes_symgrad_phi_u, - std::vector & stokes_phi_p, - FullMatrix & local_interface_matrix) const + std::vector &stokes_phi_p, + FullMatrix &local_interface_matrix) const { Assert(stokes_fe_face_values.n_quadrature_points == elasticity_fe_face_values.n_quadrature_points, diff --git a/examples/step-47/step-47.cc b/examples/step-47/step-47.cc index c2494c32e4..dfeff810b2 100644 --- a/examples/step-47/step-47.cc +++ b/examples/step-47/step-47.cc @@ -104,7 +104,7 @@ namespace Step47 } virtual void - hessian_list(const std::vector> & points, + hessian_list(const std::vector> &points, std::vector> &hessians, const unsigned int /*component*/ = 0) const override { @@ -274,7 +274,7 @@ namespace Step47 template struct ScratchData { - ScratchData(const Mapping & mapping, + ScratchData(const Mapping &mapping, const FiniteElement &fe, const unsigned int quadrature_degree, const UpdateFlags update_flags, @@ -396,9 +396,9 @@ namespace Step47 // we could have left the call to `fe_values.shape_hessian(j,qpoint)` // in the instruction that computes the scalar product between // the two terms. - auto cell_worker = [&](const Iterator & cell, + auto cell_worker = [&](const Iterator &cell, ScratchData &scratch_data, - CopyData & copy_data) { + CopyData ©_data) { copy_data.cell_matrix = 0; copy_data.cell_rhs = 0; @@ -462,14 +462,14 @@ namespace Step47 // `copy_data.face_data()` is really all that the later `copier` function // gets to see when it copies the contributions of each cell to the global // matrix and right hand side objects. - auto face_worker = [&](const Iterator & cell, + auto face_worker = [&](const Iterator &cell, const unsigned int &f, const unsigned int &sf, - const Iterator & ncell, + const Iterator &ncell, const unsigned int &nf, const unsigned int &nsf, - ScratchData & scratch_data, - CopyData & copy_data) { + ScratchData &scratch_data, + CopyData ©_data) { FEInterfaceValues &fe_interface_values = scratch_data.fe_interface_values; fe_interface_values.reinit(cell, f, sf, ncell, nf, nsf); @@ -586,10 +586,10 @@ namespace Step47 // // As before, the first part of the function simply sets up some // helper objects: - auto boundary_worker = [&](const Iterator & cell, + auto boundary_worker = [&](const Iterator &cell, const unsigned int &face_no, - ScratchData & scratch_data, - CopyData & copy_data) { + ScratchData &scratch_data, + CopyData ©_data) { FEInterfaceValues &fe_interface_values = scratch_data.fe_interface_values; fe_interface_values.reinit(cell, face_no); diff --git a/examples/step-48/step-48.cc b/examples/step-48/step-48.cc index 14d0f3340e..9d27a84018 100644 --- a/examples/step-48/step-48.cc +++ b/examples/step-48/step-48.cc @@ -90,13 +90,13 @@ namespace Step48 &src) const; private: - const MatrixFree & data; + const MatrixFree &data; const VectorizedArray delta_t_sqr; LinearAlgebra::distributed::Vector inv_mass_matrix; void local_apply( - const MatrixFree & data, - LinearAlgebra::distributed::Vector & dst, + const MatrixFree &data, + LinearAlgebra::distributed::Vector &dst, const std::vector *> &src, const std::pair &cell_range) const; }; @@ -185,8 +185,8 @@ namespace Step48 // dst. template void SineGordonOperation::local_apply( - const MatrixFree & data, - LinearAlgebra::distributed::Vector & dst, + const MatrixFree &data, + LinearAlgebra::distributed::Vector &dst, const std::vector *> &src, const std::pair &cell_range) const { @@ -241,7 +241,7 @@ namespace Step48 // inverse mass matrix. template void SineGordonOperation::apply( - LinearAlgebra::distributed::Vector & dst, + LinearAlgebra::distributed::Vector &dst, const std::vector *> &src) const { data.cell_loop( diff --git a/examples/step-49/step-49.cc b/examples/step-49/step-49.cc index d032b70cdb..24a1f2a2ea 100644 --- a/examples/step-49/step-49.cc +++ b/examples/step-49/step-49.cc @@ -59,7 +59,7 @@ using namespace dealii; // visualized in Paraview or VisIt. template void print_mesh_info(const Triangulation &triangulation, - const std::string & filename) + const std::string &filename) { std::cout << "Mesh info:" << std::endl << " dimension: " << dim << std::endl diff --git a/examples/step-50/step-50.cc b/examples/step-50/step-50.cc index 7d03b5b027..3a011521ee 100644 --- a/examples/step-50/step-50.cc +++ b/examples/step-50/step-50.cc @@ -101,7 +101,7 @@ using namespace dealii; namespace ChangeVectorTypes { template - void copy(LA::MPI::Vector & out, + void copy(LA::MPI::Vector &out, const LinearAlgebra::distributed::Vector &in) { LinearAlgebra::ReadWriteVector rwv(out.locally_owned_elements()); @@ -119,7 +119,7 @@ namespace ChangeVectorTypes template void copy(LinearAlgebra::distributed::Vector &out, - const LA::MPI::Vector & in) + const LA::MPI::Vector &in) { LinearAlgebra::ReadWriteVector rwv; #ifdef USE_PETSC_LA @@ -1210,7 +1210,7 @@ void LaplaceProblem::solve() template struct ScratchData { - ScratchData(const Mapping & mapping, + ScratchData(const Mapping &mapping, const FiniteElement &fe, const unsigned int quadrature_degree, const UpdateFlags update_flags, @@ -1277,9 +1277,9 @@ void LaplaceProblem::estimate() using Iterator = typename DoFHandler::active_cell_iterator; // Assembler for cell residual $h^2 \| f + \epsilon \triangle u \|_K^2$ - auto cell_worker = [&](const Iterator & cell, + auto cell_worker = [&](const Iterator &cell, ScratchData &scratch_data, - CopyData & copy_data) { + CopyData ©_data) { FEValues &fe_values = scratch_data.fe_values; fe_values.reinit(cell); @@ -1306,14 +1306,14 @@ void LaplaceProblem::estimate() // Assembler for face term $\sum_F h_F \| \jump{\epsilon \nabla u \cdot n} // \|_F^2$ - auto face_worker = [&](const Iterator & cell, + auto face_worker = [&](const Iterator &cell, const unsigned int &f, const unsigned int &sf, - const Iterator & ncell, + const Iterator &ncell, const unsigned int &nf, const unsigned int &nsf, - ScratchData & scratch_data, - CopyData & copy_data) { + ScratchData &scratch_data, + CopyData ©_data) { FEInterfaceValues &fe_interface_values = scratch_data.fe_interface_values; fe_interface_values.reinit(cell, f, sf, ncell, nf, nsf); diff --git a/examples/step-51/step-51.cc b/examples/step-51/step-51.cc index ad1b7be6bb..222f73eb82 100644 --- a/examples/step-51/step-51.cc +++ b/examples/step-51/step-51.cc @@ -177,7 +177,7 @@ namespace Step51 {} virtual void vector_value(const Point &p, - Vector & v) const override + Vector &v) const override { AssertDimension(v.size(), dim + 1); Solution solution; @@ -307,15 +307,15 @@ namespace Step51 // work of the program. void assemble_system_one_cell( const typename DoFHandler::active_cell_iterator &cell, - ScratchData & scratch, - PerTaskData & task_data); + ScratchData &scratch, + PerTaskData &task_data); void copy_local_to_global(const PerTaskData &data); void postprocess_one_cell( const typename DoFHandler::active_cell_iterator &cell, - PostProcessScratchData & scratch, - unsigned int & empty_data); + PostProcessScratchData &scratch, + unsigned int &empty_data); Triangulation triangulation; @@ -518,8 +518,8 @@ namespace Step51 ScratchData(const FiniteElement &fe, const FiniteElement &fe_local, - const QGauss & quadrature_formula, - const QGauss & face_quadrature_formula, + const QGauss &quadrature_formula, + const QGauss &face_quadrature_formula, const UpdateFlags local_flags, const UpdateFlags local_face_flags, const UpdateFlags flags) @@ -608,7 +608,7 @@ namespace Step51 PostProcessScratchData(const FiniteElement &fe, const FiniteElement &fe_local, - const QGauss & quadrature_formula, + const QGauss &quadrature_formula, const UpdateFlags local_flags, const UpdateFlags flags) : fe_values_local(fe_local, quadrature_formula, local_flags) @@ -694,8 +694,8 @@ namespace Step51 template void HDG::assemble_system_one_cell( const typename DoFHandler::active_cell_iterator &cell, - ScratchData & scratch, - PerTaskData & task_data) + ScratchData &scratch, + PerTaskData &task_data) { // Construct iterator for dof_handler_local for FEValues reinit function. const typename DoFHandler::active_cell_iterator loc_cell = @@ -1034,8 +1034,8 @@ namespace Step51 dof_handler_u_post.begin_active(), dof_handler_u_post.end(), [this](const typename DoFHandler::active_cell_iterator &cell, - PostProcessScratchData & scratch, - unsigned int & data) { + PostProcessScratchData &scratch, + unsigned int &data) { this->postprocess_one_cell(cell, scratch, data); }, std::function(), @@ -1123,7 +1123,7 @@ namespace Step51 template void HDG::postprocess_one_cell( const typename DoFHandler::active_cell_iterator &cell, - PostProcessScratchData & scratch, + PostProcessScratchData &scratch, unsigned int &) { const typename DoFHandler::active_cell_iterator loc_cell = diff --git a/examples/step-54/step-54.cc b/examples/step-54/step-54.cc index 6398183c7e..1de92fd72e 100644 --- a/examples/step-54/step-54.cc +++ b/examples/step-54/step-54.cc @@ -75,9 +75,9 @@ namespace Step54 TriangulationOnCAD( - const std::string & initial_mesh_filename, - const std::string & cad_file_name, - const std::string & output_filename, + const std::string &initial_mesh_filename, + const std::string &cad_file_name, + const std::string &output_filename, const ProjectionType surface_projection_kind = NormalProjection); void run(); @@ -108,9 +108,9 @@ namespace Step54 // below for details). TriangulationOnCAD::TriangulationOnCAD( - const std::string & initial_mesh_filename, - const std::string & cad_file_name, - const std::string & output_filename, + const std::string &initial_mesh_filename, + const std::string &cad_file_name, + const std::string &output_filename, const ProjectionType surface_projection_kind) : initial_mesh_filename(initial_mesh_filename) , cad_file_name(cad_file_name) diff --git a/examples/step-55/step-55.cc b/examples/step-55/step-55.cc index eee56e9ac8..c7dbba79ae 100644 --- a/examples/step-55/step-55.cc +++ b/examples/step-55/step-55.cc @@ -106,13 +106,13 @@ namespace Step55 private: const SmartPointer matrix; - const Preconditioner & preconditioner; + const Preconditioner &preconditioner; }; template InverseMatrix::InverseMatrix( - const Matrix & m, + const Matrix &m, const Preconditioner &preconditioner) : matrix(&m) , preconditioner(preconditioner) @@ -123,7 +123,7 @@ namespace Step55 template template void - InverseMatrix::vmult(VectorType & dst, + InverseMatrix::vmult(VectorType &dst, const VectorType &src) const { SolverControl solver_control(src.size(), 1e-8 * src.l2_norm()); @@ -150,7 +150,7 @@ namespace Step55 BlockDiagonalPreconditioner(const PreconditionerA &preconditioner_A, const PreconditionerS &preconditioner_S); - void vmult(LA::MPI::BlockVector & dst, + void vmult(LA::MPI::BlockVector &dst, const LA::MPI::BlockVector &src) const; private: @@ -169,7 +169,7 @@ namespace Step55 template void BlockDiagonalPreconditioner::vmult( - LA::MPI::BlockVector & dst, + LA::MPI::BlockVector &dst, const LA::MPI::BlockVector &src) const { preconditioner_A.vmult(dst.block(0), src.block(0)); @@ -192,13 +192,13 @@ namespace Step55 {} virtual void vector_value(const Point &p, - Vector & value) const override; + Vector &value) const override; }; template void RightHandSide::vector_value(const Point &p, - Vector & values) const + Vector &values) const { const double R_x = p[0]; const double R_y = p[1]; @@ -235,12 +235,12 @@ namespace Step55 {} virtual void vector_value(const Point &p, - Vector & values) const override; + Vector &values) const override; }; template void ExactSolution::vector_value(const Point &p, - Vector & values) const + Vector &values) const { const double R_x = p[0]; const double R_y = p[1]; diff --git a/examples/step-56/step-56.cc b/examples/step-56/step-56.cc index c4cb510a85..ff32e82078 100644 --- a/examples/step-56/step-56.cc +++ b/examples/step-56/step-56.cc @@ -102,15 +102,15 @@ namespace Step56 Solution() : Function(dim + 1) {} - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; virtual Tensor<1, dim> - gradient(const Point & p, + gradient(const Point &p, const unsigned int component = 0) const override; }; template <> - double Solution<2>::value(const Point<2> & p, + double Solution<2>::value(const Point<2> &p, const unsigned int component) const { Assert(component <= 2 + 1, ExcIndexRange(component, 0, 2 + 1)); @@ -130,7 +130,7 @@ namespace Step56 } template <> - double Solution<3>::value(const Point<3> & p, + double Solution<3>::value(const Point<3> &p, const unsigned int component) const { Assert(component <= 3 + 1, ExcIndexRange(component, 0, 3 + 1)); @@ -154,7 +154,7 @@ namespace Step56 // Note that for the gradient we need to return a Tensor<1,dim> template <> - Tensor<1, 2> Solution<2>::gradient(const Point<2> & p, + Tensor<1, 2> Solution<2>::gradient(const Point<2> &p, const unsigned int component) const { Assert(component <= 2, ExcIndexRange(component, 0, 2 + 1)); @@ -184,7 +184,7 @@ namespace Step56 } template <> - Tensor<1, 3> Solution<3>::gradient(const Point<3> & p, + Tensor<1, 3> Solution<3>::gradient(const Point<3> &p, const unsigned int component) const { Assert(component <= 3, ExcIndexRange(component, 0, 3 + 1)); @@ -232,12 +232,12 @@ namespace Step56 : Function(dim + 1) {} - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; }; template <> - double RightHandSide<2>::value(const Point<2> & p, + double RightHandSide<2>::value(const Point<2> &p, const unsigned int component) const { Assert(component <= 2, ExcIndexRange(component, 0, 2 + 1)); @@ -256,7 +256,7 @@ namespace Step56 } template <> - double RightHandSide<3>::value(const Point<3> & p, + double RightHandSide<3>::value(const Point<3> &p, const unsigned int component) const { Assert(component <= 3, ExcIndexRange(component, 0, 3 + 1)); @@ -309,9 +309,9 @@ namespace Step56 public: BlockSchurPreconditioner( const BlockSparseMatrix &system_matrix, - const SparseMatrix & schur_complement_matrix, - const PreconditionerAType & preconditioner_A, - const PreconditionerSType & preconditioner_S, + const SparseMatrix &schur_complement_matrix, + const PreconditionerAType &preconditioner_A, + const PreconditionerSType &preconditioner_S, const bool do_solve_A); void vmult(BlockVector &dst, const BlockVector &src) const; @@ -321,9 +321,9 @@ namespace Step56 private: const BlockSparseMatrix &system_matrix; - const SparseMatrix & schur_complement_matrix; - const PreconditionerAType & preconditioner_A; - const PreconditionerSType & preconditioner_S; + const SparseMatrix &schur_complement_matrix; + const PreconditionerAType &preconditioner_A; + const PreconditionerSType &preconditioner_S; const bool do_solve_A; }; @@ -332,9 +332,9 @@ namespace Step56 BlockSchurPreconditioner:: BlockSchurPreconditioner( const BlockSparseMatrix &system_matrix, - const SparseMatrix & schur_complement_matrix, - const PreconditionerAType & preconditioner_A, - const PreconditionerSType & preconditioner_S, + const SparseMatrix &schur_complement_matrix, + const PreconditionerAType &preconditioner_A, + const PreconditionerSType &preconditioner_S, const bool do_solve_A) : n_iterations_A(0) , n_iterations_S(0) @@ -350,7 +350,7 @@ namespace Step56 template void BlockSchurPreconditioner::vmult( - BlockVector & dst, + BlockVector &dst, const BlockVector &src) const { Vector utmp(src.block(0)); diff --git a/examples/step-57/step-57.cc b/examples/step-57/step-57.cc index 395c6d05d2..e154a178a5 100644 --- a/examples/step-57/step-57.cc +++ b/examples/step-57/step-57.cc @@ -153,12 +153,12 @@ namespace Step57 BoundaryValues() : Function(dim + 1) {} - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component) const override; }; template - double BoundaryValues::value(const Point & p, + double BoundaryValues::value(const Point &p, const unsigned int component) const { Assert(component < this->n_components, @@ -190,8 +190,8 @@ namespace Step57 BlockSchurPreconditioner(double gamma, double viscosity, const BlockSparseMatrix &S, - const SparseMatrix & P, - const PreconditionerMp & Mppreconditioner); + const SparseMatrix &P, + const PreconditionerMp &Mppreconditioner); void vmult(BlockVector &dst, const BlockVector &src) const; @@ -199,8 +199,8 @@ namespace Step57 const double gamma; const double viscosity; const BlockSparseMatrix &stokes_matrix; - const SparseMatrix & pressure_mass_matrix; - const PreconditionerMp & mp_preconditioner; + const SparseMatrix &pressure_mass_matrix; + const PreconditionerMp &mp_preconditioner; SparseDirectUMFPACK A_inverse; }; @@ -214,8 +214,8 @@ namespace Step57 double gamma, double viscosity, const BlockSparseMatrix &S, - const SparseMatrix & P, - const PreconditionerMp & Mppreconditioner) + const SparseMatrix &P, + const PreconditionerMp &Mppreconditioner) : gamma(gamma) , viscosity(viscosity) , stokes_matrix(S) @@ -227,7 +227,7 @@ namespace Step57 template void BlockSchurPreconditioner::vmult( - BlockVector & dst, + BlockVector &dst, const BlockVector &src) const { Vector utmp(src.block(0)); diff --git a/examples/step-58/step-58.cc b/examples/step-58/step-58.cc index 4e3f2c815c..a1dab4c79d 100644 --- a/examples/step-58/step-58.cc +++ b/examples/step-58/step-58.cc @@ -127,7 +127,7 @@ namespace Step58 template std::complex - InitialValues::value(const Point & p, + InitialValues::value(const Point &p, const unsigned int component) const { static_assert(dim == 2, "This initial condition only works in 2d."); @@ -163,14 +163,14 @@ namespace Step58 { public: Potential() = default; - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; }; template - double Potential::value(const Point & p, + double Potential::value(const Point &p, const unsigned int component) const { (void)component; @@ -475,7 +475,7 @@ namespace Step58 template void ComplexAmplitude::evaluate_vector_field( const DataPostprocessorInputs::Vector &inputs, - std::vector> & computed_quantities) const + std::vector> &computed_quantities) const { AssertDimension(computed_quantities.size(), inputs.solution_values.size()); @@ -531,7 +531,7 @@ namespace Step58 template void ComplexPhase::evaluate_vector_field( const DataPostprocessorInputs::Vector &inputs, - std::vector> & computed_quantities) const + std::vector> &computed_quantities) const { AssertDimension(computed_quantities.size(), inputs.solution_values.size()); diff --git a/examples/step-59/step-59.cc b/examples/step-59/step-59.cc index 4f2b5269a4..32a4d8f971 100644 --- a/examples/step-59/step-59.cc +++ b/examples/step-59/step-59.cc @@ -181,10 +181,10 @@ namespace Step59 std::shared_ptr> get_matrix_free() const; - void vmult(LinearAlgebra::distributed::Vector & dst, + void vmult(LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src) const; - void Tvmult(LinearAlgebra::distributed::Vector & dst, + void Tvmult(LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src) const; number get_penalty_factor() const @@ -194,22 +194,22 @@ namespace Step59 private: void - apply_cell(const MatrixFree & data, - LinearAlgebra::distributed::Vector & dst, + apply_cell(const MatrixFree &data, + LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src, const std::pair &cell_range) const; void - apply_face(const MatrixFree & data, - LinearAlgebra::distributed::Vector & dst, + apply_face(const MatrixFree &data, + LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src, const std::pair &face_range) const; void apply_boundary( - const MatrixFree & data, - LinearAlgebra::distributed::Vector & dst, + const MatrixFree &data, + LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src, - const std::pair & face_range) const; + const std::pair &face_range) const; std::shared_ptr> data; }; @@ -235,10 +235,10 @@ namespace Step59 void initialize(const LaplaceOperator &op); - void vmult(LinearAlgebra::distributed::Vector & dst, + void vmult(LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src) const; - void Tvmult(LinearAlgebra::distributed::Vector & dst, + void Tvmult(LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src) const { vmult(dst, src); @@ -275,7 +275,7 @@ namespace Step59 template void adjust_ghost_range_if_necessary( - const MatrixFree & data, + const MatrixFree &data, const LinearAlgebra::distributed::Vector &vec) { if (vec.get_partitioner().get() == @@ -429,7 +429,7 @@ namespace Step59 template void LaplaceOperator::vmult( - LinearAlgebra::distributed::Vector & dst, + LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src) const { adjust_ghost_range_if_necessary(*data, dst); @@ -452,7 +452,7 @@ namespace Step59 template void LaplaceOperator::Tvmult( - LinearAlgebra::distributed::Vector & dst, + LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src) const { vmult(dst, src); @@ -474,10 +474,10 @@ namespace Step59 template void LaplaceOperator::apply_cell( - const MatrixFree & data, - LinearAlgebra::distributed::Vector & dst, + const MatrixFree &data, + LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src, - const std::pair & cell_range) const + const std::pair &cell_range) const { FEEvaluation phi(data); for (unsigned int cell = cell_range.first; cell < cell_range.second; ++cell) @@ -526,10 +526,10 @@ namespace Step59 template void LaplaceOperator::apply_face( - const MatrixFree & data, - LinearAlgebra::distributed::Vector & dst, + const MatrixFree &data, + LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src, - const std::pair & face_range) const + const std::pair &face_range) const { FEFaceEvaluation phi_inner(data, true); @@ -666,10 +666,10 @@ namespace Step59 template void LaplaceOperator::apply_boundary( - const MatrixFree & data, - LinearAlgebra::distributed::Vector & dst, + const MatrixFree &data, + LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src, - const std::pair & face_range) const + const std::pair &face_range) const { FEFaceEvaluation phi_inner(data, true); @@ -877,7 +877,7 @@ namespace Step59 template void PreconditionBlockJacobi::vmult( - LinearAlgebra::distributed::Vector & dst, + LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src) const { adjust_ghost_range_if_necessary(*data, dst); diff --git a/examples/step-61/step-61.cc b/examples/step-61/step-61.cc index e7c73a730d..98c8a7d1a5 100644 --- a/examples/step-61/step-61.cc +++ b/examples/step-61/step-61.cc @@ -139,7 +139,7 @@ namespace Step61 template void Coefficient::value_list(const std::vector> &points, - std::vector> & values) const + std::vector> &values) const { AssertDimension(points.size(), values.size()); for (unsigned int p = 0; p < points.size(); ++p) @@ -156,7 +156,7 @@ namespace Step61 : Function(2) {} - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; }; @@ -175,7 +175,7 @@ namespace Step61 class RightHandSide : public Function { public: - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; }; @@ -210,7 +210,7 @@ namespace Step61 : Function(2) {} - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component) const override; }; diff --git a/examples/step-62/step-62.cc b/examples/step-62/step-62.cc index 1fd621113b..4a685e8c5c 100644 --- a/examples/step-62/step-62.cc +++ b/examples/step-62/step-62.cc @@ -86,7 +86,7 @@ namespace step62 public: RightHandSide(HDF5::Group &data); - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component) const override; private: @@ -154,7 +154,7 @@ namespace step62 public: Rho(HDF5::Group &data); - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; private: @@ -394,7 +394,7 @@ namespace step62 // that the pulse has been cropped to $x_\textrm{min} - double RightHandSide::value(const Point & p, + double RightHandSide::value(const Point &p, const unsigned int component) const { if (component == force_component) @@ -450,7 +450,7 @@ namespace step62 // The PML coefficient for the `x` component takes the form // $s'_x = a_x x^{\textrm{degree}}$ template - std::complex PML::value(const Point & p, + std::complex PML::value(const Point &p, const unsigned int component) const { double calculated_pml_x_coeff = 0; diff --git a/examples/step-63/step-63.cc b/examples/step-63/step-63.cc index 5d4eda65c7..16bbfb689f 100644 --- a/examples/step-63/step-63.cc +++ b/examples/step-63/step-63.cc @@ -361,11 +361,11 @@ namespace Step63 class RightHandSide : public Function { public: - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; virtual void value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component = 0) const override; }; @@ -385,7 +385,7 @@ namespace Step63 template void RightHandSide::value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component) const { AssertDimension(values.size(), points.size()); @@ -402,18 +402,18 @@ namespace Step63 class BoundaryValues : public Function { public: - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; virtual void value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component = 0) const override; }; template - double BoundaryValues::value(const Point & p, + double BoundaryValues::value(const Point &p, const unsigned int component) const { Assert(component == 0, ExcIndexRange(component, 0, 1)); @@ -435,7 +435,7 @@ namespace Step63 template void BoundaryValues::value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component) const { AssertDimension(values.size(), points.size()); @@ -491,8 +491,8 @@ namespace Step63 template void assemble_cell(const IteratorType &cell, - ScratchData & scratch_data, - CopyData & copy_data); + ScratchData &scratch_data, + CopyData ©_data); void assemble_system_and_multigrid(); void setup_smoother(); @@ -690,8 +690,8 @@ namespace Step63 template template void AdvectionProblem::assemble_cell(const IteratorType &cell, - ScratchData & scratch_data, - CopyData & copy_data) + ScratchData &scratch_data, + CopyData ©_data) { copy_data.level = cell->level(); @@ -784,8 +784,8 @@ namespace Step63 { const auto cell_worker_active = [&](const decltype(dof_handler.begin_active()) &cell, - ScratchData & scratch_data, - CopyData & copy_data) { + ScratchData &scratch_data, + CopyData ©_data) { this->assemble_cell(cell, scratch_data, copy_data); }; @@ -826,8 +826,8 @@ namespace Step63 const auto cell_worker_mg = [&](const decltype(dof_handler.begin_mg()) &cell, - ScratchData & scratch_data, - CopyData & copy_data) { + ScratchData &scratch_data, + CopyData ©_data) { this->assemble_cell(cell, scratch_data, copy_data); }; diff --git a/examples/step-64/step-64.cc b/examples/step-64/step-64.cc index ae596a979f..104f34046b 100644 --- a/examples/step-64/step-64.cc +++ b/examples/step-64/step-64.cc @@ -129,7 +129,7 @@ namespace Step64 public: DEAL_II_HOST_DEVICE HelmholtzOperatorQuad( const typename CUDAWrappers::MatrixFree::Data *gpu_data, - double * coef, + double *coef, int cell) : gpu_data(gpu_data) , coef(coef) @@ -138,7 +138,7 @@ namespace Step64 DEAL_II_HOST_DEVICE void operator()( CUDAWrappers::FEEvaluation - * fe_eval, + *fe_eval, const int q_point) const; static const unsigned int n_q_points = @@ -146,7 +146,7 @@ namespace Step64 private: const typename CUDAWrappers::MatrixFree::Data *gpu_data; - double * coef; + double *coef; int cell; }; @@ -161,7 +161,7 @@ namespace Step64 template DEAL_II_HOST_DEVICE void HelmholtzOperatorQuad::operator()( CUDAWrappers::FEEvaluation - * fe_eval, + *fe_eval, const int q_point) const { const unsigned int pos = @@ -197,9 +197,9 @@ namespace Step64 DEAL_II_HOST_DEVICE void operator()( const unsigned int cell, const typename CUDAWrappers::MatrixFree::Data *gpu_data, - CUDAWrappers::SharedData * shared_data, - const double * src, - double * dst) const; + CUDAWrappers::SharedData *shared_data, + const double *src, + double *dst) const; private: double *coef; @@ -215,9 +215,9 @@ namespace Step64 DEAL_II_HOST_DEVICE void LocalHelmholtzOperator::operator()( const unsigned int cell, const typename CUDAWrappers::MatrixFree::Data *gpu_data, - CUDAWrappers::SharedData * shared_data, - const double * src, - double * dst) const + CUDAWrappers::SharedData *shared_data, + const double *src, + double *dst) const { CUDAWrappers::FEEvaluation fe_eval(gpu_data, shared_data); @@ -242,7 +242,7 @@ namespace Step64 class HelmholtzOperator { public: - HelmholtzOperator(const DoFHandler & dof_handler, + HelmholtzOperator(const DoFHandler &dof_handler, const AffineConstraints &constraints); void @@ -276,7 +276,7 @@ namespace Step64 // parallel:distributed::Triangulation object in fact. template HelmholtzOperator::HelmholtzOperator( - const DoFHandler & dof_handler, + const DoFHandler &dof_handler, const AffineConstraints &constraints) { MappingQ mapping(fe_degree); @@ -310,7 +310,7 @@ namespace Step64 // destination vector afterwards. template void HelmholtzOperator::vmult( - LinearAlgebra::distributed::Vector & dst, + LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src) const { diff --git a/examples/step-66/step-66.cc b/examples/step-66/step-66.cc index 16e6513e4e..fca5ca204e 100644 --- a/examples/step-66/step-66.cc +++ b/examples/step-66/step-66.cc @@ -134,12 +134,12 @@ namespace Step66 private: virtual void apply_add( - LinearAlgebra::distributed::Vector & dst, + LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src) const override; void - local_apply(const MatrixFree & data, - LinearAlgebra::distributed::Vector & dst, + local_apply(const MatrixFree &data, + LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src, const std::pair &cell_range) const; @@ -230,10 +230,10 @@ namespace Step66 // the global vector dst. template void JacobianOperator::local_apply( - const MatrixFree & data, - LinearAlgebra::distributed::Vector & dst, + const MatrixFree &data, + LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src, - const std::pair & cell_range) const + const std::pair &cell_range) const { FECellIntegrator phi(data); @@ -268,7 +268,7 @@ namespace Step66 // cells computing the cell contribution to the matrix-vector product. template void JacobianOperator::apply_add( - LinearAlgebra::distributed::Vector & dst, + LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src) const { this->data->cell_loop(&JacobianOperator::local_apply, this, dst, src); @@ -375,14 +375,14 @@ namespace Step66 void setup_system(); void evaluate_residual( - LinearAlgebra::distributed::Vector & dst, + LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src) const; void local_evaluate_residual( - const MatrixFree & data, - LinearAlgebra::distributed::Vector & dst, + const MatrixFree &data, + LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src, - const std::pair & cell_range) const; + const std::pair &cell_range) const; void assemble_rhs(); @@ -649,7 +649,7 @@ namespace Step66 // MatrixFree::cell_loop(). template void GelfandProblem::evaluate_residual( - LinearAlgebra::distributed::Vector & dst, + LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src) const { auto matrix_free = system_matrix.get_matrix_free(); @@ -673,10 +673,10 @@ namespace Step66 // the input vector might have constrained DOFs. template void GelfandProblem::local_evaluate_residual( - const MatrixFree & data, - LinearAlgebra::distributed::Vector & dst, + const MatrixFree &data, + LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src, - const std::pair & cell_range) const + const std::pair &cell_range) const { FEEvaluation phi(data); diff --git a/examples/step-67/step-67.cc b/examples/step-67/step-67.cc index f2108ae9f4..a85d7ddc11 100644 --- a/examples/step-67/step-67.cc +++ b/examples/step-67/step-67.cc @@ -129,7 +129,7 @@ namespace Euler_DG : Function(dim + 2, time) {} - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; }; @@ -155,7 +155,7 @@ namespace Euler_DG // velocity field, computed from the relation $E = \frac{c^2}{\gamma (\gamma // -1)} + \frac 12 \rho \|u\|^2$. template - double ExactSolution::value(const Point & x, + double ExactSolution::value(const Point &x, const unsigned int component) const { const double t = this->get_time(); @@ -336,9 +336,9 @@ namespace Euler_DG void perform_time_step(const Operator &pde_operator, const double current_time, const double time_step, - VectorType & solution, - VectorType & vec_ri, - VectorType & vec_ki) const + VectorType &solution, + VectorType &vec_ri, + VectorType &vec_ki) const { AssertDimension(ai.size() + 1, bi.size()); @@ -489,7 +489,7 @@ namespace Euler_DG inline DEAL_II_ALWAYS_INLINE // Tensor<1, n_components, Number> operator*(const Tensor<1, n_components, Tensor<1, dim, Number>> &matrix, - const Tensor<1, dim, Number> & vector) + const Tensor<1, dim, Number> &vector) { Tensor<1, n_components, Number> result; for (unsigned int d = 0; d < n_components; ++d) @@ -571,7 +571,7 @@ namespace Euler_DG Tensor<1, dim + 2, Number> euler_numerical_flux(const Tensor<1, dim + 2, Number> &u_m, const Tensor<1, dim + 2, Number> &u_p, - const Tensor<1, dim, Number> & normal) + const Tensor<1, dim, Number> &normal) { const auto velocity_m = euler_velocity(u_m); const auto velocity_p = euler_velocity(u_p); @@ -633,7 +633,7 @@ namespace Euler_DG // where all components of the solution are set. template VectorizedArray - evaluate_function(const Function & function, + evaluate_function(const Function &function, const Point> &p_vectorized, const unsigned int component) { @@ -651,7 +651,7 @@ namespace Euler_DG template Tensor<1, n_components, VectorizedArray> - evaluate_function(const Function & function, + evaluate_function(const Function &function, const Point> &p_vectorized) { AssertDimension(function.n_components, n_components); @@ -700,7 +700,7 @@ namespace Euler_DG EulerOperator(TimerOutput &timer_output); - void reinit(const Mapping & mapping, + void reinit(const Mapping &mapping, const DoFHandler &dof_handler); void set_inflow_boundary(const types::boundary_id boundary_id, @@ -716,22 +716,22 @@ namespace Euler_DG void apply(const double current_time, const LinearAlgebra::distributed::Vector &src, - LinearAlgebra::distributed::Vector & dst) const; + LinearAlgebra::distributed::Vector &dst) const; void perform_stage(const Number cur_time, const Number factor_solution, const Number factor_ai, const LinearAlgebra::distributed::Vector ¤t_ri, - LinearAlgebra::distributed::Vector & vec_ki, - LinearAlgebra::distributed::Vector & solution, + LinearAlgebra::distributed::Vector &vec_ki, + LinearAlgebra::distributed::Vector &solution, LinearAlgebra::distributed::Vector &next_ri) const; - void project(const Function & function, + void project(const Function &function, LinearAlgebra::distributed::Vector &solution) const; std::array compute_errors( - const Function & function, + const Function &function, const LinearAlgebra::distributed::Vector &solution) const; double compute_cell_transport_speed( @@ -753,28 +753,28 @@ namespace Euler_DG std::unique_ptr> body_force; void local_apply_inverse_mass_matrix( - const MatrixFree & data, - LinearAlgebra::distributed::Vector & dst, + const MatrixFree &data, + LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src, - const std::pair & cell_range) const; + const std::pair &cell_range) const; void local_apply_cell( - const MatrixFree & data, - LinearAlgebra::distributed::Vector & dst, + const MatrixFree &data, + LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src, - const std::pair & cell_range) const; + const std::pair &cell_range) const; void local_apply_face( - const MatrixFree & data, - LinearAlgebra::distributed::Vector & dst, + const MatrixFree &data, + LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src, - const std::pair & face_range) const; + const std::pair &face_range) const; void local_apply_boundary_face( - const MatrixFree & data, - LinearAlgebra::distributed::Vector & dst, + const MatrixFree &data, + LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src, - const std::pair & face_range) const; + const std::pair &face_range) const; }; @@ -806,7 +806,7 @@ namespace Euler_DG // necessary to ensure optimal computational efficiency overall. template void EulerOperator::reinit( - const Mapping & mapping, + const Mapping &mapping, const DoFHandler &dof_handler) { const std::vector *> dof_handlers = {&dof_handler}; @@ -1012,9 +1012,9 @@ namespace Euler_DG template void EulerOperator::local_apply_cell( const MatrixFree &, - LinearAlgebra::distributed::Vector & dst, + LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src, - const std::pair & cell_range) const + const std::pair &cell_range) const { FEEvaluation phi(data); @@ -1103,9 +1103,9 @@ namespace Euler_DG template void EulerOperator::local_apply_face( const MatrixFree &, - LinearAlgebra::distributed::Vector & dst, + LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src, - const std::pair & face_range) const + const std::pair &face_range) const { FEFaceEvaluation phi_m(data, true); @@ -1191,9 +1191,9 @@ namespace Euler_DG template void EulerOperator::local_apply_boundary_face( const MatrixFree &, - LinearAlgebra::distributed::Vector & dst, + LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src, - const std::pair & face_range) const + const std::pair &face_range) const { FEFaceEvaluation phi(data, true); @@ -1293,9 +1293,9 @@ namespace Euler_DG template void EulerOperator::local_apply_inverse_mass_matrix( const MatrixFree &, - LinearAlgebra::distributed::Vector & dst, + LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src, - const std::pair & cell_range) const + const std::pair &cell_range) const { FEEvaluation phi(data, 0, 1); MatrixFreeOperators::CellwiseInverseMassMatrix @@ -1352,7 +1352,7 @@ namespace Euler_DG void EulerOperator::apply( const double current_time, const LinearAlgebra::distributed::Vector &src, - LinearAlgebra::distributed::Vector & dst) const + LinearAlgebra::distributed::Vector &dst) const { { TimerOutput::Scope t(timer, "apply - integrals"); @@ -1430,9 +1430,9 @@ namespace Euler_DG const Number factor_solution, const Number factor_ai, const LinearAlgebra::distributed::Vector ¤t_ri, - LinearAlgebra::distributed::Vector & vec_ki, - LinearAlgebra::distributed::Vector & solution, - LinearAlgebra::distributed::Vector & next_ri) const + LinearAlgebra::distributed::Vector &vec_ki, + LinearAlgebra::distributed::Vector &solution, + LinearAlgebra::distributed::Vector &next_ri) const { { TimerOutput::Scope t(timer, "rk_stage - integrals L_h"); @@ -1536,7 +1536,7 @@ namespace Euler_DG // cell for discontinuous Galerkin discretizations. template void EulerOperator::project( - const Function & function, + const Function &function, LinearAlgebra::distributed::Vector &solution) const { FEEvaluation phi(data, 0, 1); @@ -1584,7 +1584,7 @@ namespace Euler_DG // has a remainder compared to the SIMD width. template std::array EulerOperator::compute_errors( - const Function & function, + const Function &function, const LinearAlgebra::distributed::Vector &solution) const { TimerOutput::Scope t(timer, "compute errors"); @@ -1830,7 +1830,7 @@ namespace Euler_DG template void EulerProblem::Postprocessor::evaluate_vector_field( const DataPostprocessorInputs::Vector &inputs, - std::vector> & computed_quantities) const + std::vector> &computed_quantities) const { const unsigned int n_evaluation_points = inputs.solution_values.size(); diff --git a/examples/step-68/step-68.cc b/examples/step-68/step-68.cc index 58d49c5bd7..a91c59e197 100644 --- a/examples/step-68/step-68.cc +++ b/examples/step-68/step-68.cc @@ -181,7 +181,7 @@ namespace Step68 virtual void vector_value(const Point &point, - Vector & values) const override; + Vector &values) const override; }; @@ -190,7 +190,7 @@ namespace Step68 // simulation (t) must be gathered from the Function object. template void Vortex::vector_value(const Point &point, - Vector & values) const + Vector &values) const { const double T = 4; const double t = this->get_time(); @@ -253,7 +253,7 @@ namespace Step68 // `private`. unsigned int cell_weight( const typename parallel::distributed::Triangulation::cell_iterator - & cell, + &cell, const CellStatus status) const; // The following two functions are responsible for outputting the simulation @@ -328,7 +328,7 @@ namespace Step68 template unsigned int ParticleTracking::cell_weight( const typename parallel::distributed::Triangulation::cell_iterator - & cell, + &cell, const CellStatus status) const { // First, we introduce a base weight that will be assigned to every cell. diff --git a/examples/step-69/step-69.cc b/examples/step-69/step-69.cc index 8d282059a5..a9a927b5eb 100644 --- a/examples/step-69/step-69.cc +++ b/examples/step-69/step-69.cc @@ -149,7 +149,7 @@ namespace Step69 { public: Discretization(const MPI_Comm mpi_communicator, - TimerOutput & computing_timer, + TimerOutput &computing_timer, const std::string &subsection = "Discretization"); void setup(); @@ -214,9 +214,9 @@ namespace Step69 std::tuple, types::boundary_id, Point>>; OfflineData(const MPI_Comm mpi_communicator, - TimerOutput & computing_timer, + TimerOutput &computing_timer, const Discretization &discretization, - const std::string & subsection = "OfflineData"); + const std::string &subsection = "OfflineData"); void setup(); void assemble(); @@ -239,7 +239,7 @@ namespace Step69 private: const MPI_Comm mpi_communicator; - TimerOutput & computing_timer; + TimerOutput &computing_timer; SmartPointer> discretization; }; @@ -311,8 +311,8 @@ namespace Step69 static DEAL_II_ALWAYS_INLINE inline flux_type flux(const state_type &U); static DEAL_II_ALWAYS_INLINE inline double - compute_lambda_max(const state_type & U_i, - const state_type & U_j, + compute_lambda_max(const state_type &U_i, + const state_type &U_j, const Tensor<1, dim> &n_ij); }; @@ -390,10 +390,10 @@ namespace Step69 n_solution_variables>; TimeStepping(const MPI_Comm mpi_communicator, - TimerOutput & computing_timer, - const OfflineData & offline_data, + TimerOutput &computing_timer, + const OfflineData &offline_data, const InitialValues &initial_values, - const std::string & subsection = "TimeStepping"); + const std::string &subsection = "TimeStepping"); void prepare(); @@ -401,7 +401,7 @@ namespace Step69 private: const MPI_Comm mpi_communicator; - TimerOutput & computing_timer; + TimerOutput &computing_timer; SmartPointer> offline_data; SmartPointer> initial_values; @@ -442,9 +442,9 @@ namespace Step69 SchlierenPostprocessor( const MPI_Comm mpi_communicator, - TimerOutput & computing_timer, + TimerOutput &computing_timer, const OfflineData &offline_data, - const std::string & subsection = "SchlierenPostprocessor"); + const std::string &subsection = "SchlierenPostprocessor"); void prepare(); @@ -454,7 +454,7 @@ namespace Step69 private: const MPI_Comm mpi_communicator; - TimerOutput & computing_timer; + TimerOutput &computing_timer; SmartPointer> offline_data; @@ -536,7 +536,7 @@ namespace Step69 // ParameterAcceptor::add_parameter(). template Discretization::Discretization(const MPI_Comm mpi_communicator, - TimerOutput & computing_timer, + TimerOutput &computing_timer, const std::string &subsection) : ParameterAcceptor(subsection) , mpi_communicator(mpi_communicator) @@ -685,9 +685,9 @@ namespace Step69 // initialization list. template OfflineData::OfflineData(const MPI_Comm mpi_communicator, - TimerOutput & computing_timer, + TimerOutput &computing_timer, const Discretization &discretization, - const std::string & subsection) + const std::string &subsection) : ParameterAcceptor(subsection) , dof_handler(discretization.triangulation) , mpi_communicator(mpi_communicator) @@ -878,8 +878,8 @@ namespace Step69 template DEAL_II_ALWAYS_INLINE inline void - set_entry(SparseMatrix & matrix, - const IteratorType & it, + set_entry(SparseMatrix &matrix, + const IteratorType &it, SparseMatrix::value_type value) { SparseMatrix::iterator matrix_iterator(&matrix, @@ -967,7 +967,7 @@ namespace Step69 template DEAL_II_ALWAYS_INLINE inline void scatter(std::array, k> &U, - const Tensor<1, k2> & tensor, + const Tensor<1, k2> &tensor, const unsigned int i) { static_assert(k == k2, @@ -1052,8 +1052,8 @@ namespace Step69 const auto local_assemble_system = // [&](const typename DoFHandler::cell_iterator &cell, - MeshWorker::ScratchData & scratch, - CopyData & copy) { + MeshWorker::ScratchData &scratch, + CopyData ©) { copy.is_artificial = cell->is_artificial(); if (copy.is_artificial) return; @@ -1433,7 +1433,7 @@ namespace Step69 template DEAL_II_ALWAYS_INLINE inline std::array riemann_data_from_state( const typename ProblemDescription::state_type U, - const Tensor<1, dim> & n_ij) + const Tensor<1, dim> &n_ij) { Tensor<1, 3> projected_U; projected_U[0] = U[0]; @@ -1585,8 +1585,8 @@ namespace Step69 template DEAL_II_ALWAYS_INLINE inline double - ProblemDescription::compute_lambda_max(const state_type & U_i, - const state_type & U_j, + ProblemDescription::compute_lambda_max(const state_type &U_i, + const state_type &U_j, const Tensor<1, dim> &n_ij) { const auto riemann_data_i = riemann_data_from_state(U_i, n_ij); @@ -1713,10 +1713,10 @@ namespace Step69 template TimeStepping::TimeStepping( const MPI_Comm mpi_communicator, - TimerOutput & computing_timer, - const OfflineData & offline_data, + TimerOutput &computing_timer, + const OfflineData &offline_data, const InitialValues &initial_values, - const std::string & subsection /*= "TimeStepping"*/) + const std::string &subsection /*= "TimeStepping"*/) : ParameterAcceptor(subsection) , mpi_communicator(mpi_communicator) , computing_timer(computing_timer) @@ -2125,9 +2125,9 @@ namespace Step69 template SchlierenPostprocessor::SchlierenPostprocessor( const MPI_Comm mpi_communicator, - TimerOutput & computing_timer, + TimerOutput &computing_timer, const OfflineData &offline_data, - const std::string & subsection /*= "SchlierenPostprocessor"*/) + const std::string &subsection /*= "SchlierenPostprocessor"*/) : ParameterAcceptor(subsection) , mpi_communicator(mpi_communicator) , computing_timer(computing_timer) @@ -2423,8 +2423,8 @@ namespace Step69 namespace { void print_head(ConditionalOStream &pcout, - const std::string & header, - const std::string & secondary = "") + const std::string &header, + const std::string &secondary = "") { const auto header_size = header.size(); const auto padded_header = std::string((34 - header_size) / 2, ' ') + @@ -2712,7 +2712,7 @@ namespace Step69 template void MainLoop::output(const typename MainLoop::vector_type &U, - const std::string & name, + const std::string &name, const double t, const unsigned int cycle) { diff --git a/examples/step-7/step-7.cc b/examples/step-7/step-7.cc index 23b65abb23..3eb86bdda0 100644 --- a/examples/step-7/step-7.cc +++ b/examples/step-7/step-7.cc @@ -172,11 +172,11 @@ namespace Step7 class Solution : public Function, protected SolutionBase { public: - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; virtual Tensor<1, dim> - gradient(const Point & p, + gradient(const Point &p, const unsigned int component = 0) const override; }; @@ -268,7 +268,7 @@ namespace Step7 class RightHandSide : public Function, protected SolutionBase { public: - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; }; diff --git a/examples/step-71/step-71.cc b/examples/step-71/step-71.cc index 1b3f7bb36d..43fa265cca 100644 --- a/examples/step-71/step-71.cc +++ b/examples/step-71/step-71.cc @@ -875,7 +875,7 @@ namespace Step71 // the @p constitutive_parameters, are all the fundamental quantities that // are required to compute the material response. virtual void update_internal_data(const SymmetricTensor<2, dim> &C, - const Tensor<1, dim> & H, + const Tensor<1, dim> &H, const DiscreteTime &time) = 0; // The next few functions provide the interface to probe the material @@ -1145,7 +1145,7 @@ namespace Step71 // we'll declare that this class will override all of these base class // methods. virtual void update_internal_data(const SymmetricTensor<2, dim> &C, - const Tensor<1, dim> & H, + const Tensor<1, dim> &H, const DiscreteTime &) override; virtual double get_psi() const override; @@ -1231,7 +1231,7 @@ namespace Step71 void Magnetoelastic_Constitutive_Law_AD::update_internal_data( const SymmetricTensor<2, dim> &C, - const Tensor<1, dim> & H, + const Tensor<1, dim> &H, const DiscreteTime &) { Assert(determinant(C) > 0, ExcInternalError()); @@ -1442,7 +1442,7 @@ namespace Step71 { public: Magnetoviscoelastic_Constitutive_Law_SD( - const ConstitutiveParameters & constitutive_parameters, + const ConstitutiveParameters &constitutive_parameters, const Differentiation::SD::OptimizerType optimizer_type, const Differentiation::SD::OptimizationFlags optimization_flags); @@ -1453,7 +1453,7 @@ namespace Step71 // within the `update_internal_data()` function, and cache the results // for layer extraction. virtual void update_internal_data(const SymmetricTensor<2, dim> &C, - const Tensor<1, dim> & H, + const Tensor<1, dim> &H, const DiscreteTime &time) override; virtual double get_psi() const override; @@ -1572,7 +1572,7 @@ namespace Step71 // The final method of this class will configure the @p optimizer. Differentiation::SD::types::substitution_map make_substitution_map(const SymmetricTensor<2, dim> &C, - const Tensor<1, dim> & H, + const Tensor<1, dim> &H, const double delta_t) const; void initialize_optimizer(); @@ -1590,7 +1590,7 @@ namespace Step71 template Magnetoviscoelastic_Constitutive_Law_SD:: Magnetoviscoelastic_Constitutive_Law_SD( - const ConstitutiveParameters & constitutive_parameters, + const ConstitutiveParameters &constitutive_parameters, const Differentiation::SD::OptimizerType optimizer_type, const Differentiation::SD::OptimizationFlags optimization_flags) : Coupled_Magnetomechanical_Constitutive_Law_Base( @@ -1632,7 +1632,7 @@ namespace Step71 Differentiation::SD::types::substitution_map Magnetoviscoelastic_Constitutive_Law_SD::make_substitution_map( const SymmetricTensor<2, dim> &C, - const Tensor<1, dim> & H, + const Tensor<1, dim> &H, const double delta_t) const { return Differentiation::SD::make_substitution_map( @@ -1848,8 +1848,8 @@ namespace Step71 template void Magnetoviscoelastic_Constitutive_Law_SD::update_internal_data( const SymmetricTensor<2, dim> &C, - const Tensor<1, dim> & H, - const DiscreteTime & time) + const Tensor<1, dim> &H, + const DiscreteTime &time) { // To update the internal history variable, we first need to compute // a few fundamental quantities, which we've seen before. @@ -2245,7 +2245,7 @@ namespace Step71 const ConstitutiveParameters &constitutive_parameters); virtual void update_internal_data(const SymmetricTensor<2, dim> &C, - const Tensor<1, dim> & H, + const Tensor<1, dim> &H, const DiscreteTime &) override; virtual double get_psi() const override; @@ -2298,7 +2298,7 @@ namespace Step71 template void Magnetoelastic_Constitutive_Law::update_internal_data( const SymmetricTensor<2, dim> &C, - const Tensor<1, dim> & H, + const Tensor<1, dim> &H, const DiscreteTime &) { const double det_F = std::sqrt(determinant(C)); @@ -2775,7 +2775,7 @@ namespace Step71 const ConstitutiveParameters &constitutive_parameters); virtual void update_internal_data(const SymmetricTensor<2, dim> &C, - const Tensor<1, dim> & H, + const Tensor<1, dim> &H, const DiscreteTime &time) override; virtual double get_psi() const override; @@ -2816,7 +2816,7 @@ namespace Step71 // internal variables, and will be called before we perform any // detailed calculations. void set_primary_variables(const SymmetricTensor<2, dim> &C, - const Tensor<1, dim> & H) const; + const Tensor<1, dim> &H) const; void update_internal_variable(const DiscreteTime &time); @@ -2925,8 +2925,8 @@ namespace Step71 template void Magnetoviscoelastic_Constitutive_Law::update_internal_data( const SymmetricTensor<2, dim> &C, - const Tensor<1, dim> & H, - const DiscreteTime & time) + const Tensor<1, dim> &H, + const DiscreteTime &time) { // Record the applied deformation state as well as the magnetic load. // Thereafter, update internal (viscous) variable based on new deformation @@ -2968,7 +2968,7 @@ namespace Step71 // Intermediate quantities. Note that, since we're fetching these values // from a cache that has a lifetime that outlasts this function call, we // can alias the result rather than copying the value from the cache. - const double & det_F = get_det_F(); + const double &det_F = get_det_F(); const SymmetricTensor<2, dim> &C_inv = get_C_inv(); const double &log_det_F = get_log_det_F(); @@ -3275,7 +3275,7 @@ namespace Step71 template void Magnetoviscoelastic_Constitutive_Law::set_primary_variables( const SymmetricTensor<2, dim> &C, - const Tensor<1, dim> & H) const + const Tensor<1, dim> &H) const { // Set value for $\boldsymbol{\mathbb{H}}$. const std::string name_H("H"); @@ -3569,7 +3569,7 @@ namespace Step71 const std::string name("d2H_dot_C_inv_dot_H_dC_dH"); if (cache.stores_object_with_name(name) == false) { - const Tensor<1, dim> & C_inv_dot_H = get_C_inv_dot_H(); + const Tensor<1, dim> &C_inv_dot_H = get_C_inv_dot_H(); const SymmetricTensor<2, dim> &C_inv = get_C_inv(); Tensor<3, dim> d2H_dot_C_inv_dot_H_dC_dH; @@ -3595,7 +3595,7 @@ namespace Step71 const std::string name("d2H_dot_C_inv_dot_H_dC_dC"); if (cache.stores_object_with_name(name) == false) { - const Tensor<1, dim> & C_inv_dot_H = get_C_inv_dot_H(); + const Tensor<1, dim> &C_inv_dot_H = get_C_inv_dot_H(); const SymmetricTensor<2, dim> &C_inv = get_C_inv(); SymmetricTensor<4, dim> d2H_dot_C_inv_dot_H_dC_dC; @@ -3799,8 +3799,8 @@ namespace Step71 Coupled_Magnetomechanical_Constitutive_Law_Base &material_hand_calculated, Coupled_Magnetomechanical_Constitutive_Law_Base - & material_assisted_computation, - TimerOutput & timer, + &material_assisted_computation, + TimerOutput &timer, const std::string &filename) { // We can take the hand-implemented constitutive law and compare the diff --git a/examples/step-72/step-72.cc b/examples/step-72/step-72.cc index c68e27e0e4..9b353d4c0b 100644 --- a/examples/step-72/step-72.cc +++ b/examples/step-72/step-72.cc @@ -182,7 +182,7 @@ namespace Step72 class BoundaryValues : public Function { public: - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; }; @@ -322,12 +322,12 @@ namespace Step72 // initialize the cell DoF indices, knowing that the local matrix // and vector are already correctly sized. const auto cell_worker = [this](const CellIteratorType &cell, - ScratchData & scratch_data, - CopyData & copy_data) { + ScratchData &scratch_data, + CopyData ©_data) { const auto &fe_values = scratch_data.reinit(cell); - FullMatrix & cell_matrix = copy_data.matrices[0]; - Vector & cell_rhs = copy_data.vectors[0]; + FullMatrix &cell_matrix = copy_data.matrices[0]; + Vector &cell_rhs = copy_data.vectors[0]; std::vector &local_dof_indices = copy_data.local_dof_indices[0]; cell->get_dof_indices(local_dof_indices); @@ -383,7 +383,7 @@ namespace Step72 // `cell_worker`. const auto copier = [dofs_per_cell, this](const CopyData ©_data) { const FullMatrix &cell_matrix = copy_data.matrices[0]; - const Vector & cell_rhs = copy_data.vectors[0]; + const Vector &cell_rhs = copy_data.vectors[0]; const std::vector &local_dof_indices = copy_data.local_dof_indices[0]; @@ -490,13 +490,13 @@ namespace Step72 // to compute the cell contributions to the Jacobian matrix and // the right hand side: const auto cell_worker = [&u_fe, this](const CellIteratorType &cell, - ScratchData & scratch_data, - CopyData & copy_data) { - const auto & fe_values = scratch_data.reinit(cell); + ScratchData &scratch_data, + CopyData ©_data) { + const auto &fe_values = scratch_data.reinit(cell); const unsigned int dofs_per_cell = fe_values.get_fe().n_dofs_per_cell(); - FullMatrix & cell_matrix = copy_data.matrices[0]; - Vector & cell_rhs = copy_data.vectors[0]; + FullMatrix &cell_matrix = copy_data.matrices[0]; + Vector &cell_rhs = copy_data.vectors[0]; std::vector &local_dof_indices = copy_data.local_dof_indices[0]; cell->get_dof_indices(local_dof_indices); @@ -615,7 +615,7 @@ namespace Step72 // The remainder of the function equals what we had previously: const auto copier = [dofs_per_cell, this](const CopyData ©_data) { const FullMatrix &cell_matrix = copy_data.matrices[0]; - const Vector & cell_rhs = copy_data.vectors[0]; + const Vector &cell_rhs = copy_data.vectors[0]; const std::vector &local_dof_indices = copy_data.local_dof_indices[0]; @@ -716,12 +716,12 @@ namespace Step72 // results from an energy functional is necessarily square (and also, // incidentally, symmetric). const auto cell_worker = [&u_fe, this](const CellIteratorType &cell, - ScratchData & scratch_data, - CopyData & copy_data) { + ScratchData &scratch_data, + CopyData ©_data) { const auto &fe_values = scratch_data.reinit(cell); - FullMatrix & cell_matrix = copy_data.matrices[0]; - Vector & cell_rhs = copy_data.vectors[0]; + FullMatrix &cell_matrix = copy_data.matrices[0]; + Vector &cell_rhs = copy_data.vectors[0]; std::vector &local_dof_indices = copy_data.local_dof_indices[0]; cell->get_dof_indices(local_dof_indices); @@ -783,7 +783,7 @@ namespace Step72 // before: const auto copier = [dofs_per_cell, this](const CopyData ©_data) { const FullMatrix &cell_matrix = copy_data.matrices[0]; - const Vector & cell_rhs = copy_data.vectors[0]; + const Vector &cell_rhs = copy_data.vectors[0]; const std::vector &local_dof_indices = copy_data.local_dof_indices[0]; diff --git a/examples/step-74/step-74.cc b/examples/step-74/step-74.cc index 81bddd9d1c..15f12c16af 100644 --- a/examples/step-74/step-74.cc +++ b/examples/step-74/step-74.cc @@ -72,11 +72,11 @@ namespace Step74 {} virtual void value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component = 0) const override; virtual Tensor<1, dim> - gradient(const Point & point, + gradient(const Point &point, const unsigned int component = 0) const override; }; @@ -84,7 +84,7 @@ namespace Step74 template void SmoothSolution::value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int /*component*/) const { using numbers::PI; @@ -121,7 +121,7 @@ namespace Step74 {} virtual void value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int /*component*/) const override; }; @@ -130,7 +130,7 @@ namespace Step74 template void SmoothRightHandSide::value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int /*component*/) const { using numbers::PI; @@ -153,7 +153,7 @@ namespace Step74 {} virtual void value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int /*component*/) const override; private: @@ -165,7 +165,7 @@ namespace Step74 template void SingularRightHandSide::value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int /*component*/) const { for (unsigned int i = 0; i < values.size(); ++i) @@ -350,7 +350,7 @@ namespace Step74 const unsigned int dofs_per_cell = fe_v.dofs_per_cell; copy_data.reinit(cell, dofs_per_cell); - const auto & q_points = scratch_data.get_quadrature_points(); + const auto &q_points = scratch_data.get_quadrature_points(); const unsigned int n_q_points = q_points.size(); const std::vector &JxW = scratch_data.get_JxW_values(); @@ -374,17 +374,17 @@ namespace Step74 }; // Next, we need a function that assembles face integrals on the boundary: - const auto boundary_worker = [&](const auto & cell, + const auto boundary_worker = [&](const auto &cell, const unsigned int &face_no, - auto & scratch_data, - auto & copy_data) { + auto &scratch_data, + auto ©_data) { const FEFaceValuesBase &fe_fv = scratch_data.reinit(cell, face_no); - const auto & q_points = scratch_data.get_quadrature_points(); + const auto &q_points = scratch_data.get_quadrature_points(); const unsigned int n_q_points = q_points.size(); const unsigned int dofs_per_cell = fe_fv.dofs_per_cell; - const std::vector & JxW = scratch_data.get_JxW_values(); + const std::vector &JxW = scratch_data.get_JxW_values(); const std::vector> &normals = scratch_data.get_normal_vectors(); @@ -436,24 +436,24 @@ namespace Step74 // faces. To reinitialize FEInterfaceValues, we need to pass // cells, face and subface indices (for adaptive refinement) to // the reinit() function of FEInterfaceValues: - const auto face_worker = [&](const auto & cell, + const auto face_worker = [&](const auto &cell, const unsigned int &f, const unsigned int &sf, - const auto & ncell, + const auto &ncell, const unsigned int &nf, const unsigned int &nsf, - auto & scratch_data, - auto & copy_data) { + auto &scratch_data, + auto ©_data) { const FEInterfaceValues &fe_iv = scratch_data.reinit(cell, f, sf, ncell, nf, nsf); copy_data.face_data.emplace_back(); - CopyDataFace & copy_data_face = copy_data.face_data.back(); + CopyDataFace ©_data_face = copy_data.face_data.back(); const unsigned int n_dofs_face = fe_iv.n_current_interface_dofs(); copy_data_face.joint_dof_indices = fe_iv.get_interface_dof_indices(); copy_data_face.cell_matrix.reinit(n_dofs_face, n_dofs_face); - const std::vector & JxW = fe_iv.get_JxW_values(); + const std::vector &JxW = fe_iv.get_JxW_values(); const std::vector> &normals = fe_iv.get_normal_vectors(); const double extent1 = cell->measure() / cell->face(f)->measure(); @@ -584,7 +584,7 @@ namespace Step74 copy_data.cell_index = cell->active_cell_index(); - const auto & q_points = fe_v.get_quadrature_points(); + const auto &q_points = fe_v.get_quadrature_points(); const unsigned int n_q_points = q_points.size(); const std::vector &JxW = fe_v.get_JxW_values(); @@ -608,13 +608,13 @@ namespace Step74 // Next compute boundary terms $\sum_{f\in \partial K \cap \partial \Omega} // \sigma \left\| [ u_h-g_D ] \right\|_f^2 $: - const auto boundary_worker = [&](const auto & cell, + const auto boundary_worker = [&](const auto &cell, const unsigned int &face_no, - auto & scratch_data, - auto & copy_data) { + auto &scratch_data, + auto ©_data) { const FEFaceValuesBase &fe_fv = scratch_data.reinit(cell, face_no); - const auto & q_points = fe_fv.get_quadrature_points(); + const auto &q_points = fe_fv.get_quadrature_points(); const unsigned n_q_points = q_points.size(); const std::vector &JxW = fe_fv.get_JxW_values(); @@ -640,14 +640,14 @@ namespace Step74 // And finally interior face terms $\sum_{f\in \partial K}\lbrace \sigma // \left\| [u_h] \right\|_f^2 + h_f \left\| [\nu \nabla u_h \cdot // \mathbf n ] \right\|_f^2 \rbrace$: - const auto face_worker = [&](const auto & cell, + const auto face_worker = [&](const auto &cell, const unsigned int &f, const unsigned int &sf, - const auto & ncell, + const auto &ncell, const unsigned int &nf, const unsigned int &nsf, - auto & scratch_data, - auto & copy_data) { + auto &scratch_data, + auto ©_data) { const FEInterfaceValues &fe_iv = scratch_data.reinit(cell, f, sf, ncell, nf, nsf); @@ -657,10 +657,10 @@ namespace Step74 copy_data_face.cell_indices[0] = cell->active_cell_index(); copy_data_face.cell_indices[1] = ncell->active_cell_index(); - const std::vector & JxW = fe_iv.get_JxW_values(); + const std::vector &JxW = fe_iv.get_JxW_values(); const std::vector> &normals = fe_iv.get_normal_vectors(); - const auto & q_points = fe_iv.get_quadrature_points(); + const auto &q_points = fe_iv.get_quadrature_points(); const unsigned int n_q_points = q_points.size(); std::vector jump(n_q_points); @@ -757,7 +757,7 @@ namespace Step74 copy_data.cell_index = cell->active_cell_index(); - const auto & q_points = fe_v.get_quadrature_points(); + const auto &q_points = fe_v.get_quadrature_points(); const unsigned int n_q_points = q_points.size(); const std::vector &JxW = fe_v.get_JxW_values(); @@ -777,13 +777,13 @@ namespace Step74 }; // Assemble $\sum_{f \in F_b}\sigma \|u_h-g_D\|_f^2$. - const auto boundary_worker = [&](const auto & cell, + const auto boundary_worker = [&](const auto &cell, const unsigned int &face_no, - auto & scratch_data, - auto & copy_data) { + auto &scratch_data, + auto ©_data) { const FEFaceValuesBase &fe_fv = scratch_data.reinit(cell, face_no); - const auto & q_points = fe_fv.get_quadrature_points(); + const auto &q_points = fe_fv.get_quadrature_points(); const unsigned n_q_points = q_points.size(); const std::vector &JxW = fe_fv.get_JxW_values(); @@ -807,14 +807,14 @@ namespace Step74 }; // Assemble $\sum_{f \in F_i} \sigma \| [ u_h ] \|_f^2$. - const auto face_worker = [&](const auto & cell, + const auto face_worker = [&](const auto &cell, const unsigned int &f, const unsigned int &sf, - const auto & ncell, + const auto &ncell, const unsigned int &nf, const unsigned int &nsf, - auto & scratch_data, - auto & copy_data) { + auto &scratch_data, + auto ©_data) { const FEInterfaceValues &fe_iv = scratch_data.reinit(cell, f, sf, ncell, nf, nsf); @@ -826,7 +826,7 @@ namespace Step74 const std::vector &JxW = fe_iv.get_JxW_values(); - const auto & q_points = fe_iv.get_quadrature_points(); + const auto &q_points = fe_iv.get_quadrature_points(); const unsigned int n_q_points = q_points.size(); std::vector jump(n_q_points); diff --git a/examples/step-75/step-75.cc b/examples/step-75/step-75.cc index 0d781469dd..f4e3fc794b 100644 --- a/examples/step-75/step-75.cc +++ b/examples/step-75/step-75.cc @@ -225,16 +225,16 @@ namespace Step75 LaplaceOperator() = default; LaplaceOperator(const hp::MappingCollection &mapping, - const DoFHandler & dof_handler, - const hp::QCollection & quad, - const AffineConstraints & constraints, - VectorType & system_rhs); + const DoFHandler &dof_handler, + const hp::QCollection &quad, + const AffineConstraints &constraints, + VectorType &system_rhs); void reinit(const hp::MappingCollection &mapping, - const DoFHandler & dof_handler, - const hp::QCollection & quad, - const AffineConstraints & constraints, - VectorType & system_rhs); + const DoFHandler &dof_handler, + const hp::QCollection &quad, + const AffineConstraints &constraints, + VectorType &system_rhs); types::global_dof_index m() const; @@ -254,14 +254,14 @@ namespace Step75 void do_cell_integral_local(FECellIntegrator &integrator) const; void do_cell_integral_global(FECellIntegrator &integrator, - VectorType & dst, + VectorType &dst, const VectorType &src) const; void do_cell_integral_range( - const MatrixFree & matrix_free, - VectorType & dst, - const VectorType & src, + const MatrixFree &matrix_free, + VectorType &dst, + const VectorType &src, const std::pair &range) const; MatrixFree matrix_free; @@ -287,10 +287,10 @@ namespace Step75 template LaplaceOperator::LaplaceOperator( const hp::MappingCollection &mapping, - const DoFHandler & dof_handler, - const hp::QCollection & quad, - const AffineConstraints & constraints, - VectorType & system_rhs) + const DoFHandler &dof_handler, + const hp::QCollection &quad, + const AffineConstraints &constraints, + VectorType &system_rhs) { this->reinit(mapping, dof_handler, quad, constraints, system_rhs); } @@ -300,10 +300,10 @@ namespace Step75 template void LaplaceOperator::reinit( const hp::MappingCollection &mapping, - const DoFHandler & dof_handler, - const hp::QCollection & quad, - const AffineConstraints & constraints, - VectorType & system_rhs) + const DoFHandler &dof_handler, + const hp::QCollection &quad, + const AffineConstraints &constraints, + VectorType &system_rhs) { // Clear internal data structures (in the case that the operator is reused). this->system_matrix.clear(); @@ -401,7 +401,7 @@ namespace Step75 // over all cells and evaluating the effect of the cell integrals (see also: // `do_cell_integral_local()` and `do_cell_integral_global()`). template - void LaplaceOperator::vmult(VectorType & dst, + void LaplaceOperator::vmult(VectorType &dst, const VectorType &src) const { this->matrix_free.cell_loop( @@ -413,7 +413,7 @@ namespace Step75 // Perform the transposed operator evaluation. Since we are considering // symmetric "matrices", this function can simply delegate it task to vmult(). template - void LaplaceOperator::Tvmult(VectorType & dst, + void LaplaceOperator::Tvmult(VectorType &dst, const VectorType &src) const { this->vmult(dst, src); @@ -502,7 +502,7 @@ namespace Step75 template void LaplaceOperator::do_cell_integral_global( FECellIntegrator &integrator, - VectorType & dst, + VectorType &dst, const VectorType &src) const { integrator.gather_evaluate(src, EvaluationFlags::gradients); @@ -519,9 +519,9 @@ namespace Step75 // calls the above function. template void LaplaceOperator::do_cell_integral_range( - const MatrixFree & matrix_free, - VectorType & dst, - const VectorType & src, + const MatrixFree &matrix_free, + VectorType &dst, + const VectorType &src, const std::pair &range) const { FECellIntegrator integrator(matrix_free, range); @@ -549,14 +549,14 @@ namespace Step75 typename LevelMatrixType, typename MGTransferType> static void - mg_solve(SolverControl & solver_control, - VectorType & dst, - const VectorType & src, + mg_solve(SolverControl &solver_control, + VectorType &dst, + const VectorType &src, const MultigridParameters &mg_data, - const DoFHandler & dof, - const SystemMatrixType & fine_matrix, + const DoFHandler &dof, + const SystemMatrixType &fine_matrix, const MGLevelObject> &mg_matrices, - const MGTransferType & mg_transfer) + const MGTransferType &mg_transfer) { AssertThrow(mg_data.coarse_solver.type == "cg_with_amg", ExcNotImplemented()); @@ -641,14 +641,14 @@ namespace Step75 // particular the operators, and the transfer operator as a // MGTransferGlobalCoarsening object. template - void solve_with_gmg(SolverControl & solver_control, - const OperatorType & system_matrix, - VectorType & dst, - const VectorType & src, - const MultigridParameters & mg_data, + void solve_with_gmg(SolverControl &solver_control, + const OperatorType &system_matrix, + VectorType &dst, + const VectorType &src, + const MultigridParameters &mg_data, const hp::MappingCollection mapping_collection, - const DoFHandler & dof_handler, - const hp::QCollection & quadrature_collection) + const DoFHandler &dof_handler, + const hp::QCollection &quadrature_collection) { // Create a DoFHandler and operator for each multigrid level, // as well as, create transfer operators. To be able to @@ -778,7 +778,7 @@ namespace Step75 for (unsigned int level = minlevel; level <= maxlevel; ++level) { const auto &dof_handler = dof_handlers[level]; - auto & constraint = constraints[level]; + auto &constraint = constraints[level]; const IndexSet locally_relevant_dofs = DoFTools::extract_locally_relevant_dofs(dof_handler); diff --git a/examples/step-76/step-76.cc b/examples/step-76/step-76.cc index 2eb53674f7..333c8c245e 100644 --- a/examples/step-76/step-76.cc +++ b/examples/step-76/step-76.cc @@ -149,9 +149,9 @@ namespace Euler_DG void perform_time_step(const Operator &pde_operator, const double current_time, const double time_step, - VectorType & solution, - VectorType & vec_ri, - VectorType & vec_ki) const + VectorType &solution, + VectorType &vec_ri, + VectorType &vec_ki) const { AssertDimension(ai.size() + 1, bi.size()); @@ -201,14 +201,14 @@ namespace Euler_DG : Function(dim + 2, time) {} - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; }; template - double ExactSolution::value(const Point & x, + double ExactSolution::value(const Point &x, const unsigned int component) const { const double t = this->get_time(); @@ -323,7 +323,7 @@ namespace Euler_DG inline DEAL_II_ALWAYS_INLINE // Tensor<1, n_components, Number> operator*(const Tensor<1, n_components, Tensor<1, dim, Number>> &matrix, - const Tensor<1, dim, Number> & vector) + const Tensor<1, dim, Number> &vector) { Tensor<1, n_components, Number> result; for (unsigned int d = 0; d < n_components; ++d) @@ -336,7 +336,7 @@ namespace Euler_DG Tensor<1, dim + 2, Number> euler_numerical_flux(const Tensor<1, dim + 2, Number> &u_m, const Tensor<1, dim + 2, Number> &u_p, - const Tensor<1, dim, Number> & normal) + const Tensor<1, dim, Number> &normal) { const auto velocity_m = euler_velocity(u_m); const auto velocity_p = euler_velocity(u_p); @@ -392,7 +392,7 @@ namespace Euler_DG // General-purpose utility functions from step-67: template VectorizedArrayType - evaluate_function(const Function & function, + evaluate_function(const Function &function, const Point &p_vectorized, const unsigned int component) { @@ -410,7 +410,7 @@ namespace Euler_DG template Tensor<1, n_components, VectorizedArrayType> - evaluate_function(const Function & function, + evaluate_function(const Function &function, const Point &p_vectorized) { AssertDimension(function.n_components, n_components); @@ -440,7 +440,7 @@ namespace Euler_DG ~EulerOperator(); - void reinit(const Mapping & mapping, + void reinit(const Mapping &mapping, const DoFHandler &dof_handler); void set_inflow_boundary(const types::boundary_id boundary_id, @@ -460,14 +460,14 @@ namespace Euler_DG const Number bi, const Number ai, const LinearAlgebra::distributed::Vector ¤t_ri, - LinearAlgebra::distributed::Vector & vec_ki, + LinearAlgebra::distributed::Vector &vec_ki, LinearAlgebra::distributed::Vector &solution) const; - void project(const Function & function, + void project(const Function &function, LinearAlgebra::distributed::Vector &solution) const; std::array compute_errors( - const Function & function, + const Function &function, const LinearAlgebra::distributed::Vector &solution) const; double compute_cell_transport_speed( @@ -553,7 +553,7 @@ namespace Euler_DG // the MPI-3.0 shared-memory capabilities are used: template void EulerOperator::reinit( - const Mapping & mapping, + const Mapping &mapping, const DoFHandler &dof_handler) { const std::vector *> dof_handlers = {&dof_handler}; @@ -619,8 +619,8 @@ namespace Euler_DG const Number bi, const Number ai, const LinearAlgebra::distributed::Vector ¤t_ri, - LinearAlgebra::distributed::Vector & vec_ki, - LinearAlgebra::distributed::Vector & solution) const + LinearAlgebra::distributed::Vector &vec_ki, + LinearAlgebra::distributed::Vector &solution) const { for (auto &i : inflow_boundaries) i.second->set_time(current_time); @@ -1042,7 +1042,7 @@ namespace Euler_DG template void EulerOperator::project( - const Function & function, + const Function &function, LinearAlgebra::distributed::Vector &solution) const { FEEvaluation @@ -1072,7 +1072,7 @@ namespace Euler_DG template std::array EulerOperator::compute_errors( - const Function & function, + const Function &function, const LinearAlgebra::distributed::Vector &solution) const { TimerOutput::Scope t(timer, "compute errors"); @@ -1245,7 +1245,7 @@ namespace Euler_DG template void EulerProblem::Postprocessor::evaluate_vector_field( const DataPostprocessorInputs::Vector &inputs, - std::vector> & computed_quantities) const + std::vector> &computed_quantities) const { const unsigned int n_evaluation_points = inputs.solution_values.size(); diff --git a/examples/step-77/step-77.cc b/examples/step-77/step-77.cc index 76366673cc..61a42281b1 100644 --- a/examples/step-77/step-77.cc +++ b/examples/step-77/step-77.cc @@ -99,14 +99,14 @@ namespace Step77 private: void setup_system(const bool initial_step); void solve(const Vector &rhs, - Vector & solution, + Vector &solution, const double tolerance); void refine_mesh(); void output_results(const unsigned int refinement_cycle); void set_boundary_values(); void compute_and_factorize_jacobian(const Vector &evaluation_point); void compute_residual(const Vector &evaluation_point, - Vector & residual); + Vector &residual); Triangulation triangulation; @@ -133,7 +133,7 @@ namespace Step77 class BoundaryValues : public Function { public: - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; }; @@ -328,7 +328,7 @@ namespace Step77 template void MinimalSurfaceProblem::compute_residual( const Vector &evaluation_point, - Vector & residual) + Vector &residual) { TimerOutput::Scope t(computing_timer, "assembling the residual"); @@ -412,7 +412,7 @@ namespace Step77 // only inexactly. template void MinimalSurfaceProblem::solve(const Vector &rhs, - Vector & solution, + Vector &solution, const double /*tolerance*/) { TimerOutput::Scope t(computing_timer, "linear system solve"); @@ -601,7 +601,7 @@ namespace Step77 nonlinear_solver.residual = [&](const Vector &evaluation_point, - Vector & residual) { + Vector &residual) { compute_residual(evaluation_point, residual); }; @@ -612,7 +612,7 @@ namespace Step77 }; nonlinear_solver.solve_with_jacobian = [&](const Vector &rhs, - Vector & dst, + Vector &dst, const double tolerance) { solve(rhs, dst, tolerance); }; diff --git a/examples/step-78/step-78.cc b/examples/step-78/step-78.cc index 2d434b74e8..638d7a069e 100644 --- a/examples/step-78/step-78.cc +++ b/examples/step-78/step-78.cc @@ -78,11 +78,11 @@ namespace BlackScholesSolver public: Solution(const double maturity_time); - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; virtual Tensor<1, dim> - gradient(const Point & p, + gradient(const Point &p, const unsigned int component = 0) const override; private: @@ -99,7 +99,7 @@ namespace BlackScholesSolver template - double Solution::value(const Point & p, + double Solution::value(const Point &p, const unsigned int component) const { return -Utilities::fixed_power<2, double>(p(component)) - @@ -108,7 +108,7 @@ namespace BlackScholesSolver template - Tensor<1, dim> Solution::gradient(const Point & p, + Tensor<1, dim> Solution::gradient(const Point &p, const unsigned int component) const { return Point(-2 * p(component)); @@ -130,7 +130,7 @@ namespace BlackScholesSolver public: InitialConditions(const double strike_price); - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; private: @@ -145,7 +145,7 @@ namespace BlackScholesSolver template - double InitialConditions::value(const Point & p, + double InitialConditions::value(const Point &p, const unsigned int component) const { #ifdef MMS @@ -162,7 +162,7 @@ namespace BlackScholesSolver class LeftBoundaryValues : public Function { public: - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; }; @@ -187,7 +187,7 @@ namespace BlackScholesSolver public: RightBoundaryValues(const double strike_price, const double interest_rate); - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; private: @@ -205,7 +205,7 @@ namespace BlackScholesSolver template - double RightBoundaryValues::value(const Point & p, + double RightBoundaryValues::value(const Point &p, const unsigned int component) const { #ifdef MMS @@ -226,7 +226,7 @@ namespace BlackScholesSolver public: RightHandSide(const double asset_volatility, const double interest_rate); - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; private: @@ -244,7 +244,7 @@ namespace BlackScholesSolver template - double RightHandSide::value(const Point & p, + double RightHandSide::value(const Point &p, const unsigned int component) const { #ifdef MMS diff --git a/examples/step-79/step-79.cc b/examples/step-79/step-79.cc index e272103257..bf8a73c025 100644 --- a/examples/step-79/step-79.cc +++ b/examples/step-79/step-79.cc @@ -711,7 +711,7 @@ namespace SAND { if (!(check_cell->face(n)->at_boundary())) { - const auto & neighbor = check_cell->neighbor(n); + const auto &neighbor = check_cell->neighbor(n); const double distance = cell->center().distance(neighbor->center()); if ((distance < filter_r) && diff --git a/examples/step-8/step-8.cc b/examples/step-8/step-8.cc index 4063c92e5b..2163dffe3c 100644 --- a/examples/step-8/step-8.cc +++ b/examples/step-8/step-8.cc @@ -136,7 +136,7 @@ namespace Step8 // just fine in 3d, however. template void right_hand_side(const std::vector> &points, - std::vector> & values) + std::vector> &values) { AssertDimension(values.size(), points.size()); Assert(dim >= 2, ExcNotImplemented()); diff --git a/examples/step-81/step-81.cc b/examples/step-81/step-81.cc index 8666a82b3c..169e0ef694 100644 --- a/examples/step-81/step-81.cc +++ b/examples/step-81/step-81.cc @@ -125,10 +125,10 @@ namespace Step81 public: rank2_type epsilon(const Point &x, types::material_id material); - std::complex mu_inv(const Point & x, + std::complex mu_inv(const Point &x, types::material_id material); - rank2_type sigma(const Point & x, + rank2_type sigma(const Point &x, types::material_id left, types::material_id right); @@ -572,7 +572,7 @@ namespace Step81 template DEAL_II_ALWAYS_INLINE inline Tensor<1, dim, std::complex> tangential_part(const Tensor<1, dim, std::complex> &tensor, - const Tensor<1, dim> & normal) + const Tensor<1, dim> &normal) { auto result = tensor; result[0] = normal[1] * (tensor[0] * normal[1] - tensor[1] * normal[0]); diff --git a/examples/step-82/step-82.cc b/examples/step-82/step-82.cc index 7e40cb38cf..58e173c32d 100644 --- a/examples/step-82/step-82.cc +++ b/examples/step-82/step-82.cc @@ -108,11 +108,11 @@ namespace Step82 // face=cell->face(face_no). void assemble_local_matrix(const FEValues &fe_values_lift, const unsigned int n_q_points, - FullMatrix & local_matrix); + FullMatrix &local_matrix); void compute_discrete_hessians( const typename DoFHandler::active_cell_iterator &cell, - std::vector>> & discrete_hessians, + std::vector>> &discrete_hessians, std::vector>>> &discrete_hessians_neigh); @@ -155,7 +155,7 @@ namespace Step82 : Function() {} - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; }; @@ -208,15 +208,15 @@ namespace Step82 : Function() {} - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; virtual Tensor<1, dim> - gradient(const Point & p, + gradient(const Point &p, const unsigned int component = 0) const override; virtual SymmetricTensor<2, dim> - hessian(const Point & p, + hessian(const Point &p, const unsigned int component = 0) const override; }; @@ -1110,7 +1110,7 @@ namespace Step82 void BiLaplacianLDGLift::assemble_local_matrix( const FEValues &fe_values_lift, const unsigned int n_q_points, - FullMatrix & local_matrix) + FullMatrix &local_matrix) { const FEValuesExtractors::Tensor<2> tau_ext(0); @@ -1168,7 +1168,7 @@ namespace Step82 template void BiLaplacianLDGLift::compute_discrete_hessians( const typename DoFHandler::active_cell_iterator &cell, - std::vector>> & discrete_hessians, + std::vector>> &discrete_hessians, std::vector>>> &discrete_hessians_neigh) { diff --git a/examples/step-85/step-85.cc b/examples/step-85/step-85.cc index 82188c139b..7c14b24b92 100644 --- a/examples/step-85/step-85.cc +++ b/examples/step-85/step-85.cc @@ -232,7 +232,7 @@ namespace Step85 { std::cout << "Initializing matrices" << std::endl; - const auto face_has_flux_coupling = [&](const auto & cell, + const auto face_has_flux_coupling = [&](const auto &cell, const unsigned int face_index) { return this->face_has_ghost_penalty(cell, face_index); }; @@ -582,14 +582,14 @@ namespace Step85 class AnalyticalSolution : public Function { public: - double value(const Point & point, + double value(const Point &point, const unsigned int component = 0) const override; }; template - double AnalyticalSolution::value(const Point & point, + double AnalyticalSolution::value(const Point &point, const unsigned int component) const { AssertIndexRange(component, this->n_components); diff --git a/examples/step-9/step-9.cc b/examples/step-9/step-9.cc index f67ba6eec1..dbddc14c62 100644 --- a/examples/step-9/step-9.cc +++ b/examples/step-9/step-9.cc @@ -154,7 +154,7 @@ namespace Step9 class RightHandSide : public Function { public: - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; private: @@ -184,7 +184,7 @@ namespace Step9 // one past the last (i.e. again the half-open interval so often used in the // C++ standard library): template - double RightHandSide::value(const Point & p, + double RightHandSide::value(const Point &p, const unsigned int component) const { (void)component; @@ -203,14 +203,14 @@ namespace Step9 class BoundaryValues : public Function { public: - virtual double value(const Point & p, + virtual double value(const Point &p, const unsigned int component = 0) const override; }; template - double BoundaryValues::value(const Point & p, + double BoundaryValues::value(const Point &p, const unsigned int component) const { (void)component; @@ -309,8 +309,8 @@ namespace Step9 void assemble_system(); void local_assemble_system( const typename DoFHandler::active_cell_iterator &cell, - AssemblyScratchData & scratch, - AssemblyCopyData & copy_data); + AssemblyScratchData &scratch, + AssemblyCopyData ©_data); void copy_local_to_global(const AssemblyCopyData ©_data); @@ -412,8 +412,8 @@ namespace Step9 public: template static void estimate(const DoFHandler &dof, - const Vector & solution, - Vector & error_per_cell); + const Vector &solution, + Vector &error_per_cell); DeclException2(ExcInvalidVectorLength, int, @@ -427,8 +427,8 @@ namespace Step9 struct EstimateScratchData { EstimateScratchData(const FiniteElement &fe, - const Vector & solution, - Vector & error_per_cell); + const Vector &solution, + Vector &error_per_cell); EstimateScratchData(const EstimateScratchData &data); FEValues fe_midpoint_value; @@ -436,7 +436,7 @@ namespace Step9 active_neighbors; const Vector &solution; - Vector & error_per_cell; + Vector &error_per_cell; std::vector cell_midpoint_value; std::vector neighbor_midpoint_value; @@ -449,7 +449,7 @@ namespace Step9 static void estimate_cell(const typename DoFHandler::active_cell_iterator &cell, EstimateScratchData &scratch_data, - const EstimateCopyData & copy_data); + const EstimateCopyData ©_data); }; @@ -606,8 +606,8 @@ namespace Step9 template void AdvectionProblem::local_assemble_system( const typename DoFHandler::active_cell_iterator &cell, - AssemblyScratchData & scratch_data, - AssemblyCopyData & copy_data) + AssemblyScratchData &scratch_data, + AssemblyCopyData ©_data) { // We define some abbreviations to avoid unnecessarily long lines: const unsigned int dofs_per_cell = fe.n_dofs_per_cell(); @@ -898,8 +898,8 @@ namespace Step9 template GradientEstimation::EstimateScratchData::EstimateScratchData( const FiniteElement &fe, - const Vector & solution, - Vector & error_per_cell) + const Vector &solution, + Vector &error_per_cell) : fe_midpoint_value(fe, QMidpoint(), update_values | update_quadrature_points) @@ -943,8 +943,8 @@ namespace Step9 // well worth the effort to check for such things. template void GradientEstimation::estimate(const DoFHandler &dof_handler, - const Vector & solution, - Vector & error_per_cell) + const Vector &solution, + Vector &error_per_cell) { Assert( error_per_cell.size() == dof_handler.get_triangulation().n_active_cells(), @@ -1009,7 +1009,7 @@ namespace Step9 template void GradientEstimation::estimate_cell( const typename DoFHandler::active_cell_iterator &cell, - EstimateScratchData & scratch_data, + EstimateScratchData &scratch_data, const EstimateCopyData &) { // We need space for the tensor Y, which is the sum of diff --git a/include/deal.II/algorithms/any_data.h b/include/deal.II/algorithms/any_data.h index 3495852c7b..2d981b58ea 100644 --- a/include/deal.II/algorithms/any_data.h +++ b/include/deal.II/algorithms/any_data.h @@ -351,7 +351,7 @@ inline type AnyData::entry(const std::string &n) { const unsigned int i = find(n); - type * p = boost::any_cast(&data[i]); + type *p = boost::any_cast(&data[i]); Assert(p != 0, ExcTypeMismatch(typeid(type).name(), data[i].type().name())); return *p; } @@ -362,7 +362,7 @@ inline type AnyData::entry(const std::string &n) const { const unsigned int i = find(n); - const type * p = boost::any_cast(&data[i]); + const type *p = boost::any_cast(&data[i]); Assert(p != nullptr, ExcTypeMismatch(typeid(type).name(), data[i].type().name())); return *p; @@ -374,7 +374,7 @@ inline type AnyData::read(const std::string &n) const { const unsigned int i = find(n); - const type * p = boost::any_cast(&data[i]); + const type *p = boost::any_cast(&data[i]); Assert(p != 0, ExcTypeMismatch(typeid(type).name(), data[i].type().name())); return *p; } @@ -422,7 +422,7 @@ AnyData::try_read(const std::string &n) const // Compute index and return casted pointer unsigned int i = it - names.begin(); - const type * p = boost::any_cast(&data[i]); + const type *p = boost::any_cast(&data[i]); return p; } diff --git a/include/deal.II/algorithms/general_data_storage.h b/include/deal.II/algorithms/general_data_storage.h index 78b90d7a86..23ee33bf2c 100644 --- a/include/deal.II/algorithms/general_data_storage.h +++ b/include/deal.II/algorithms/general_data_storage.h @@ -245,7 +245,7 @@ public: template Type & get_or_add_object_with_name(const std::string &name, - Arg & argument, + Arg &argument, Args &...arguments); /** @@ -272,7 +272,7 @@ public: template Type & get_or_add_object_with_name(const std::string &name, - Arg && argument, + Arg &&argument, Args &&...arguments); /** @@ -391,7 +391,7 @@ GeneralDataStorage::add_unique_copy(const std::string &name, const Type &entry) template void GeneralDataStorage::add_or_overwrite_copy(const std::string &name, - const Type & entry) + const Type &entry) { any_data[name] = entry; } @@ -409,7 +409,7 @@ GeneralDataStorage::add_unique_reference(const std::string &name, Type &entry) template void GeneralDataStorage::add_or_overwrite_reference(const std::string &name, - Type & entry) + Type &entry) { Type *ptr = &entry; any_data[name] = ptr; @@ -478,7 +478,7 @@ GeneralDataStorage::get_object_with_name(const std::string &name) const template Type & GeneralDataStorage::get_or_add_object_with_name(const std::string &name, - Arg & argument) + Arg &argument) { if (!stores_object_with_name(name)) add_unique_copy(name, Type(argument)); @@ -491,7 +491,7 @@ GeneralDataStorage::get_or_add_object_with_name(const std::string &name, template Type & GeneralDataStorage::get_or_add_object_with_name(const std::string &name, - Arg & argument, + Arg &argument, Args &...arguments) { if (!stores_object_with_name(name)) @@ -505,7 +505,7 @@ GeneralDataStorage::get_or_add_object_with_name(const std::string &name, template Type & GeneralDataStorage::get_or_add_object_with_name(const std::string &name, - Arg && argument) + Arg &&argument) { if (!stores_object_with_name(name)) add_unique_copy(name, Type(std::forward(argument))); @@ -518,7 +518,7 @@ GeneralDataStorage::get_or_add_object_with_name(const std::string &name, template Type & GeneralDataStorage::get_or_add_object_with_name(const std::string &name, - Arg && argument, + Arg &&argument, Args &&...arguments) { if (!stores_object_with_name(name)) diff --git a/include/deal.II/algorithms/theta_timestepping.templates.h b/include/deal.II/algorithms/theta_timestepping.templates.h index 8bd0aaeeae..02adf69a2c 100644 --- a/include/deal.II/algorithms/theta_timestepping.templates.h +++ b/include/deal.II/algorithms/theta_timestepping.templates.h @@ -85,7 +85,7 @@ namespace Algorithms LogStream::Prefix prefix("Theta"); - VectorType & solution = *out.entry(0); + VectorType &solution = *out.entry(0); GrowingVectorMemory mem; typename VectorMemory::Pointer aux(mem); aux->reinit(solution); diff --git a/include/deal.II/base/aligned_vector.h b/include/deal.II/base/aligned_vector.h index 76f11f8960..a20feabea9 100644 --- a/include/deal.II/base/aligned_vector.h +++ b/include/deal.II/base/aligned_vector.h @@ -575,7 +575,7 @@ private: */ Deleter(AlignedVector *owning_object, const bool is_shmem_root, - T * aligned_shmem_pointer, + T *aligned_shmem_pointer, MPI_Comm shmem_group_communicator, MPI_Win shmem_window); #endif @@ -633,7 +633,7 @@ private: * identify the MPI window in which the data resides. */ MPISharedMemDeleterAction(const bool is_shmem_root, - T * aligned_shmem_pointer, + T *aligned_shmem_pointer, MPI_Comm shmem_group_communicator, MPI_Win shmem_window); @@ -651,7 +651,7 @@ private: * all ancillary information to destroy this window. */ const bool is_shmem_root; - T * aligned_shmem_pointer; + T *aligned_shmem_pointer; MPI_Comm shmem_group_communicator; MPI_Win shmem_window; }; @@ -876,7 +876,7 @@ namespace internal * elements, otherwise work in serial. */ AlignedVectorInitialize(const std::size_t size, - const T & element, + const T &element, T *const destination) : element_(element) , destination_(destination) @@ -928,7 +928,7 @@ namespace internal } private: - const T & element_; + const T &element_; mutable T *destination_; bool trivial_element; @@ -1055,7 +1055,7 @@ inline AlignedVector::Deleter::Deleter(AlignedVector *owning_object) template inline AlignedVector::Deleter::Deleter(AlignedVector *owning_object, const bool is_shmem_root, - T * aligned_shmem_pointer, + T *aligned_shmem_pointer, MPI_Comm shmem_group_communicator, MPI_Win shmem_window) : deleter_action_object( @@ -1110,7 +1110,7 @@ AlignedVector::Deleter::reset_owning_object( template inline AlignedVector::Deleter::MPISharedMemDeleterAction:: MPISharedMemDeleterAction(const bool is_shmem_root, - T * aligned_shmem_pointer, + T *aligned_shmem_pointer, MPI_Comm shmem_group_communicator, MPI_Win shmem_window) : is_shmem_root(is_shmem_root) @@ -1125,7 +1125,7 @@ template inline void AlignedVector::Deleter::MPISharedMemDeleterAction::delete_array( const AlignedVector *aligned_vector, - T * ptr) + T *ptr) { (void)ptr; // It would be nice to assert that aligned_vector->elements.get() equals ptr, @@ -1260,7 +1260,8 @@ AlignedVector::resize_fast(const size_type new_size) if (new_size == 0) clear(); else if (new_size == old_size) - {} // nothing to do here + { + } // nothing to do here else if (new_size < old_size) { // call destructor on fields that are released, if the type requires it. @@ -1296,7 +1297,8 @@ AlignedVector::resize(const size_type new_size) if (new_size == 0) clear(); else if (new_size == old_size) - {} // nothing to do here + { + } // nothing to do here else if (new_size < old_size) { // call destructor on fields that are released, if the type requires it. @@ -1330,7 +1332,8 @@ AlignedVector::resize(const size_type new_size, const T &init) if (new_size == 0) clear(); else if (new_size == old_size) - {} // nothing to do here + { + } // nothing to do here else if (new_size < old_size) { // call destructor on fields that are released, if the type requires it. @@ -1403,7 +1406,8 @@ AlignedVector::reserve(const size_type new_allocated_size) else if (new_allocated_size == 0) clear(); else // size_alloc < allocated_size - {} // nothing to do here + { + } // nothing to do here } @@ -1712,7 +1716,7 @@ AlignedVector::replicate_across_communicator(const MPI_Comm communicator, // know anything about, and so setting this flag is backward compatible also // to older MPI versions. MPI_Win shmem_window; - void * base_ptr; + void *base_ptr; const MPI_Aint align_by = 64; const MPI_Aint alloc_size = Utilities::MPI::broadcast(shmem_group_communicator, @@ -1786,8 +1790,8 @@ AlignedVector::replicate_across_communicator(const MPI_Comm communicator, // *think* that the following should do given that we do not use base_ptr and // available_space any further after the call to std::align. std::size_t available_space = alloc_size; - void * base_ptr_backup = base_ptr; - T * aligned_shmem_pointer = static_cast( + void *base_ptr_backup = base_ptr; + T *aligned_shmem_pointer = static_cast( std::align(align_by, new_size * sizeof(T), base_ptr, available_space)); Assert(aligned_shmem_pointer != nullptr, ExcInternalError()); @@ -2012,7 +2016,7 @@ inline void AlignedVector::save(Archive &ar, const unsigned int) const { size_type vec_size = size(); - ar & vec_size; + ar &vec_size; if (vec_size > 0) ar &boost::serialization::make_array(elements.get(), vec_size); } @@ -2025,7 +2029,7 @@ inline void AlignedVector::load(Archive &ar, const unsigned int) { size_type vec_size = 0; - ar & vec_size; + ar &vec_size; if (vec_size > 0) { diff --git a/include/deal.II/base/array_view.h b/include/deal.II/base/array_view.h index f5fd75dc0e..fe34a066ad 100644 --- a/include/deal.II/base/array_view.h +++ b/include/deal.II/base/array_view.h @@ -327,7 +327,7 @@ public: * In case the container is empty a nullptr is returned. */ DEAL_II_HOST_DEVICE value_type * - data() const noexcept; + data() const noexcept; /** * Return an iterator pointing to the beginning of the array view. @@ -398,7 +398,7 @@ inline ArrayView::ArrayView() template inline ArrayView::ArrayView( - value_type * starting_element, + value_type *starting_element, const std::size_t n_elements) : starting_element(starting_element) , n_elements(n_elements) @@ -917,7 +917,8 @@ make_array_view(SymmetricTensor &tensor) * @relatesalso ArrayView */ template -inline ArrayView make_array_view(ElementType (&array)[N]) +inline ArrayView +make_array_view(ElementType (&array)[N]) { return ArrayView(array, N); } @@ -1224,7 +1225,7 @@ make_array_view(const std::array &array) */ template inline ArrayView -make_array_view(Table<2, ElementType> & table, +make_array_view(Table<2, ElementType> &table, const typename Table<2, ElementType>::size_type row) { AssertIndexRange(row, table.size()[0]); @@ -1351,7 +1352,7 @@ make_array_view(const LAPACKFullMatrix &matrix) */ template inline ArrayView -make_array_view(const Table<2, ElementType> & table, +make_array_view(const Table<2, ElementType> &table, const typename Table<2, ElementType>::size_type row) { AssertIndexRange(row, table.size()[0]); @@ -1381,7 +1382,7 @@ make_array_view(const Table<2, ElementType> & table, */ template inline ArrayView -make_array_view(Table<2, ElementType> & table, +make_array_view(Table<2, ElementType> &table, const typename Table<2, ElementType>::size_type row, const typename Table<2, ElementType>::size_type starting_column, const std::size_t size_of_view) @@ -1418,7 +1419,7 @@ make_array_view(Table<2, ElementType> & table, */ template inline ArrayView -make_array_view(const Table<2, ElementType> & table, +make_array_view(const Table<2, ElementType> &table, const typename Table<2, ElementType>::size_type row, const typename Table<2, ElementType>::size_type starting_column, const std::size_t size_of_view) diff --git a/include/deal.II/base/auto_derivative_function.h b/include/deal.II/base/auto_derivative_function.h index b4b9ee0ce6..881a602cbd 100644 --- a/include/deal.II/base/auto_derivative_function.h +++ b/include/deal.II/base/auto_derivative_function.h @@ -165,7 +165,7 @@ public: * #DifferenceFormula. */ virtual Tensor<1, dim> - gradient(const Point & p, + gradient(const Point &p, const unsigned int component = 0) const override; /** @@ -175,7 +175,7 @@ public: * #DifferenceFormula. */ virtual void - vector_gradient(const Point & p, + vector_gradient(const Point &p, std::vector> &gradients) const override; /** @@ -189,7 +189,7 @@ public: */ virtual void gradient_list(const std::vector> &points, - std::vector> & gradients, + std::vector> &gradients, const unsigned int component = 0) const override; /** @@ -206,7 +206,7 @@ public: */ virtual void vector_gradient_list( - const std::vector> & points, + const std::vector> &points, std::vector>> &gradients) const override; /** diff --git a/include/deal.II/base/bounding_box_data_out.h b/include/deal.II/base/bounding_box_data_out.h index 4b53879859..c0e1c7e35f 100644 --- a/include/deal.II/base/bounding_box_data_out.h +++ b/include/deal.II/base/bounding_box_data_out.h @@ -87,7 +87,7 @@ public: */ void add_datasets(const std::vector> &datasets, - const std::vector & dataset_names); + const std::vector &dataset_names); protected: // Copy doc @@ -165,7 +165,7 @@ template void BoundingBoxDataOut::add_datasets( const std::vector> &datasets, - const std::vector & names) + const std::vector &names) { AssertDimension(datasets.size(), patches.size()); dataset_names = names; diff --git a/include/deal.II/base/cuda.h b/include/deal.II/base/cuda.h index b85646807f..f7b24fa8a9 100644 --- a/include/deal.II/base/cuda.h +++ b/include/deal.II/base/cuda.h @@ -130,7 +130,7 @@ namespace Utilities template inline void copy_to_host(const ArrayView &in, - ArrayView & out) + ArrayView &out) { AssertDimension(in.size(), out.size()); cudaError_t cuda_error_code = cudaMemcpy(out.data(), @@ -146,7 +146,7 @@ namespace Utilities template inline void copy_to_dev(const ArrayView &in, - ArrayView & out) + ArrayView &out) { AssertDimension(in.size(), out.size()); cudaError_t cuda_error_code = cudaMemcpy(out.data(), diff --git a/include/deal.II/base/data_out_base.h b/include/deal.II/base/data_out_base.h index 8befdcb1b5..2ca24be391 100644 --- a/include/deal.II/base/data_out_base.h +++ b/include/deal.II/base/data_out_base.h @@ -1108,7 +1108,7 @@ namespace DataOutBase /** * Constructor. */ - TecplotFlags(const char * zone_name = nullptr, + TecplotFlags(const char *zone_name = nullptr, const double solution_time = -1.0); /** @@ -1445,7 +1445,7 @@ namespace DataOutBase * average/min/max multiple values at a given vertex. */ void - write_data_set(const std::string & name, + write_data_set(const std::string &name, const unsigned int dimension, const unsigned int set_num, const Table<2, double> &data_vectors); @@ -1691,15 +1691,15 @@ namespace DataOutBase void write_dx( const std::vector> &patches, - const std::vector & data_names, + const std::vector &data_names, const std::vector< std::tuple> - & nonscalar_data_ranges, + &nonscalar_data_ranges, const DXFlags &flags, - std::ostream & out); + std::ostream &out); /** * Write the given list of patches to the output stream in eps format. @@ -1749,15 +1749,15 @@ namespace DataOutBase void write_eps( const std::vector> &patches, - const std::vector & data_names, + const std::vector &data_names, const std::vector< std::tuple> - & nonscalar_data_ranges, + &nonscalar_data_ranges, const EpsFlags &flags, - std::ostream & out); + std::ostream &out); /** * This is the same function as above except for domains that are not two- @@ -1768,15 +1768,15 @@ namespace DataOutBase void write_eps( const std::vector> &patches, - const std::vector & data_names, + const std::vector &data_names, const std::vector< std::tuple> - & nonscalar_data_ranges, + &nonscalar_data_ranges, const EpsFlags &flags, - std::ostream & out); + std::ostream &out); /** @@ -1792,15 +1792,15 @@ namespace DataOutBase void write_gmv( const std::vector> &patches, - const std::vector & data_names, + const std::vector &data_names, const std::vector< std::tuple> - & nonscalar_data_ranges, + &nonscalar_data_ranges, const GmvFlags &flags, - std::ostream & out); + std::ostream &out); /** * Write the given list of patches to the output stream in gnuplot format. @@ -1861,15 +1861,15 @@ namespace DataOutBase void write_gnuplot( const std::vector> &patches, - const std::vector & data_names, + const std::vector &data_names, const std::vector< std::tuple> - & nonscalar_data_ranges, + &nonscalar_data_ranges, const GnuplotFlags &flags, - std::ostream & out); + std::ostream &out); /** * Write the given list of patches to the output stream for the Povray @@ -1920,15 +1920,15 @@ namespace DataOutBase void write_povray( const std::vector> &patches, - const std::vector & data_names, + const std::vector &data_names, const std::vector< std::tuple> - & nonscalar_data_ranges, + &nonscalar_data_ranges, const PovrayFlags &flags, - std::ostream & out); + std::ostream &out); /** * Write the given list of patches to the output stream in Tecplot ASCII @@ -1940,15 +1940,15 @@ namespace DataOutBase void write_tecplot( const std::vector> &patches, - const std::vector & data_names, + const std::vector &data_names, const std::vector< std::tuple> - & nonscalar_data_ranges, + &nonscalar_data_ranges, const TecplotFlags &flags, - std::ostream & out); + std::ostream &out); /** * Write the given list of patches to the output stream in UCD format @@ -1968,15 +1968,15 @@ namespace DataOutBase void write_ucd( const std::vector> &patches, - const std::vector & data_names, + const std::vector &data_names, const std::vector< std::tuple> - & nonscalar_data_ranges, + &nonscalar_data_ranges, const UcdFlags &flags, - std::ostream & out); + std::ostream &out); /** * Write the given list of patches to the output stream in VTK format. The @@ -2001,15 +2001,15 @@ namespace DataOutBase void write_vtk( const std::vector> &patches, - const std::vector & data_names, + const std::vector &data_names, const std::vector< std::tuple> - & nonscalar_data_ranges, + &nonscalar_data_ranges, const VtkFlags &flags, - std::ostream & out); + std::ostream &out); /** @@ -2039,15 +2039,15 @@ namespace DataOutBase void write_vtu( const std::vector> &patches, - const std::vector & data_names, + const std::vector &data_names, const std::vector< std::tuple> - & nonscalar_data_ranges, + &nonscalar_data_ranges, const VtkFlags &flags, - std::ostream & out); + std::ostream &out); /** * This writes the header for the xml based vtu file format. This routine is @@ -2076,15 +2076,15 @@ namespace DataOutBase void write_vtu_main( const std::vector> &patches, - const std::vector & data_names, + const std::vector &data_names, const std::vector< std::tuple> - & nonscalar_data_ranges, + &nonscalar_data_ranges, const VtkFlags &flags, - std::ostream & out); + std::ostream &out); /** * Some visualization programs, such as ParaView, can read several separate @@ -2129,7 +2129,7 @@ namespace DataOutBase */ void write_pvtu_record( - std::ostream & out, + std::ostream &out, const std::vector &piece_names, const std::vector &data_names, const std::vector< @@ -2137,7 +2137,7 @@ namespace DataOutBase unsigned int, std::string, DataComponentInterpretation::DataComponentInterpretation>> - & nonscalar_data_ranges, + &nonscalar_data_ranges, const VtkFlags &flags); /** @@ -2190,7 +2190,7 @@ namespace DataOutBase */ void write_pvd_record( - std::ostream & out, + std::ostream &out, const std::vector> ×_and_names); /** @@ -2205,7 +2205,7 @@ namespace DataOutBase * https://wci.llnl.gov/codes/visit/2.0.0/GettingDataIntoVisIt2.0.0.pdf */ void - write_visit_record(std::ostream & out, + write_visit_record(std::ostream &out, const std::vector &piece_names); /** @@ -2236,7 +2236,7 @@ namespace DataOutBase * https://wci.llnl.gov/codes/visit/2.0.0/GettingDataIntoVisIt2.0.0.pdf */ void - write_visit_record(std::ostream & out, + write_visit_record(std::ostream &out, const std::vector> &piece_names); /** @@ -2301,15 +2301,15 @@ namespace DataOutBase void write_svg( const std::vector> &patches, - const std::vector & data_names, + const std::vector &data_names, const std::vector< std::tuple> - & nonscalar_data_ranges, + &nonscalar_data_ranges, const SvgFlags &flags, - std::ostream & out); + std::ostream &out); /** * Write the given list of patches to the output stream in deal.II @@ -2352,15 +2352,15 @@ namespace DataOutBase void write_deal_II_intermediate( const std::vector> &patches, - const std::vector & data_names, + const std::vector &data_names, const std::vector< std::tuple> - & nonscalar_data_ranges, + &nonscalar_data_ranges, const Deal_II_IntermediateFlags &flags, - std::ostream & out); + std::ostream &out); /** * Like write_deal_II_intermediate() but write all patches from all ranks @@ -2374,15 +2374,15 @@ namespace DataOutBase void write_deal_II_intermediate_in_parallel( const std::vector> &patches, - const std::vector & data_names, + const std::vector &data_names, const std::vector< std::tuple> - & nonscalar_data_ranges, + &nonscalar_data_ranges, const Deal_II_IntermediateFlags &flags, - const std::string & filename, + const std::string &filename, const MPI_Comm comm, const CompressionLevel compression); @@ -2393,9 +2393,9 @@ namespace DataOutBase template void write_hdf5_parallel(const std::vector> &patches, - const DataOutFilter & data_filter, - const DataOutBase::Hdf5Flags & flags, - const std::string & filename, + const DataOutFilter &data_filter, + const DataOutBase::Hdf5Flags &flags, + const std::string &filename, const MPI_Comm comm); /** @@ -2408,10 +2408,10 @@ namespace DataOutBase template void write_hdf5_parallel(const std::vector> &patches, - const DataOutFilter & data_filter, - const DataOutBase::Hdf5Flags & flags, + const DataOutFilter &data_filter, + const DataOutBase::Hdf5Flags &flags, const bool write_mesh_file, - const std::string & mesh_filename, + const std::string &mesh_filename, const std::string &solution_filename, const MPI_Comm comm); @@ -2425,13 +2425,13 @@ namespace DataOutBase void write_filtered_data( const std::vector> &patches, - const std::vector & data_names, + const std::vector &data_names, const std::vector< std::tuple> - & nonscalar_data_ranges, + &nonscalar_data_ranges, DataOutFilter &filtered_data); /** @@ -2779,7 +2779,7 @@ public: * by the write_visit_record() function. */ void - write_pvtu_record(std::ostream & out, + write_pvtu_record(std::ostream &out, const std::vector &piece_names) const; /** @@ -2877,7 +2877,7 @@ public: */ void write_deal_II_intermediate_in_parallel( - const std::string & filename, + const std::string &filename, const MPI_Comm comm, const DataOutBase::CompressionLevel compression) const; @@ -2888,7 +2888,7 @@ public: */ XDMFEntry create_xdmf_entry(const DataOutBase::DataOutFilter &data_filter, - const std::string & h5_filename, + const std::string &h5_filename, const double cur_time, const MPI_Comm comm) const; @@ -2899,8 +2899,8 @@ public: */ XDMFEntry create_xdmf_entry(const DataOutBase::DataOutFilter &data_filter, - const std::string & h5_mesh_filename, - const std::string & h5_solution_filename, + const std::string &h5_mesh_filename, + const std::string &h5_solution_filename, const double cur_time, const MPI_Comm comm) const; @@ -2930,7 +2930,7 @@ public: */ void write_xdmf_file(const std::vector &entries, - const std::string & filename, + const std::string &filename, const MPI_Comm comm) const; /** @@ -2949,7 +2949,7 @@ public: */ void write_hdf5_parallel(const DataOutBase::DataOutFilter &data_filter, - const std::string & filename, + const std::string &filename, const MPI_Comm comm) const; /** @@ -2962,8 +2962,8 @@ public: void write_hdf5_parallel(const DataOutBase::DataOutFilter &data_filter, const bool write_mesh_file, - const std::string & mesh_filename, - const std::string & solution_filename, + const std::string &mesh_filename, + const std::string &solution_filename, const MPI_Comm comm) const; /** @@ -2985,7 +2985,7 @@ public: * default_format. */ void - write(std::ostream & out, + write(std::ostream &out, const DataOutBase::OutputFormat output_format = DataOutBase::default_format) const; @@ -3391,7 +3391,7 @@ public: * cases where solution_filename == mesh_filename, and * dim==spacedim. */ - XDMFEntry(const std::string & filename, + XDMFEntry(const std::string &filename, const double time, const std::uint64_t nodes, const std::uint64_t cells, @@ -3403,7 +3403,7 @@ public: * * @deprecated Use the constructor that additionally takes a ReferenceCell. */ - XDMFEntry(const std::string & filename, + XDMFEntry(const std::string &filename, const double time, const std::uint64_t nodes, const std::uint64_t cells, @@ -3414,8 +3414,8 @@ public: * * @deprecated Use the constructor that additionally takes a ReferenceCell. */ - XDMFEntry(const std::string & mesh_filename, - const std::string & solution_filename, + XDMFEntry(const std::string &mesh_filename, + const std::string &solution_filename, const double time, const std::uint64_t nodes, const std::uint64_t cells, @@ -3425,8 +3425,8 @@ public: * Simplified constructor that calls the complete constructor for * cases where dim==spacedim. */ - XDMFEntry(const std::string & mesh_filename, - const std::string & solution_filename, + XDMFEntry(const std::string &mesh_filename, + const std::string &solution_filename, const double time, const std::uint64_t nodes, const std::uint64_t cells, @@ -3439,8 +3439,8 @@ public: * @deprecated Use the constructor that additionally takes a ReferenceCell. */ DEAL_II_DEPRECATED - XDMFEntry(const std::string & mesh_filename, - const std::string & solution_filename, + XDMFEntry(const std::string &mesh_filename, + const std::string &solution_filename, const double time, const std::uint64_t nodes, const std::uint64_t cells, @@ -3450,8 +3450,8 @@ public: /** * Constructor that sets all members to provided parameters. */ - XDMFEntry(const std::string & mesh_filename, - const std::string & solution_filename, + XDMFEntry(const std::string &mesh_filename, + const std::string &solution_filename, const double time, const std::uint64_t nodes, const std::uint64_t cells, diff --git a/include/deal.II/base/derivative_form.h b/include/deal.II/base/derivative_form.h index fa3d894827..e3a73fa695 100644 --- a/include/deal.II/base/derivative_form.h +++ b/include/deal.II/base/derivative_form.h @@ -452,7 +452,7 @@ DerivativeForm::memory_consumption() template inline Tensor<1, spacedim, typename ProductType::type> apply_transformation(const DerivativeForm<1, dim, spacedim, Number1> &grad_F, - const Tensor<1, dim, Number2> & d_x) + const Tensor<1, dim, Number2> &d_x) { Tensor<1, spacedim, typename ProductType::type> dest; for (unsigned int i = 0; i < spacedim; ++i) @@ -477,7 +477,7 @@ inline DerivativeForm<1, dim, typename ProductType::type> apply_transformation(const DerivativeForm<1, dim, spacedim, Number1> &grad_F, - const Tensor<2, dim, Number2> & D_X) + const Tensor<2, dim, Number2> &D_X) { DerivativeForm<1, spacedim, dim, typename ProductType::type> dest; @@ -503,7 +503,7 @@ apply_transformation(const DerivativeForm<1, dim, spacedim, Number1> &grad_F, template inline Tensor<2, dim, typename ProductType::type> apply_transformation(const DerivativeForm<1, dim, dim, Number1> &grad_F, - const Tensor<2, dim, Number2> & D_X) + const Tensor<2, dim, Number2> &D_X) { Tensor<2, dim, typename ProductType::type> dest; for (unsigned int i = 0; i < dim; ++i) @@ -530,7 +530,7 @@ inline Tensor<1, n_components, Tensor<1, spacedim, typename ProductType::type>> apply_transformation( - const DerivativeForm<1, dim, spacedim, Number1> & grad_F, + const DerivativeForm<1, dim, spacedim, Number1> &grad_F, const Tensor<1, n_components, Tensor<1, dim, Number2>> &D_X) { Tensor<1, diff --git a/include/deal.II/base/exceptions.h b/include/deal.II/base/exceptions.h index 2498abd35c..1b9594e109 100644 --- a/include/deal.II/base/exceptions.h +++ b/include/deal.II/base/exceptions.h @@ -1426,11 +1426,11 @@ namespace deal_II_exceptions template [[noreturn]] void issue_error_noreturn(ExceptionHandling handling, - const char * file, + const char *file, int line, - const char * function, - const char * cond, - const char * exc_name, + const char *function, + const char *cond, + const char *exc_name, ExceptionType e) { // Fill the fields of the exception object @@ -1475,11 +1475,11 @@ namespace deal_II_exceptions */ template void - issue_error_nothrow(const char * file, + issue_error_nothrow(const char *file, int line, - const char * function, - const char * cond, - const char * exc_name, + const char *function, + const char *cond, + const char *exc_name, ExceptionType e) noexcept { static_assert(std::is_base_of_v, diff --git a/include/deal.II/base/flow_function.h b/include/deal.II/base/flow_function.h index e387a2fb8f..13001986d5 100644 --- a/include/deal.II/base/flow_function.h +++ b/include/deal.II/base/flow_function.h @@ -71,7 +71,7 @@ namespace Functions * point. */ virtual void - vector_values(const std::vector> & points, + vector_values(const std::vector> &points, std::vector> &values) const override = 0; /** * Gradients in a structure more suitable for vector valued functions. The @@ -80,7 +80,7 @@ namespace Functions */ virtual void vector_gradients( - const std::vector> & points, + const std::vector> &points, std::vector>> &gradients) const override = 0; /** * Force terms in a structure more suitable for vector valued functions. @@ -91,28 +91,28 @@ namespace Functions * as right hand side in Stokes' equations */ virtual void - vector_laplacians(const std::vector> & points, + vector_laplacians(const std::vector> &points, std::vector> &values) const = 0; virtual void vector_value(const Point &points, - Vector & value) const override; + Vector &value) const override; virtual double - value(const Point & points, + value(const Point &points, const unsigned int component) const override; virtual void vector_value_list(const std::vector> &points, - std::vector> & values) const override; + std::vector> &values) const override; virtual void vector_gradient_list( - const std::vector> & points, + const std::vector> &points, std::vector>> &gradients) const override; /** * The force term in the momentum equation. */ virtual void vector_laplacian_list(const std::vector> &points, - std::vector> & values) const override; + std::vector> &values) const override; /** * Return an estimate for the memory consumption, in bytes, of this object. @@ -163,14 +163,14 @@ namespace Functions virtual ~PoisseuilleFlow() override = default; virtual void - vector_values(const std::vector> & points, + vector_values(const std::vector> &points, std::vector> &values) const override; virtual void vector_gradients( - const std::vector> & points, + const std::vector> &points, std::vector>> &gradients) const override; virtual void - vector_laplacians(const std::vector> & points, + vector_laplacians(const std::vector> &points, std::vector> &values) const override; private: @@ -209,14 +209,14 @@ namespace Functions virtual ~StokesCosine() override = default; virtual void - vector_values(const std::vector> & points, + vector_values(const std::vector> &points, std::vector> &values) const override; virtual void vector_gradients( - const std::vector> & points, + const std::vector> &points, std::vector>> &gradients) const override; virtual void - vector_laplacians(const std::vector> & points, + vector_laplacians(const std::vector> &points, std::vector> &values) const override; private: @@ -250,14 +250,14 @@ namespace Functions StokesLSingularity(); virtual void - vector_values(const std::vector> & points, + vector_values(const std::vector> &points, std::vector> &values) const override; virtual void vector_gradients( - const std::vector> & points, + const std::vector> &points, std::vector>> &gradients) const override; virtual void - vector_laplacians(const std::vector> & points, + vector_laplacians(const std::vector> &points, std::vector> &values) const override; private: @@ -311,14 +311,14 @@ namespace Functions virtual ~Kovasznay() override = default; virtual void - vector_values(const std::vector> & points, + vector_values(const std::vector> &points, std::vector> &values) const override; virtual void vector_gradients( - const std::vector> & points, + const std::vector> &points, std::vector>> &gradients) const override; virtual void - vector_laplacians(const std::vector> & points, + vector_laplacians(const std::vector> &points, std::vector> &values) const override; /// The value of lambda. diff --git a/include/deal.II/base/function.h b/include/deal.II/base/function.h index 1ad351076b..969ab07701 100644 --- a/include/deal.II/base/function.h +++ b/include/deal.II/base/function.h @@ -244,7 +244,7 @@ public: */ virtual void value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component = 0) const; /** @@ -258,7 +258,7 @@ public: * separately, to fill the output array. */ virtual void - vector_value_list(const std::vector> & points, + vector_value_list(const std::vector> &points, std::vector> &values) const; /** @@ -270,7 +270,7 @@ public: * can be reimplemented in derived classes to speed up performance. */ virtual void - vector_values(const std::vector> & points, + vector_values(const std::vector> &points, std::vector> &values) const; /** @@ -285,7 +285,7 @@ public: */ virtual void vector_gradient( - const Point & p, + const Point &p, std::vector> &gradients) const; /** @@ -295,7 +295,7 @@ public: * array. */ virtual void - gradient_list(const std::vector> & points, + gradient_list(const std::vector> &points, std::vector> &gradients, const unsigned int component = 0) const; @@ -309,7 +309,7 @@ public: */ virtual void vector_gradients( - const std::vector> & points, + const std::vector> &points, std::vector>> &gradients) const; /** @@ -323,7 +323,7 @@ public: */ virtual void vector_gradient_list( - const std::vector> & points, + const std::vector> &points, std::vector>> &gradients) const; /** @@ -344,14 +344,14 @@ public: */ virtual void laplacian_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component = 0) const; /** * Compute the Laplacians of all components at a set of points. */ virtual void - vector_laplacian_list(const std::vector> & points, + vector_laplacian_list(const std::vector> &points, std::vector> &values) const; /** @@ -367,14 +367,14 @@ public: */ virtual void vector_hessian( - const Point & p, + const Point &p, std::vector> &values) const; /** * Compute the Hessian of one component at a set of points. */ virtual void - hessian_list(const std::vector> & points, + hessian_list(const std::vector> &points, std::vector> &values, const unsigned int component = 0) const; @@ -383,7 +383,7 @@ public: */ virtual void vector_hessian_list( - const std::vector> & points, + const std::vector> &points, std::vector>> &values) const; @@ -442,45 +442,45 @@ namespace Functions value(const Point &p, const unsigned int component = 0) const override; virtual void - vector_value(const Point & p, + vector_value(const Point &p, Vector &return_value) const override; virtual void value_list(const std::vector> &points, - std::vector & return_values, + std::vector &return_values, const unsigned int component = 0) const override; virtual void vector_value_list( - const std::vector> & points, + const std::vector> &points, std::vector> &return_values) const override; virtual Tensor<1, dim, RangeNumberType> - gradient(const Point & p, + gradient(const Point &p, const unsigned int component = 0) const override; virtual void vector_gradient( - const Point & p, + const Point &p, std::vector> &gradients) const override; virtual void - gradient_list(const std::vector> & points, + gradient_list(const std::vector> &points, std::vector> &gradients, const unsigned int component = 0) const override; virtual void vector_gradient_list( - const std::vector> & points, + const std::vector> &points, std::vector>> &gradients) const override; virtual SymmetricTensor<2, dim, RangeNumberType> - hessian(const Point & point, + hessian(const Point &point, const unsigned int component = 0) const override; virtual RangeNumberType - laplacian(const Point & point, + laplacian(const Point &point, const unsigned int component = 0) const override; virtual std::size_t @@ -545,21 +545,21 @@ namespace Functions * @copydoc Function::gradient() */ virtual Tensor<1, dim, RangeNumberType> - gradient(const Point & p, + gradient(const Point &p, const unsigned int component = 0) const override; /** * @copydoc Function::laplacian() */ virtual RangeNumberType - laplacian(const Point & p, + laplacian(const Point &p, const unsigned int component = 0) const override; /** * @copydoc Function::hessian() */ virtual SymmetricTensor<2, dim, RangeNumberType> - hessian(const Point & p, + hessian(const Point &p, const unsigned int component = 0) const override; }; } // namespace Functions @@ -630,7 +630,7 @@ public: * Return the value of the function at the given point for all components. */ virtual void - vector_value(const Point & p, + vector_value(const Point &p, Vector &return_value) const override; /** @@ -641,7 +641,7 @@ public: */ virtual void vector_value_list( - const std::vector> & points, + const std::vector> &points, std::vector> &values) const override; /** @@ -901,7 +901,7 @@ public: * values shall have the right size beforehand, i.e. #n_components. */ virtual void - vector_value(const Point & p, + vector_value(const Point &p, Vector &values) const override; private: @@ -979,7 +979,7 @@ public: */ explicit FunctionFromFunctionObjects( const std::vector &)>> - & values, + &values, const double initial_time = 0.0); /** @@ -995,7 +995,7 @@ public: &values, const std::vector< std::function(const Point &)>> - & gradients, + &gradients, const double initial_time = 0.0); @@ -1015,7 +1015,7 @@ public: * component. */ virtual Tensor<1, dim, RangeNumberType> - gradient(const Point & p, + gradient(const Point &p, const unsigned int component = 0) const override; /** @@ -1133,7 +1133,7 @@ public: * values shall have the right size beforehand, i.e. #n_components. */ virtual void - vector_value(const Point & p, + vector_value(const Point &p, Vector &values) const override; /** @@ -1145,7 +1145,7 @@ public: */ virtual void vector_value_list( - const std::vector> & points, + const std::vector> &points, std::vector> &value_list) const override; /** @@ -1153,7 +1153,7 @@ public: * point. */ virtual Tensor<1, dim, RangeNumberType> - gradient(const Point & p, + gradient(const Point &p, const unsigned int component = 0) const override; /** @@ -1161,7 +1161,7 @@ public: */ virtual void vector_gradient( - const Point & p, + const Point &p, std::vector> &gradients) const override; /** @@ -1171,7 +1171,7 @@ public: * array. */ virtual void - gradient_list(const std::vector> & points, + gradient_list(const std::vector> &points, std::vector> &gradients, const unsigned int component = 0) const override; diff --git a/include/deal.II/base/function.templates.h b/include/deal.II/base/function.templates.h index 3ff9abe5cd..b12d3e8640 100644 --- a/include/deal.II/base/function.templates.h +++ b/include/deal.II/base/function.templates.h @@ -72,7 +72,7 @@ Function::value(const Point &, template void -Function::vector_value(const Point & p, +Function::vector_value(const Point &p, Vector &v) const { AssertDimension(v.size(), this->n_components); @@ -85,7 +85,7 @@ template void Function::value_list( const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component) const { // check whether component is in the valid range is up to the derived @@ -101,7 +101,7 @@ Function::value_list( template void Function::vector_value_list( - const std::vector> & points, + const std::vector> &points, std::vector> &values) const { // check whether component is in the valid range is up to the derived @@ -117,7 +117,7 @@ Function::vector_value_list( template void Function::vector_values( - const std::vector> & points, + const std::vector> &points, std::vector> &values) const { const unsigned int n = this->n_components; @@ -140,7 +140,7 @@ Function::gradient(const Point &, template void Function::vector_gradient( - const Point & p, + const Point &p, std::vector> &v) const { AssertDimension(v.size(), this->n_components); @@ -152,7 +152,7 @@ Function::vector_gradient( template void Function::gradient_list( - const std::vector> & points, + const std::vector> &points, std::vector> &gradients, const unsigned int component) const { @@ -167,7 +167,7 @@ Function::gradient_list( template void Function::vector_gradient_list( - const std::vector> & points, + const std::vector> &points, std::vector>> &gradients) const { Assert(gradients.size() == points.size(), @@ -185,7 +185,7 @@ Function::vector_gradient_list( template void Function::vector_gradients( - const std::vector> & points, + const std::vector> &points, std::vector>> &values) const { const unsigned int n = this->n_components; @@ -221,7 +221,7 @@ template void Function::laplacian_list( const std::vector> &points, - std::vector & laplacians, + std::vector &laplacians, const unsigned int component) const { // check whether component is in the valid range is up to the derived @@ -237,7 +237,7 @@ Function::laplacian_list( template void Function::vector_laplacian_list( - const std::vector> & points, + const std::vector> &points, std::vector> &laplacians) const { // check whether component is in the valid range is up to the derived @@ -263,7 +263,7 @@ Function::hessian(const Point &, template void Function::vector_hessian( - const Point & p, + const Point &p, std::vector> &v) const { AssertDimension(v.size(), this->n_components); @@ -275,7 +275,7 @@ Function::vector_hessian( template void Function::hessian_list( - const std::vector> & points, + const std::vector> &points, std::vector> &hessians, const unsigned int component) const { @@ -290,7 +290,7 @@ Function::hessian_list( template void Function::vector_hessian_list( - const std::vector> & points, + const std::vector> &points, std::vector>> &hessians) const { @@ -400,7 +400,7 @@ namespace Functions void ConstantFunction::value_list( const std::vector> &points, - std::vector & return_values, + std::vector &return_values, const unsigned int component) const { // To avoid warning of unused parameter @@ -419,7 +419,7 @@ namespace Functions template void ConstantFunction::vector_value_list( - const std::vector> & points, + const std::vector> &points, std::vector> &return_values) const { Assert(return_values.size() == points.size(), @@ -476,7 +476,7 @@ namespace Functions template void ConstantFunction::gradient_list( - const std::vector> & points, + const std::vector> &points, std::vector> &gradients, const unsigned int /*component*/) const { @@ -492,7 +492,7 @@ namespace Functions template void ConstantFunction::vector_gradient_list( - const std::vector> & points, + const std::vector> &points, std::vector>> &gradients) const { Assert(gradients.size() == points.size(), @@ -546,7 +546,7 @@ namespace Functions template RangeNumberType IdentityFunction::value( - const Point & p, + const Point &p, const unsigned int component) const { AssertIndexRange(component, this->n_components); @@ -662,7 +662,7 @@ ComponentSelectFunction::vector_value( template void ComponentSelectFunction::vector_value_list( - const std::vector> & points, + const std::vector> &points, std::vector> &values) const { Assert(values.size() == points.size(), @@ -702,7 +702,7 @@ ScalarFunctionFromFunctionObject:: template RangeNumberType ScalarFunctionFromFunctionObject::value( - const Point & p, + const Point &p, const unsigned int component) const { (void)component; @@ -731,7 +731,7 @@ VectorFunctionFromScalarFunctionObject:: template RangeNumberType VectorFunctionFromScalarFunctionObject::value( - const Point & p, + const Point &p, const unsigned int component) const { AssertIndexRange(component, this->n_components); @@ -747,7 +747,7 @@ VectorFunctionFromScalarFunctionObject::value( template void VectorFunctionFromScalarFunctionObject::vector_value( - const Point & p, + const Point &p, Vector &values) const { AssertDimension(values.size(), this->n_components); @@ -784,7 +784,7 @@ VectorFunctionFromTensorFunction:: template inline RangeNumberType VectorFunctionFromTensorFunction::value( - const Point & p, + const Point &p, const unsigned int component) const { AssertIndexRange(component, this->n_components); @@ -808,7 +808,7 @@ VectorFunctionFromTensorFunction::value( template inline void VectorFunctionFromTensorFunction::vector_value( - const Point & p, + const Point &p, Vector &values) const { Assert(values.size() == this->n_components, @@ -840,7 +840,7 @@ VectorFunctionFromTensorFunction::vector_value( template void VectorFunctionFromTensorFunction::vector_value_list( - const std::vector> & points, + const std::vector> &points, std::vector> &value_list) const { Assert(value_list.size() == points.size(), @@ -856,7 +856,7 @@ VectorFunctionFromTensorFunction::vector_value_list( template inline Tensor<1, dim, RangeNumberType> VectorFunctionFromTensorFunction::gradient( - const Point & p, + const Point &p, const unsigned int component) const { AssertIndexRange(component, this->n_components); @@ -880,7 +880,7 @@ VectorFunctionFromTensorFunction::gradient( template void VectorFunctionFromTensorFunction::vector_gradient( - const Point & p, + const Point &p, std::vector> &gradients) const { AssertDimension(gradients.size(), this->n_components); @@ -893,7 +893,7 @@ VectorFunctionFromTensorFunction::vector_gradient( template void VectorFunctionFromTensorFunction::gradient_list( - const std::vector> & points, + const std::vector> &points, std::vector> &gradients, const unsigned int component) const { @@ -910,7 +910,7 @@ VectorFunctionFromTensorFunction::gradient_list( template void VectorFunctionFromTensorFunction::vector_gradient_list( - const std::vector> & points, + const std::vector> &points, std::vector>> &gradients) const { Assert(gradients.size() == points.size(), @@ -928,7 +928,7 @@ VectorFunctionFromTensorFunction::vector_gradient_list( template void VectorFunctionFromTensorFunction::vector_gradients( - const std::vector> & points, + const std::vector> &points, std::vector>> &gradients) const { const unsigned int n = this->n_components; @@ -965,7 +965,7 @@ FunctionFromFunctionObjects::FunctionFromFunctionObjects( const std::vector &)>> &values, const std::vector< std::function(const Point &)>> - & gradients, + &gradients, const double initial_time) : Function(values.size(), initial_time) , function_values(values) @@ -977,7 +977,7 @@ FunctionFromFunctionObjects::FunctionFromFunctionObjects( template RangeNumberType FunctionFromFunctionObjects::value( - const Point & p, + const Point &p, const unsigned int component) const { AssertIndexRange(component, this->n_components); @@ -992,7 +992,7 @@ FunctionFromFunctionObjects::value( template Tensor<1, dim, RangeNumberType> FunctionFromFunctionObjects::gradient( - const Point & p, + const Point &p, const unsigned int component) const { AssertIndexRange(component, this->n_components); diff --git a/include/deal.II/base/function_bessel.h b/include/deal.II/base/function_bessel.h index e429910288..42a0ddfa0c 100644 --- a/include/deal.II/base/function_bessel.h +++ b/include/deal.II/base/function_bessel.h @@ -43,21 +43,21 @@ namespace Functions const Point center = Point()); virtual double - value(const Point & points, + value(const Point &points, const unsigned int component = 0) const override; virtual void value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component = 0) const override; virtual Tensor<1, dim> - gradient(const Point & p, + gradient(const Point &p, const unsigned int component = 0) const override; virtual void gradient_list(const std::vector> &points, - std::vector> & gradients, + std::vector> &gradients, const unsigned int component = 0) const override; private: diff --git a/include/deal.II/base/function_cspline.h b/include/deal.II/base/function_cspline.h index 5ce2920069..e3f2314ae7 100644 --- a/include/deal.II/base/function_cspline.h +++ b/include/deal.II/base/function_cspline.h @@ -85,19 +85,19 @@ namespace Functions const std::vector &interpolation_values); virtual double - value(const Point & point, + value(const Point &point, const unsigned int component = 0) const override; virtual Tensor<1, dim> - gradient(const Point & p, + gradient(const Point &p, const unsigned int component = 0) const override; virtual SymmetricTensor<2, dim> - hessian(const Point & p, + hessian(const Point &p, const unsigned int component = 0) const override; virtual double - laplacian(const Point & p, + laplacian(const Point &p, const unsigned int component = 0) const override; /** diff --git a/include/deal.II/base/function_derivative.h b/include/deal.II/base/function_derivative.h index b9c7de24dc..27ce9f72c2 100644 --- a/include/deal.II/base/function_derivative.h +++ b/include/deal.II/base/function_derivative.h @@ -50,7 +50,7 @@ public: * the difference formula. */ FunctionDerivative(const Function &f, - const Point & direction, + const Point &direction, const double h = 1.e-6); /** @@ -65,7 +65,7 @@ public: * The number of quadrature point must still be the same, when values are * accessed. */ - FunctionDerivative(const Function & f, + FunctionDerivative(const Function &f, const std::vector> &direction, const double h = 1.e-6); @@ -94,7 +94,7 @@ public: virtual void value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component = 0) const override; /** diff --git a/include/deal.II/base/function_lib.h b/include/deal.II/base/function_lib.h index bf3e239ec2..3a9baf46db 100644 --- a/include/deal.II/base/function_lib.h +++ b/include/deal.II/base/function_lib.h @@ -57,24 +57,24 @@ namespace Functions vector_value(const Point &p, Vector &values) const override; virtual void value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component = 0) const override; virtual Tensor<1, dim> - gradient(const Point & p, + gradient(const Point &p, const unsigned int component = 0) const override; virtual void - vector_gradient(const Point & p, + vector_gradient(const Point &p, std::vector> &gradient) const override; virtual void gradient_list(const std::vector> &points, - std::vector> & gradients, + std::vector> &gradients, const unsigned int component = 0) const override; virtual double - laplacian(const Point & p, + laplacian(const Point &p, const unsigned int component = 0) const override; virtual void laplacian_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component = 0) const override; }; @@ -95,20 +95,20 @@ namespace Functions virtual void value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component = 0) const override; virtual void vector_value_list(const std::vector> &points, - std::vector> & values) const override; + std::vector> &values) const override; virtual Tensor<1, dim> - gradient(const Point & p, + gradient(const Point &p, const unsigned int component = 0) const override; virtual void gradient_list(const std::vector> &points, - std::vector> & gradients, + std::vector> &gradients, const unsigned int component = 0) const override; virtual void @@ -120,7 +120,7 @@ namespace Functions * Laplacian of the function at one point. */ virtual double - laplacian(const Point & p, + laplacian(const Point &p, const unsigned int component = 0) const override; /** @@ -128,7 +128,7 @@ namespace Functions */ virtual void laplacian_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component = 0) const override; }; @@ -169,14 +169,14 @@ namespace Functions */ virtual void value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component = 0) const override; /** * Gradient at a single point. */ virtual Tensor<1, dim> - gradient(const Point & p, + gradient(const Point &p, const unsigned int component = 0) const override; /** @@ -184,14 +184,14 @@ namespace Functions */ virtual void gradient_list(const std::vector> &points, - std::vector> & gradients, + std::vector> &gradients, const unsigned int component = 0) const override; /** * Laplacian at a single point. */ virtual double - laplacian(const Point & p, + laplacian(const Point &p, const unsigned int component = 0) const override; /** @@ -199,7 +199,7 @@ namespace Functions */ virtual void laplacian_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component = 0) const override; private: @@ -230,43 +230,43 @@ namespace Functions virtual void value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component = 0) const override; virtual void vector_value_list(const std::vector> &points, - std::vector> & values) const override; + std::vector> &values) const override; virtual Tensor<1, dim> - gradient(const Point & p, + gradient(const Point &p, const unsigned int component = 0) const override; virtual void gradient_list(const std::vector> &points, - std::vector> & gradients, + std::vector> &gradients, const unsigned int component = 0) const override; virtual double - laplacian(const Point & p, + laplacian(const Point &p, const unsigned int component = 0) const override; virtual void laplacian_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component = 0) const override; /** * Second derivatives at a single point. */ virtual SymmetricTensor<2, dim> - hessian(const Point & p, + hessian(const Point &p, const unsigned int component = 0) const override; /** * Second derivatives at multiple points. */ virtual void - hessian_list(const std::vector> & points, + hessian_list(const std::vector> &points, std::vector> &hessians, const unsigned int component = 0) const override; }; @@ -298,24 +298,24 @@ namespace Functions vector_value(const Point &p, Vector &values) const override; virtual void value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component) const override; virtual void vector_value_list(const std::vector> &points, - std::vector> & values) const override; + std::vector> &values) const override; virtual Tensor<1, dim> gradient(const Point &p, const unsigned int component) const override; virtual void gradient_list(const std::vector> &points, - std::vector> & gradients, + std::vector> &gradients, const unsigned int component) const override; virtual void vector_gradient_list( - const std::vector> & points, + const std::vector> &points, std::vector>> &gradients) const override; virtual double @@ -344,14 +344,14 @@ namespace Functions */ virtual void value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component = 0) const override; /** * Gradient at a single point. */ virtual Tensor<1, dim> - gradient(const Point & p, + gradient(const Point &p, const unsigned int component = 0) const override; /** @@ -359,14 +359,14 @@ namespace Functions */ virtual void gradient_list(const std::vector> &points, - std::vector> & gradients, + std::vector> &gradients, const unsigned int component = 0) const override; /** * Laplacian at a single point. */ virtual double - laplacian(const Point & p, + laplacian(const Point &p, const unsigned int component = 0) const override; /** @@ -374,7 +374,7 @@ namespace Functions */ virtual void laplacian_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component = 0) const override; }; @@ -415,7 +415,7 @@ namespace Functions virtual void value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component = 0) const override; virtual void @@ -423,12 +423,12 @@ namespace Functions std::vector> &values) const override; virtual Tensor<1, 2> - gradient(const Point<2> & p, + gradient(const Point<2> &p, const unsigned int component = 0) const override; virtual void gradient_list(const std::vector> &points, - std::vector> & gradients, + std::vector> &gradients, const unsigned int component = 0) const override; virtual void @@ -437,12 +437,12 @@ namespace Functions std::vector>> &) const override; virtual double - laplacian(const Point<2> & p, + laplacian(const Point<2> &p, const unsigned int component = 0) const override; virtual void laplacian_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component = 0) const override; }; @@ -468,7 +468,7 @@ namespace Functions virtual void value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component) const override; virtual void @@ -480,7 +480,7 @@ namespace Functions virtual void gradient_list(const std::vector> &points, - std::vector> & gradients, + std::vector> &gradients, const unsigned int component) const override; virtual void @@ -493,7 +493,7 @@ namespace Functions virtual void laplacian_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component) const override; }; @@ -513,20 +513,20 @@ namespace Functions virtual void value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component = 0) const override; virtual void vector_value_list(const std::vector> &points, - std::vector> & values) const override; + std::vector> &values) const override; virtual Tensor<1, dim> - gradient(const Point & p, + gradient(const Point &p, const unsigned int component = 0) const override; virtual void gradient_list(const std::vector> &points, - std::vector> & gradients, + std::vector> &gradients, const unsigned int component = 0) const override; virtual void @@ -535,12 +535,12 @@ namespace Functions std::vector>> &) const override; virtual double - laplacian(const Point & p, + laplacian(const Point &p, const unsigned int component = 0) const override; virtual void laplacian_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component = 0) const override; }; @@ -558,7 +558,7 @@ namespace Functions virtual void value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component = 0) const override; virtual void @@ -566,12 +566,12 @@ namespace Functions std::vector> &values) const override; virtual Tensor<1, 2> - gradient(const Point<2> & p, + gradient(const Point<2> &p, const unsigned int component = 0) const override; virtual void gradient_list(const std::vector> &points, - std::vector> & gradients, + std::vector> &gradients, const unsigned int component = 0) const override; virtual void @@ -580,12 +580,12 @@ namespace Functions std::vector>> &) const override; virtual double - laplacian(const Point<2> & p, + laplacian(const Point<2> &p, const unsigned int component = 0) const override; virtual void laplacian_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component = 0) const override; }; @@ -626,14 +626,14 @@ namespace Functions */ virtual void value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component = 0) const override; /** * Gradient at one point. */ virtual Tensor<1, dim> - gradient(const Point & p, + gradient(const Point &p, const unsigned int component = 0) const override; /** @@ -641,14 +641,14 @@ namespace Functions */ virtual void gradient_list(const std::vector> &points, - std::vector> & gradients, + std::vector> &gradients, const unsigned int component = 0) const override; /** * Laplacian of the function at one point. */ virtual double - laplacian(const Point & p, + laplacian(const Point &p, const unsigned int component = 0) const override; /** @@ -656,7 +656,7 @@ namespace Functions */ virtual void laplacian_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component = 0) const override; /** @@ -732,14 +732,14 @@ namespace Functions * given point. */ virtual Tensor<1, dim> - gradient(const Point & p, + gradient(const Point &p, const unsigned int component = 0) const override; /** * Compute the Laplacian of a given component at point p. */ virtual double - laplacian(const Point & p, + laplacian(const Point &p, const unsigned int component = 0) const override; private: @@ -786,14 +786,14 @@ namespace Functions * given point. */ virtual Tensor<1, dim> - gradient(const Point & p, + gradient(const Point &p, const unsigned int component = 0) const override; /** * Compute the Laplacian of a given component at point p. */ virtual double - laplacian(const Point & p, + laplacian(const Point &p, const unsigned int component = 0) const override; private: @@ -821,7 +821,7 @@ namespace Functions * argument. */ FourierSineSum(const std::vector> &fourier_coefficients, - const std::vector & weights); + const std::vector &weights); /** * Return the value of the function at the given point. Unless there is @@ -837,14 +837,14 @@ namespace Functions * given point. */ virtual Tensor<1, dim> - gradient(const Point & p, + gradient(const Point &p, const unsigned int component = 0) const override; /** * Compute the Laplacian of a given component at point p. */ virtual double - laplacian(const Point & p, + laplacian(const Point &p, const unsigned int component = 0) const override; private: @@ -875,7 +875,7 @@ namespace Functions * argument. */ FourierCosineSum(const std::vector> &fourier_coefficients, - const std::vector & weights); + const std::vector &weights); /** * Return the value of the function at the given point. Unless there is @@ -891,14 +891,14 @@ namespace Functions * given point. */ virtual Tensor<1, dim> - gradient(const Point & p, + gradient(const Point &p, const unsigned int component = 0) const override; /** * Compute the Laplacian of a given component at point p. */ virtual double - laplacian(const Point & p, + laplacian(const Point &p, const unsigned int component = 0) const override; private: @@ -1048,7 +1048,7 @@ namespace Functions */ CutOffFunctionTensorProduct( double radius = 1.0, - const Point & center = Point(), + const Point ¢er = Point(), const unsigned int n_components = 1, const unsigned int select = CutOffFunctionBase::no_component, const bool integrate_to_one = false); @@ -1083,7 +1083,7 @@ namespace Functions * Function gradient at one point. */ virtual Tensor<1, dim> - gradient(const Point & p, + gradient(const Point &p, const unsigned int component = 0) const override; private: @@ -1130,7 +1130,7 @@ namespace Functions */ virtual void value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component = 0) const override; /** @@ -1138,7 +1138,7 @@ namespace Functions */ virtual void vector_value_list(const std::vector> &points, - std::vector> & values) const override; + std::vector> &values) const override; }; @@ -1178,7 +1178,7 @@ namespace Functions */ virtual void value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component = 0) const override; /** @@ -1186,7 +1186,7 @@ namespace Functions */ virtual void vector_value_list(const std::vector> &points, - std::vector> & values) const override; + std::vector> &values) const override; }; @@ -1227,7 +1227,7 @@ namespace Functions */ virtual void value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component = 0) const override; /** @@ -1235,13 +1235,13 @@ namespace Functions */ virtual void vector_value_list(const std::vector> &points, - std::vector> & values) const override; + std::vector> &values) const override; /** * Function gradient at one point. */ virtual Tensor<1, dim> - gradient(const Point & p, + gradient(const Point &p, const unsigned int component = 0) const override; }; @@ -1283,7 +1283,7 @@ namespace Functions */ virtual void value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component = 0) const override; /** @@ -1291,13 +1291,13 @@ namespace Functions */ virtual void vector_value_list(const std::vector> &points, - std::vector> & values) const override; + std::vector> &values) const override; /** * Function gradient at one point. */ virtual Tensor<1, dim> - gradient(const Point & p, + gradient(const Point &p, const unsigned int component = 0) const override; }; @@ -1349,14 +1349,14 @@ namespace Functions */ virtual void value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component = 0) const override; /** * Function gradient at one point. */ virtual Tensor<1, dim, Number> - gradient(const Point & p, + gradient(const Point &p, const unsigned int component = 0) const override; private: @@ -1472,7 +1472,7 @@ namespace Functions */ InterpolatedTensorProductGridData( const std::array, dim> &coordinate_values, - const Table & data_values); + const Table &data_values); /** * Like the previous constructor, but take the arguments as rvalue @@ -1485,7 +1485,7 @@ namespace Functions */ InterpolatedTensorProductGridData( std::array, dim> &&coordinate_values, - Table && data_values); + Table &&data_values); /** * Compute the value of the function set by bilinear interpolation of the @@ -1512,7 +1512,7 @@ namespace Functions * is extended by a constant and so its gradient is extended by 0. */ virtual Tensor<1, dim> - gradient(const Point & p, + gradient(const Point &p, const unsigned int component = 0) const override; /** @@ -1609,8 +1609,8 @@ namespace Functions */ InterpolatedUniformGridData( const std::array, dim> &interval_endpoints, - const std::array & n_subintervals, - const Table & data_values); + const std::array &n_subintervals, + const Table &data_values); /** * Like the previous constructor, but take the arguments as rvalue @@ -1623,8 +1623,8 @@ namespace Functions */ InterpolatedUniformGridData( std::array, dim> &&interval_endpoints, - std::array && n_subintervals, - Table && data_values); + std::array &&n_subintervals, + Table &&data_values); /** * Compute the value of the function set by bilinear interpolation of the @@ -1651,7 +1651,7 @@ namespace Functions * by a constant whose gradient is then of course zero. */ virtual Tensor<1, dim> - gradient(const Point & p, + gradient(const Point &p, const unsigned int component = 0) const override; /** @@ -1709,7 +1709,7 @@ namespace Functions * x_{d}^{\alpha_{i,d}}$. The i-th element of the coefficients vector * contains the coefficient $a_{i}$ for the i-th monomial. */ - Polynomial(const Table<2, double> & exponents, + Polynomial(const Table<2, double> &exponents, const std::vector &coefficients); /** @@ -1724,14 +1724,14 @@ namespace Functions */ virtual void value_list(const std::vector> &points, - std::vector & values, + std::vector &values, const unsigned int component = 0) const override; /** * Function gradient at one point. */ virtual Tensor<1, dim> - gradient(const Point & p, + gradient(const Point &p, const unsigned int component = 0) const override; /** diff --git a/include/deal.II/base/function_parser.h b/include/deal.II/base/function_parser.h index d2654c2b1e..8067fd2a76 100644 --- a/include/deal.II/base/function_parser.h +++ b/include/deal.II/base/function_parser.h @@ -309,9 +309,9 @@ public: * do not consider time. */ virtual void - initialize(const std::string & vars, + initialize(const std::string &vars, const std::vector &expressions, - const ConstMap & constants, + const ConstMap &constants, const bool time_dependent = false) override; /** @@ -324,7 +324,7 @@ public: void initialize(const std::string &vars, const std::string &expression, - const ConstMap & constants, + const ConstMap &constants, const bool time_dependent = false); /** diff --git a/include/deal.II/base/function_restriction.h b/include/deal.II/base/function_restriction.h index 46bc1ffb62..a9c3fc9054 100644 --- a/include/deal.II/base/function_restriction.h +++ b/include/deal.II/base/function_restriction.h @@ -66,11 +66,11 @@ namespace Functions value(const Point &point, const unsigned int component) const override; Tensor<1, dim> - gradient(const Point & point, + gradient(const Point &point, const unsigned int component) const override; SymmetricTensor<2, dim> - hessian(const Point & point, + hessian(const Point &point, const unsigned int component) const override; private: @@ -120,13 +120,13 @@ namespace Functions */ PointRestriction(const Function &function, const unsigned int open_direction, - const Point & point); + const Point &point); double value(const Point<1> &point, const unsigned int component) const override; Tensor<1, 1> - gradient(const Point<1> & point, + gradient(const Point<1> &point, const unsigned int component) const override; SymmetricTensor<2, 1> @@ -164,7 +164,7 @@ namespace internal */ template Point - create_higher_dim_point(const Point & point, + create_higher_dim_point(const Point &point, const unsigned int component_in_dim_plus_1, const double coordinate_value); } // namespace internal diff --git a/include/deal.II/base/function_signed_distance.h b/include/deal.II/base/function_signed_distance.h index bca2043791..e2dc922894 100644 --- a/include/deal.II/base/function_signed_distance.h +++ b/include/deal.II/base/function_signed_distance.h @@ -55,7 +55,7 @@ namespace Functions Sphere(const Point ¢er = Point(), const double radius = 1); double - value(const Point & point, + value(const Point &point, const unsigned int component = 0) const override; /** @@ -68,7 +68,7 @@ namespace Functions * singularity. */ Tensor<1, dim> - gradient(const Point & point, + gradient(const Point &point, const unsigned int component = 0) const override; /** @@ -81,7 +81,7 @@ namespace Functions * singularity. */ SymmetricTensor<2, dim> - hessian(const Point & point, + hessian(const Point &point, const unsigned int component = 0) const override; private: @@ -111,7 +111,7 @@ namespace Functions Plane(const Point &point, const Tensor<1, dim> &normal); double - value(const Point & point, + value(const Point &point, const unsigned int component = 0) const override; Tensor<1, dim> @@ -153,13 +153,13 @@ namespace Functions * @param tolerance Tolerance of the distance computation. * @param max_iter Max. number of iteration of the distance computation algorithm. */ - Ellipsoid(const Point & center, + Ellipsoid(const Point ¢er, const std::array &radii, const double tolerance = 1e-14, const unsigned int max_iter = 10); double - value(const Point & point, + value(const Point &point, const unsigned int component = 0) const override; /** @@ -254,7 +254,7 @@ namespace Functions * rectangle. */ double - value(const Point & p, + value(const Point &p, const unsigned int component = 0) const override; private: @@ -303,7 +303,7 @@ namespace Functions * disk. */ double - value(const Point & p, + value(const Point &p, const unsigned int component = 0) const override; private: diff --git a/include/deal.II/base/function_spherical.h b/include/deal.II/base/function_spherical.h index 6964e5e8ca..2459155efe 100644 --- a/include/deal.II/base/function_spherical.h +++ b/include/deal.II/base/function_spherical.h @@ -52,7 +52,7 @@ namespace Functions * quantities -- not as the components of a vector that will be * re-interpreted in a different coordinate system. */ - Spherical(const Point & center = Point(), + Spherical(const Point ¢er = Point(), const unsigned int n_components = 1); /** @@ -62,7 +62,7 @@ namespace Functions * calls svalue() with it, and returns the result. */ virtual double - value(const Point & point, + value(const Point &point, const unsigned int component = 0) const override; /** @@ -73,7 +73,7 @@ namespace Functions * coordinates. */ virtual Tensor<1, dim> - gradient(const Point & p, + gradient(const Point &p, const unsigned int component = 0) const override; /** @@ -84,7 +84,7 @@ namespace Functions * Cartesian coordinates. */ virtual SymmetricTensor<2, dim> - hessian(const Point & p, + hessian(const Point &p, const unsigned int component = 0) const override; /** diff --git a/include/deal.II/base/function_tools.h b/include/deal.II/base/function_tools.h index e7f3c179fb..c43f7fb764 100644 --- a/include/deal.II/base/function_tools.h +++ b/include/deal.II/base/function_tools.h @@ -59,9 +59,9 @@ namespace FunctionTools template void taylor_estimate_function_bounds( - const Function & function, - const BoundingBox & box, - std::pair & value_bounds, + const Function &function, + const BoundingBox &box, + std::pair &value_bounds, std::array, dim> &gradient_bounds, const unsigned int component = 0); diff --git a/include/deal.II/base/geometry_info.h b/include/deal.II/base/geometry_info.h index 02e0359a19..185a188fa0 100644 --- a/include/deal.II/base/geometry_info.h +++ b/include/deal.II/base/geometry_info.h @@ -2247,7 +2247,7 @@ struct GeometryInfo * additional argument, defaulting to isotropic refinement of the face. */ static unsigned int - child_cell_on_face(const RefinementCase & ref_case, + child_cell_on_face(const RefinementCase &ref_case, const unsigned int face, const unsigned int subface, const bool face_orientation = true, @@ -2444,7 +2444,7 @@ struct GeometryInfo * depends on the number of the child. */ static Point - cell_to_child_coordinates(const Point & p, + cell_to_child_coordinates(const Point &p, const unsigned int child_index, const RefinementCase refine_case = RefinementCase::isotropic_refinement); @@ -2455,7 +2455,7 @@ struct GeometryInfo * mother cell. */ static Point - child_to_cell_coordinates(const Point & p, + child_to_cell_coordinates(const Point &p, const unsigned int child_index, const RefinementCase refine_case = RefinementCase::isotropic_refinement); @@ -2673,15 +2673,15 @@ struct GeometryInfo template <> Tensor<1, 1> -GeometryInfo<1>::d_linear_shape_function_gradient(const Point<1> & xi, +GeometryInfo<1>::d_linear_shape_function_gradient(const Point<1> &xi, const unsigned int i); template <> Tensor<1, 2> -GeometryInfo<2>::d_linear_shape_function_gradient(const Point<2> & xi, +GeometryInfo<2>::d_linear_shape_function_gradient(const Point<2> &xi, const unsigned int i); template <> Tensor<1, 3> -GeometryInfo<3>::d_linear_shape_function_gradient(const Point<3> & xi, +GeometryInfo<3>::d_linear_shape_function_gradient(const Point<3> &xi, const unsigned int i); @@ -2867,7 +2867,7 @@ RefinementCase::serialize(Archive &ar, const unsigned int) // serialization can't deal with bitfields, so copy from/to a full sized // std::uint8_t std::uint8_t uchar_value = value; - ar & uchar_value; + ar &uchar_value; value = uchar_value; } @@ -3003,7 +3003,7 @@ GeometryInfo::child_cell_from_point(const Point &) template <> inline Point<1> -GeometryInfo<1>::cell_to_child_coordinates(const Point<1> & p, +GeometryInfo<1>::cell_to_child_coordinates(const Point<1> &p, const unsigned int child_index, const RefinementCase<1> refine_case) @@ -3019,7 +3019,7 @@ GeometryInfo<1>::cell_to_child_coordinates(const Point<1> & p, template <> inline Point<2> -GeometryInfo<2>::cell_to_child_coordinates(const Point<2> & p, +GeometryInfo<2>::cell_to_child_coordinates(const Point<2> &p, const unsigned int child_index, const RefinementCase<2> refine_case) @@ -3054,7 +3054,7 @@ GeometryInfo<2>::cell_to_child_coordinates(const Point<2> & p, template <> inline Point<3> -GeometryInfo<3>::cell_to_child_coordinates(const Point<3> & p, +GeometryInfo<3>::cell_to_child_coordinates(const Point<3> &p, const unsigned int child_index, const RefinementCase<3> refine_case) @@ -3141,7 +3141,7 @@ GeometryInfo::cell_to_child_coordinates( template <> inline Point<1> -GeometryInfo<1>::child_to_cell_coordinates(const Point<1> & p, +GeometryInfo<1>::child_to_cell_coordinates(const Point<1> &p, const unsigned int child_index, const RefinementCase<1> refine_case) @@ -3157,7 +3157,7 @@ GeometryInfo<1>::child_to_cell_coordinates(const Point<1> & p, template <> inline Point<3> -GeometryInfo<3>::child_to_cell_coordinates(const Point<3> & p, +GeometryInfo<3>::child_to_cell_coordinates(const Point<3> &p, const unsigned int child_index, const RefinementCase<3> refine_case) @@ -3230,7 +3230,7 @@ GeometryInfo<3>::child_to_cell_coordinates(const Point<3> & p, template <> inline Point<2> -GeometryInfo<2>::child_to_cell_coordinates(const Point<2> & p, +GeometryInfo<2>::child_to_cell_coordinates(const Point<2> &p, const unsigned int child_index, const RefinementCase<2> refine_case) { @@ -4761,7 +4761,7 @@ GeometryInfo::distance_to_unit_cell(const Point &p) template inline double -GeometryInfo::d_linear_shape_function(const Point & xi, +GeometryInfo::d_linear_shape_function(const Point &xi, const unsigned int i) { AssertIndexRange(i, GeometryInfo::vertices_per_cell); @@ -4856,7 +4856,7 @@ Tensor<1, 1> inline GeometryInfo<1>::d_linear_shape_function_gradient( template <> Tensor<1, 2> inline GeometryInfo<2>::d_linear_shape_function_gradient( - const Point<2> & xi, + const Point<2> &xi, const unsigned int i) { AssertIndexRange(i, GeometryInfo<2>::vertices_per_cell); @@ -4881,7 +4881,7 @@ Tensor<1, 2> inline GeometryInfo<2>::d_linear_shape_function_gradient( template <> Tensor<1, 3> inline GeometryInfo<3>::d_linear_shape_function_gradient( - const Point<3> & xi, + const Point<3> &xi, const unsigned int i) { AssertIndexRange(i, GeometryInfo<3>::vertices_per_cell); diff --git a/include/deal.II/base/graph_coloring.h b/include/deal.II/base/graph_coloring.h index af7c02043b..8d00562abd 100644 --- a/include/deal.II/base/graph_coloring.h +++ b/include/deal.II/base/graph_coloring.h @@ -108,10 +108,10 @@ namespace GraphColoring template std::vector> create_partitioning( - const Iterator & begin, + const Iterator &begin, const std_cxx20::type_identity_t &end, const std::function( - const Iterator &)> & get_conflict_indices) + const Iterator &)> &get_conflict_indices) { // Number of iterators. unsigned int n_iterators = 0; @@ -221,9 +221,9 @@ namespace GraphColoring template void make_dsatur_coloring( - std::vector & partition, + std::vector &partition, const std::function( - const Iterator &)> & get_conflict_indices, + const Iterator &)> &get_conflict_indices, std::vector> &partition_coloring) { partition_coloring.clear(); @@ -539,8 +539,8 @@ namespace GraphColoring template std::vector> make_graph_coloring( - const Iterator & begin, - const std_cxx20::type_identity_t & end, + const Iterator &begin, + const std_cxx20::type_identity_t &end, const std::function( const std_cxx20::type_identity_t &)> &get_conflict_indices) { @@ -577,7 +577,7 @@ namespace GraphColoring * For further details, refer to SparsityTools::color_sparsity_pattern. */ unsigned int - color_sparsity_pattern(const SparsityPattern & sparsity_pattern, + color_sparsity_pattern(const SparsityPattern &sparsity_pattern, std::vector &color_indices); } // namespace GraphColoring diff --git a/include/deal.II/base/hdf5.h b/include/deal.II/base/hdf5.h index 990f9e541f..dc5bad3af3 100644 --- a/include/deal.II/base/hdf5.h +++ b/include/deal.II/base/hdf5.h @@ -438,9 +438,9 @@ namespace HDF5 * Create dataset. This is an internal constructor. The function * Group::create_dataset() should be used to create a dataset. */ - DataSet(const std::string & name, - const hid_t & parent_group_id, - const std::vector & dimensions, + DataSet(const std::string &name, + const hid_t &parent_group_id, + const std::vector &dimensions, const std::shared_ptr &t_type, const bool mpi); @@ -650,7 +650,7 @@ namespace HDF5 */ template void - write_selection(const Container & data, + write_selection(const Container &data, const std::vector &coordinates); // clang-format off @@ -682,7 +682,7 @@ namespace HDF5 // clang-format on template void - write_hyperslab(const Container & data, + write_hyperslab(const Container &data, const std::vector &offset, const std::vector &count); @@ -720,7 +720,7 @@ namespace HDF5 */ template void - write_hyperslab(const Container & data, + write_hyperslab(const Container &data, const std::vector &data_dimensions, const std::vector &offset, const std::vector &stride, @@ -999,8 +999,8 @@ namespace HDF5 * create_group() of the current class should be used to open or create a * group. */ - Group(const std::string & name, - const Group & parent_group, + Group(const std::string &name, + const Group &parent_group, const bool mpi, const GroupAccessMode mode); @@ -1042,7 +1042,7 @@ namespace HDF5 */ template DataSet - create_dataset(const std::string & name, + create_dataset(const std::string &name, const std::vector &dimensions) const; /** @@ -1103,7 +1103,7 @@ namespace HDF5 * defines the processes that participate in this call; `MPI_COMM_WORLD` is * a common value for the MPI communicator. */ - File(const std::string & name, + File(const std::string &name, const FileAccessMode mode, const MPI_Comm mpi_communicator); @@ -1115,7 +1115,7 @@ namespace HDF5 * File(const std::string &, const Mode) * should be used to open or create HDF5 files. */ - File(const std::string & name, + File(const std::string &name, const FileAccessMode mode, const bool mpi, const MPI_Comm mpi_communicator); @@ -1251,10 +1251,10 @@ namespace HDF5 * been collective. */ inline void - release_plist(hid_t & plist, + release_plist(hid_t &plist, H5D_mpio_actual_io_mode_t &io_mode, - std::uint32_t & local_no_collective_cause, - std::uint32_t & global_no_collective_cause, + std::uint32_t &local_no_collective_cause, + std::uint32_t &global_no_collective_cause, const bool mpi, const bool query_io_mode); @@ -1495,10 +1495,10 @@ namespace HDF5 inline void - release_plist(hid_t & plist, + release_plist(hid_t &plist, H5D_mpio_actual_io_mode_t &io_mode, - std::uint32_t & local_no_collective_cause, - std::uint32_t & global_no_collective_cause, + std::uint32_t &local_no_collective_cause, + std::uint32_t &global_no_collective_cause, const bool mpi, const bool query_io_mode) { @@ -1632,7 +1632,7 @@ namespace HDF5 // Todo: // - Use H5Dvlen_reclaim instead of free - char * string_out; + char *string_out; hid_t attr; hid_t type; herr_t ret; @@ -2033,7 +2033,7 @@ namespace HDF5 template void - DataSet::write_selection(const Container & data, + DataSet::write_selection(const Container &data, const std::vector &coordinates) { AssertDimension(coordinates.size(), data.size() * rank); @@ -2082,7 +2082,7 @@ namespace HDF5 template void - DataSet::write_hyperslab(const Container & data, + DataSet::write_hyperslab(const Container &data, const std::vector &offset, const std::vector &count) { @@ -2139,7 +2139,7 @@ namespace HDF5 template void - DataSet::write_hyperslab(const Container & data, + DataSet::write_hyperslab(const Container &data, const std::vector &data_dimensions, const std::vector &offset, const std::vector &stride, @@ -2231,7 +2231,7 @@ namespace HDF5 template DataSet - Group::create_dataset(const std::string & name, + Group::create_dataset(const std::string &name, const std::vector &dimensions) const { std::shared_ptr t_type = internal::get_hdf5_datatype(); diff --git a/include/deal.II/base/incremental_function.h b/include/deal.II/base/incremental_function.h index b959b182a0..3117857a1f 100644 --- a/include/deal.II/base/incremental_function.h +++ b/include/deal.II/base/incremental_function.h @@ -92,7 +92,7 @@ namespace Functions * this function is called. */ virtual void - vector_value(const Point & p, + vector_value(const Point &p, Vector &values) const override; /** diff --git a/include/deal.II/base/index_set.h b/include/deal.II/base/index_set.h index 6405ceec04..76776af802 100644 --- a/include/deal.II/base/index_set.h +++ b/include/deal.II/base/index_set.h @@ -1069,7 +1069,7 @@ private: void add_ranges_internal( boost::container::small_vector, 200> - & tmp_ranges, + &tmp_ranges, const bool ranges_are_sorted); }; @@ -1107,7 +1107,7 @@ complete_index_set(const IndexSet::size_type N) /* IntervalAccessor */ inline IndexSet::IntervalAccessor::IntervalAccessor( - const IndexSet * idxset, + const IndexSet *idxset, const IndexSet::size_type range_idx) : index_set(idxset) , range_idx(range_idx) @@ -1240,7 +1240,7 @@ IndexSet::IntervalAccessor::advance() /* IntervalIterator */ inline IndexSet::IntervalIterator::IntervalIterator( - const IndexSet * idxset, + const IndexSet *idxset, const IndexSet::size_type range_idx) : accessor(idxset, range_idx) {} @@ -1348,7 +1348,7 @@ IndexSet::IntervalIterator::operator-( /* ElementIterator */ inline IndexSet::ElementIterator::ElementIterator( - const IndexSet * idxset, + const IndexSet *idxset, const IndexSet::size_type range_idx, const IndexSet::size_type index) : index_set(idxset) diff --git a/include/deal.II/base/iterator_range.h b/include/deal.II/base/iterator_range.h index 5d0d22903f..be3f80a46a 100644 --- a/include/deal.II/base/iterator_range.h +++ b/include/deal.II/base/iterator_range.h @@ -290,7 +290,7 @@ private: */ template IteratorRange -make_iterator_range(const BaseIterator & begin, +make_iterator_range(const BaseIterator &begin, const std_cxx20::type_identity_t &end) { IteratorRange ir(begin, end); diff --git a/include/deal.II/base/linear_index_iterator.h b/include/deal.II/base/linear_index_iterator.h index e9d0d2cb6b..be605a4e44 100644 --- a/include/deal.II/base/linear_index_iterator.h +++ b/include/deal.II/base/linear_index_iterator.h @@ -354,7 +354,7 @@ inline DerivedIterator LinearIndexIterator::operator++(int) { const DerivedIterator copy(this->accessor); - operator+=(1); + operator+=(1); return copy; } @@ -374,7 +374,7 @@ inline DerivedIterator LinearIndexIterator::operator--(int) { const DerivedIterator copy(this->accessor); - operator+=(-1); + operator+=(-1); return copy; } diff --git a/include/deal.II/base/logstream.h b/include/deal.II/base/logstream.h index 7b699798f1..fcb0927da9 100644 --- a/include/deal.II/base/logstream.h +++ b/include/deal.II/base/logstream.h @@ -152,7 +152,7 @@ public: * @param[in] flags Format flags to set on the output stream @p o. */ void - attach(std::ostream & o, + attach(std::ostream &o, const bool print_job_id = true, const std::ios_base::fmtflags flags = std::ios::showpoint | std::ios::left); diff --git a/include/deal.II/base/memory_space_data.h b/include/deal.II/base/memory_space_data.h index 932e076483..3db21c03a6 100644 --- a/include/deal.II/base/memory_space_data.h +++ b/include/deal.II/base/memory_space_data.h @@ -124,7 +124,7 @@ namespace MemorySpace template void - MemorySpaceData::copy_to(T * begin, + MemorySpaceData::copy_to(T *begin, const std::size_t n_elements) { Assert(n_elements <= values.extent(0), @@ -145,7 +145,7 @@ namespace MemorySpace template void - MemorySpaceData::copy_from(const T * begin, + MemorySpaceData::copy_from(const T *begin, const std::size_t n_elements) { Assert(n_elements <= values.extent(0), diff --git a/include/deal.II/base/mpi.h b/include/deal.II/base/mpi.h index 8212fb5492..491a7a7885 100644 --- a/include/deal.II/base/mpi.h +++ b/include/deal.II/base/mpi.h @@ -576,7 +576,7 @@ namespace Utilities create_group(const MPI_Comm comm, const MPI_Group &group, const int tag, - MPI_Comm * new_comm); + MPI_Comm *new_comm); #endif /** @@ -727,7 +727,7 @@ namespace Utilities void sum(const ArrayView &values, const MPI_Comm mpi_communicator, - const ArrayView & sums); + const ArrayView &sums); /** * Perform an MPI sum of the entries of a symmetric tensor. @@ -761,7 +761,7 @@ namespace Utilities void sum(const SparseMatrix &local, const MPI_Comm mpi_communicator, - SparseMatrix & global); + SparseMatrix &global); /** * Return the maximum over all processors of the value @p t. This function @@ -812,7 +812,7 @@ namespace Utilities void max(const ArrayView &values, const MPI_Comm mpi_communicator, - const ArrayView & maxima); + const ArrayView &maxima); /** * Return the minimum over all processors of the value @p t. This function @@ -863,7 +863,7 @@ namespace Utilities void min(const ArrayView &values, const MPI_Comm mpi_communicator, - const ArrayView & minima); + const ArrayView &minima); /** * Performs a logical or operation over all processors of the value @@ -923,7 +923,7 @@ namespace Utilities void logical_or(const ArrayView &values, const MPI_Comm mpi_communicator, - const ArrayView & results); + const ArrayView &results); /** * A data structure to store the result of the min_max_avg() function. @@ -1033,7 +1033,7 @@ namespace Utilities */ void min_max_avg(const ArrayView &my_values, - const ArrayView & result, + const ArrayView &result, const MPI_Comm mpi_communicator); @@ -1129,8 +1129,8 @@ namespace Utilities * main(). */ MPI_InitFinalize( - int & argc, - char **& argv, + int &argc, + char **&argv, const unsigned int max_num_threads = numbers::invalid_unsigned_int); /** @@ -1282,7 +1282,7 @@ namespace Utilities template std::vector gather(const MPI_Comm comm, - const T & object_to_send, + const T &object_to_send, const unsigned int root_process = 0); /** @@ -1343,7 +1343,7 @@ namespace Utilities template std::enable_if_t == false, T> broadcast(const MPI_Comm comm, - const T & object_to_send, + const T &object_to_send, const unsigned int root_process = 0); /** @@ -1371,7 +1371,7 @@ namespace Utilities template std::enable_if_t == true, T> broadcast(const MPI_Comm comm, - const T & object_to_send, + const T &object_to_send, const unsigned int root_process = 0); /** @@ -1392,7 +1392,7 @@ namespace Utilities */ template void - broadcast(T * buffer, + broadcast(T *buffer, const size_t count, const unsigned int root, const MPI_Comm comm); @@ -1411,7 +1411,7 @@ namespace Utilities */ template T - reduce(const T & local_value, + reduce(const T &local_value, const MPI_Comm comm, const std::function &combiner, const unsigned int root_process = 0); @@ -1427,7 +1427,7 @@ namespace Utilities */ template T - all_reduce(const T & local_value, + all_reduce(const T &local_value, const MPI_Comm comm, const std::function &combiner); @@ -1454,7 +1454,7 @@ namespace Utilities */ template Future - isend(const T & object, + isend(const T &object, MPI_Comm communicator, const unsigned int target_rank, const unsigned int mpi_tag = 0); @@ -1728,8 +1728,8 @@ namespace Utilities * not satisfied. */ template - const MPI_Datatype - mpi_type_id_for_type = internal::MPIDataTypes::mpi_type_id( + const MPI_Datatype mpi_type_id_for_type = + internal::MPIDataTypes::mpi_type_id( static_cast> *>(nullptr)); #endif @@ -1739,10 +1739,10 @@ namespace Utilities // declaration for an internal function that lives in mpi.templates.h template void - all_reduce(const MPI_Op & mpi_op, + all_reduce(const MPI_Op &mpi_op, const ArrayView &values, const MPI_Comm mpi_communicator, - const ArrayView & output); + const ArrayView &output); } // namespace internal @@ -2037,7 +2037,7 @@ namespace Utilities template std::vector gather(const MPI_Comm comm, - const T & object_to_send, + const T &object_to_send, const unsigned int root_process) { # ifndef DEAL_II_WITH_MPI @@ -2194,7 +2194,7 @@ namespace Utilities template void - broadcast(T * buffer, + broadcast(T *buffer, const size_t count, const unsigned int root, const MPI_Comm comm) @@ -2234,7 +2234,7 @@ namespace Utilities template std::enable_if_t == false, T> broadcast(const MPI_Comm comm, - const T & object_to_send, + const T &object_to_send, const unsigned int root_process) { # ifndef DEAL_II_WITH_MPI @@ -2284,7 +2284,7 @@ namespace Utilities template std::enable_if_t == true, T> broadcast(const MPI_Comm comm, - const T & object_to_send, + const T &object_to_send, const unsigned int root_process) { # ifndef DEAL_II_WITH_MPI @@ -2305,7 +2305,7 @@ namespace Utilities template Future - isend(const T & object, + isend(const T &object, MPI_Comm communicator, const unsigned int target_rank, const unsigned int mpi_tag) diff --git a/include/deal.II/base/mpi.templates.h b/include/deal.II/base/mpi.templates.h index 1f260f4960..7e9401f165 100644 --- a/include/deal.II/base/mpi.templates.h +++ b/include/deal.II/base/mpi.templates.h @@ -39,10 +39,10 @@ namespace Utilities { template void - all_reduce(const MPI_Op & mpi_op, + all_reduce(const MPI_Op &mpi_op, const ArrayView &values, const MPI_Comm mpi_communicator, - const ArrayView & output) + const ArrayView &output) { AssertDimension(values.size(), output.size()); #ifdef DEAL_II_WITH_MPI @@ -100,10 +100,10 @@ namespace Utilities template void - all_reduce(const MPI_Op & mpi_op, + all_reduce(const MPI_Op &mpi_op, const ArrayView> &values, const MPI_Comm mpi_communicator, - const ArrayView> & output) + const ArrayView> &output) { AssertDimension(values.size(), output.size()); #ifdef DEAL_II_WITH_MPI @@ -173,7 +173,7 @@ namespace Utilities void sum(const ArrayView &values, const MPI_Comm mpi_communicator, - const ArrayView & sums) + const ArrayView &sums) { internal::all_reduce(MPI_SUM, values, mpi_communicator, sums); } @@ -232,7 +232,7 @@ namespace Utilities void sum(const SparseMatrix &local, const MPI_Comm mpi_communicator, - SparseMatrix & global) + SparseMatrix &global) { Assert( local.get_sparsity_pattern() == global.get_sparsity_pattern(), @@ -287,7 +287,7 @@ namespace Utilities void max(const ArrayView &values, const MPI_Comm mpi_communicator, - const ArrayView & maxima) + const ArrayView &maxima) { internal::all_reduce(MPI_MAX, values, mpi_communicator, maxima); } @@ -328,7 +328,7 @@ namespace Utilities void min(const ArrayView &values, const MPI_Comm mpi_communicator, - const ArrayView & minima) + const ArrayView &minima) { internal::all_reduce(MPI_MIN, values, mpi_communicator, minima); } @@ -384,7 +384,7 @@ namespace Utilities void logical_or(const ArrayView &values, const MPI_Comm mpi_communicator, - const ArrayView & results) + const ArrayView &results) { static_assert(std::is_integral_v, "The MPI_LOR operation only allows integral data types."); @@ -396,7 +396,7 @@ namespace Utilities template T - reduce(const T & vec, + reduce(const T &vec, const MPI_Comm comm, const std::function &combiner, const unsigned int root_process) @@ -480,7 +480,7 @@ namespace Utilities template T - all_reduce(const T & vec, + all_reduce(const T &vec, const MPI_Comm comm, const std::function &combiner) { diff --git a/include/deal.II/base/mpi_compute_index_owner_internal.h b/include/deal.II/base/mpi_compute_index_owner_internal.h index 654bcfa327..c5fb582b13 100644 --- a/include/deal.II/base/mpi_compute_index_owner_internal.h +++ b/include/deal.II/base/mpi_compute_index_owner_internal.h @@ -369,7 +369,7 @@ namespace Utilities append_index_origin(const unsigned int index_within_dictionary, const unsigned int rank_of_request, const unsigned int rank_of_owner, - unsigned int & owner_index_guess); + unsigned int &owner_index_guess); }; /* ------------------------- inline functions ----------------------- */ diff --git a/include/deal.II/base/mpi_consensus_algorithms.h b/include/deal.II/base/mpi_consensus_algorithms.h index 05cf90a2b6..73f2cfb51f 100644 --- a/include/deal.II/base/mpi_consensus_algorithms.h +++ b/include/deal.II/base/mpi_consensus_algorithms.h @@ -201,7 +201,7 @@ namespace Utilities virtual void answer_request(const unsigned int other_rank, const RequestType &buffer_recv, - AnswerType & request_buffer); + AnswerType &request_buffer); /** * Process the payload of the answer of the request to the process with @@ -212,7 +212,7 @@ namespace Utilities */ virtual void read_answer(const unsigned int other_rank, - const AnswerType & recv_buffer); + const AnswerType &recv_buffer); }; @@ -281,12 +281,12 @@ namespace Utilities */ virtual std::vector run( - const std::vector & targets, + const std::vector &targets, const std::function &create_request, const std::function &answer_request, const std::function - & process_answer, + &process_answer, const MPI_Comm comm) = 0; }; @@ -326,12 +326,12 @@ namespace Utilities */ virtual std::vector run( - const std::vector & targets, + const std::vector &targets, const std::function &create_request, const std::function &answer_request, const std::function - & process_answer, + &process_answer, const MPI_Comm comm) override; private: @@ -382,7 +382,7 @@ namespace Utilities bool all_locally_originated_receives_are_completed( const std::function - & process_answer, + &process_answer, const MPI_Comm comm); /** @@ -417,7 +417,7 @@ namespace Utilities */ void start_communication( - const std::vector & targets, + const std::vector &targets, const std::function &create_request, const MPI_Comm comm); @@ -476,12 +476,12 @@ namespace Utilities */ template std::vector - nbx(const std::vector & targets, + nbx(const std::vector &targets, const std::function &create_request, const std::function &answer_request, const std::function - & process_answer, + &process_answer, const MPI_Comm comm); /** @@ -523,10 +523,10 @@ namespace Utilities */ template std::vector - nbx(const std::vector & targets, + nbx(const std::vector &targets, const std::function &create_request, const std::function - & process_request, + &process_request, const MPI_Comm comm); /** @@ -576,12 +576,12 @@ namespace Utilities */ virtual std::vector run( - const std::vector & targets, + const std::vector &targets, const std::function &create_request, const std::function &answer_request, const std::function - & process_answer, + &process_answer, const MPI_Comm comm) override; private: @@ -622,7 +622,7 @@ namespace Utilities */ unsigned int start_communication( - const std::vector & targets, + const std::vector &targets, const std::function &create_request, const MPI_Comm comm); @@ -645,7 +645,7 @@ namespace Utilities process_incoming_answers( const unsigned int n_targets, const std::function - & process_answer, + &process_answer, const MPI_Comm comm); /** @@ -716,12 +716,12 @@ namespace Utilities */ template std::vector - pex(const std::vector & targets, + pex(const std::vector &targets, const std::function &create_request, const std::function &answer_request, const std::function - & process_answer, + &process_answer, const MPI_Comm comm); /** @@ -763,10 +763,10 @@ namespace Utilities */ template std::vector - pex(const std::vector & targets, + pex(const std::vector &targets, const std::function &create_request, const std::function - & process_request, + &process_request, const MPI_Comm comm); @@ -791,12 +791,12 @@ namespace Utilities */ virtual std::vector run( - const std::vector & targets, + const std::vector &targets, const std::function &create_request, const std::function &answer_request, const std::function - & process_answer, + &process_answer, const MPI_Comm comm) override; }; @@ -837,12 +837,12 @@ namespace Utilities template std::vector serial( - const std::vector & targets, + const std::vector &targets, const std::function &create_request, const std::function &answer_request, const std::function - & process_answer, + &process_answer, const MPI_Comm comm); /** @@ -877,10 +877,10 @@ namespace Utilities template std::vector serial( - const std::vector & targets, + const std::vector &targets, const std::function &create_request, const std::function - & process_request, + &process_request, const MPI_Comm comm); @@ -921,12 +921,12 @@ namespace Utilities */ virtual std::vector run( - const std::vector & targets, + const std::vector &targets, const std::function &create_request, const std::function &answer_request, const std::function - & process_answer, + &process_answer, const MPI_Comm comm) override; private: @@ -983,12 +983,12 @@ namespace Utilities template std::vector selector( - const std::vector & targets, + const std::vector &targets, const std::function &create_request, const std::function &answer_request, const std::function - & process_answer, + &process_answer, const MPI_Comm comm); /** @@ -1031,10 +1031,10 @@ namespace Utilities template std::vector selector( - const std::vector & targets, + const std::vector &targets, const std::function &create_request, const std::function - & process_request, + &process_request, const MPI_Comm comm); @@ -1044,12 +1044,12 @@ namespace Utilities template std::vector - nbx(const std::vector & targets, + nbx(const std::vector &targets, const std::function &create_request, const std::function &answer_request, const std::function - & process_answer, + &process_answer, const MPI_Comm comm) { return NBX().run( @@ -1060,10 +1060,10 @@ namespace Utilities template std::vector - nbx(const std::vector & targets, + nbx(const std::vector &targets, const std::function &create_request, const std::function - & process_request, + &process_request, const MPI_Comm comm) { // TODO: For the moment, simply implement this special case by @@ -1096,12 +1096,12 @@ namespace Utilities template std::vector - pex(const std::vector & targets, + pex(const std::vector &targets, const std::function &create_request, const std::function &answer_request, const std::function - & process_answer, + &process_answer, const MPI_Comm comm) { return PEX().run( @@ -1112,10 +1112,10 @@ namespace Utilities template std::vector - pex(const std::vector & targets, + pex(const std::vector &targets, const std::function &create_request, const std::function - & process_request, + &process_request, const MPI_Comm comm) { // TODO: For the moment, simply implement this special case by @@ -1149,12 +1149,12 @@ namespace Utilities template std::vector serial( - const std::vector & targets, + const std::vector &targets, const std::function &create_request, const std::function &answer_request, const std::function - & process_answer, + &process_answer, const MPI_Comm comm) { return Serial().run( @@ -1166,10 +1166,10 @@ namespace Utilities template std::vector serial( - const std::vector & targets, + const std::vector &targets, const std::function &create_request, const std::function - & process_request, + &process_request, const MPI_Comm comm) { // TODO: For the moment, simply implement this special case by @@ -1203,12 +1203,12 @@ namespace Utilities template std::vector selector( - const std::vector & targets, + const std::vector &targets, const std::function &create_request, const std::function &answer_request, const std::function - & process_answer, + &process_answer, const MPI_Comm comm) { return Selector().run( @@ -1220,10 +1220,10 @@ namespace Utilities template std::vector selector( - const std::vector & targets, + const std::vector &targets, const std::function &create_request, const std::function - & process_request, + &process_request, const MPI_Comm comm) { // TODO: For the moment, simply implement this special case by @@ -1448,12 +1448,12 @@ namespace Utilities template std::vector NBX::run( - const std::vector & targets, + const std::vector &targets, const std::function &create_request, const std::function &answer_request, const std::function - & process_answer, + &process_answer, const MPI_Comm comm) { Assert(has_unique_elements(targets), @@ -1515,7 +1515,7 @@ namespace Utilities template void NBX::start_communication( - const std::vector & targets, + const std::vector &targets, const std::function &create_request, const MPI_Comm comm) { @@ -1571,7 +1571,7 @@ namespace Utilities NBX:: all_locally_originated_receives_are_completed( const std::function - & process_answer, + &process_answer, const MPI_Comm comm) { # ifdef DEAL_II_WITH_MPI @@ -1665,7 +1665,7 @@ namespace Utilities void NBX::maybe_answer_one_request( const std::function - & answer_request, + &answer_request, const MPI_Comm comm) { # ifdef DEAL_II_WITH_MPI @@ -1819,12 +1819,12 @@ namespace Utilities template std::vector PEX::run( - const std::vector & targets, + const std::vector &targets, const std::function &create_request, const std::function &answer_request, const std::function - & process_answer, + &process_answer, const MPI_Comm comm) { Assert(has_unique_elements(targets), @@ -1867,7 +1867,7 @@ namespace Utilities template unsigned int PEX::start_communication( - const std::vector & targets, + const std::vector &targets, const std::function &create_request, const MPI_Comm comm) { @@ -1929,7 +1929,7 @@ namespace Utilities PEX::answer_one_request( const unsigned int index, const std::function - & answer_request, + &answer_request, const MPI_Comm comm) { # ifdef DEAL_II_WITH_MPI @@ -2003,7 +2003,7 @@ namespace Utilities PEX::process_incoming_answers( const unsigned int n_targets, const std::function - & process_answer, + &process_answer, const MPI_Comm comm) { # ifdef DEAL_II_WITH_MPI @@ -2090,12 +2090,12 @@ namespace Utilities template std::vector Serial::run( - const std::vector & targets, + const std::vector &targets, const std::function &create_request, const std::function &answer_request, const std::function - & process_answer, + &process_answer, const MPI_Comm comm) { (void)comm; @@ -2134,12 +2134,12 @@ namespace Utilities template std::vector Selector::run( - const std::vector & targets, + const std::vector &targets, const std::function &create_request, const std::function &answer_request, const std::function - & process_answer, + &process_answer, const MPI_Comm comm) { // Depending on the number of processes we switch between diff --git a/include/deal.II/base/mpi_large_count.h b/include/deal.II/base/mpi_large_count.h index 8a6c4a9013..a4fc0d5472 100644 --- a/include/deal.II/base/mpi_large_count.h +++ b/include/deal.II/base/mpi_large_count.h @@ -98,8 +98,8 @@ namespace Utilities int blocklengths[2] = {1, 1}; MPI_Aint displacements[2] = {0, - static_cast(n_chunks) * - size_old * max_signed_int}; + static_cast(n_chunks) * + size_old * max_signed_int}; MPI_Datatype types[2] = {chunks, remainder}; ierr = MPI_Type_create_struct( 2, blocklengths, displacements, types, newtype); @@ -151,7 +151,7 @@ namespace Utilities * See the MPI 4.x standard for details. */ inline int - Send_c(const void * buf, + Send_c(const void *buf, MPI_Count count, MPI_Datatype datatype, int dest, @@ -190,13 +190,13 @@ namespace Utilities * See the MPI 4.x standard for details. */ inline int - Recv_c(void * buf, + Recv_c(void *buf, MPI_Count count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, - MPI_Status * status) + MPI_Status *status) { # if MPI_VERSION >= 4 return MPI_Recv_c(buf, count, datatype, source, tag, comm, status); @@ -232,7 +232,7 @@ namespace Utilities * See the MPI 4.x standard for details. */ inline int - Bcast_c(void * buf, + Bcast_c(void *buf, MPI_Count count, MPI_Datatype datatype, unsigned int root_mpi_rank, @@ -272,10 +272,10 @@ namespace Utilities inline int File_write_at_c(MPI_File fh, MPI_Offset offset, - const void * buf, + const void *buf, MPI_Count count, MPI_Datatype datatype, - MPI_Status * status) + MPI_Status *status) { if (count <= LargeCount::mpi_max_int_count) return MPI_File_write_at(fh, offset, buf, count, datatype, status); @@ -308,10 +308,10 @@ namespace Utilities inline int File_write_at_all_c(MPI_File fh, MPI_Offset offset, - const void * buf, + const void *buf, MPI_Count count, MPI_Datatype datatype, - MPI_Status * status) + MPI_Status *status) { if (count <= LargeCount::mpi_max_int_count) return MPI_File_write_at_all( @@ -343,10 +343,10 @@ namespace Utilities */ inline int File_write_ordered_c(MPI_File fh, - const void * buf, + const void *buf, MPI_Count count, MPI_Datatype datatype, - MPI_Status * status) + MPI_Status *status) { if (count <= LargeCount::mpi_max_int_count) return MPI_File_write_ordered(fh, buf, count, datatype, status); @@ -379,10 +379,10 @@ namespace Utilities inline int File_read_at_c(MPI_File fh, MPI_Offset offset, - void * buf, + void *buf, MPI_Count count, MPI_Datatype datatype, - MPI_Status * status) + MPI_Status *status) { if (count <= LargeCount::mpi_max_int_count) return MPI_File_read_at(fh, offset, buf, count, datatype, status); @@ -415,10 +415,10 @@ namespace Utilities inline int File_read_at_all_c(MPI_File fh, MPI_Offset offset, - void * buf, + void *buf, MPI_Count count, MPI_Datatype datatype, - MPI_Status * status) + MPI_Status *status) { if (count <= LargeCount::mpi_max_int_count) return MPI_File_read_at_all(fh, offset, buf, count, datatype, status); diff --git a/include/deal.II/base/mpi_noncontiguous_partitioner.h b/include/deal.II/base/mpi_noncontiguous_partitioner.h index 2d579031ae..df04a33c8a 100644 --- a/include/deal.II/base/mpi_noncontiguous_partitioner.h +++ b/include/deal.II/base/mpi_noncontiguous_partitioner.h @@ -96,7 +96,7 @@ namespace Utilities void export_to_ghosted_array( const ArrayView &locally_owned_array, - const ArrayView & ghost_array) const; + const ArrayView &ghost_array) const; /** * Same as above but with an interface similar to @@ -117,9 +117,9 @@ namespace Utilities export_to_ghosted_array( const unsigned int communication_channel, const ArrayView &locally_owned_array, - const ArrayView & temporary_storage, - const ArrayView & ghost_array, - std::vector & requests) const; + const ArrayView &temporary_storage, + const ArrayView &ghost_array, + std::vector &requests) const; /** * Start update: Data is packed, non-blocking send and receives @@ -142,8 +142,8 @@ namespace Utilities export_to_ghosted_array_start( const unsigned int communication_channel, const ArrayView &locally_owned_array, - const ArrayView & temporary_storage, - std::vector & requests) const; + const ArrayView &temporary_storage, + std::vector &requests) const; /** * Finish update. The method waits until all data has been sent and @@ -163,8 +163,8 @@ namespace Utilities void export_to_ghosted_array_finish( const ArrayView &temporary_storage, - const ArrayView & ghost_array, - std::vector & requests) const; + const ArrayView &ghost_array, + std::vector &requests) const; /** * Similar to the above functions but for importing vector entries @@ -178,8 +178,8 @@ namespace Utilities void import_from_ghosted_array( const VectorOperation::values vector_operation, - const ArrayView & ghost_array, - const ArrayView & locally_owned_storage) const; + const ArrayView &ghost_array, + const ArrayView &locally_owned_storage) const; /** * Similar to the above function with the difference that @@ -191,9 +191,9 @@ namespace Utilities void import_from_ghosted_array(const VectorOperation::values vector_operation, const unsigned int communication_channel, - const ArrayView & ghost_array, - const ArrayView & temporary_storage, - const ArrayView & locally_owned_storage, + const ArrayView &ghost_array, + const ArrayView &temporary_storage, + const ArrayView &locally_owned_storage, std::vector &requests) const; /** @@ -205,9 +205,9 @@ namespace Utilities import_from_ghosted_array_start( const VectorOperation::values vector_operation, const unsigned int communication_channel, - const ArrayView & ghost_array, - const ArrayView & temporary_storage, - std::vector & requests) const; + const ArrayView &ghost_array, + const ArrayView &temporary_storage, + std::vector &requests) const; /** * Finish update for importing values. The method waits until all data has @@ -220,8 +220,8 @@ namespace Utilities import_from_ghosted_array_finish( const VectorOperation::values vector_operation, const ArrayView &temporary_storage, - const ArrayView & locally_owned_storage, - std::vector & requests) const; + const ArrayView &locally_owned_storage, + std::vector &requests) const; /** * Returns the number of processes this process sends data to and the diff --git a/include/deal.II/base/mpi_noncontiguous_partitioner.templates.h b/include/deal.II/base/mpi_noncontiguous_partitioner.templates.h index ea2cc70ed0..48f934a80b 100644 --- a/include/deal.II/base/mpi_noncontiguous_partitioner.templates.h +++ b/include/deal.II/base/mpi_noncontiguous_partitioner.templates.h @@ -36,7 +36,7 @@ namespace Utilities void NoncontiguousPartitioner::export_to_ghosted_array( const ArrayView &src, - const ArrayView & dst) const + const ArrayView &dst) const { // allocate internal memory since needed if (requests.size() != send_ranks.size() + recv_ranks.size()) @@ -61,9 +61,9 @@ namespace Utilities NoncontiguousPartitioner::export_to_ghosted_array( const unsigned int communication_channel, const ArrayView &locally_owned_array, - const ArrayView & temporary_storage, - const ArrayView & ghost_array, - std::vector & requests) const + const ArrayView &temporary_storage, + const ArrayView &ghost_array, + std::vector &requests) const { this->template export_to_ghosted_array_start( communication_channel, @@ -82,8 +82,8 @@ namespace Utilities NoncontiguousPartitioner::export_to_ghosted_array_start( const unsigned int communication_channel, const ArrayView &src, - const ArrayView & buffers, - std::vector & requests) const + const ArrayView &buffers, + std::vector &requests) const { #ifndef DEAL_II_WITH_MPI (void)communication_channel; @@ -154,8 +154,8 @@ namespace Utilities void NoncontiguousPartitioner::export_to_ghosted_array_finish( const ArrayView &buffers, - const ArrayView & dst, - std::vector & requests) const + const ArrayView &dst, + std::vector &requests) const { #ifndef DEAL_II_WITH_MPI (void)buffers; @@ -194,8 +194,8 @@ namespace Utilities void NoncontiguousPartitioner::import_from_ghosted_array( const VectorOperation::values vector_operation, - const ArrayView & src, - const ArrayView & dst) const + const ArrayView &src, + const ArrayView &dst) const { // allocate internal memory since needed if (requests.size() != send_ranks.size() + recv_ranks.size()) @@ -222,10 +222,10 @@ namespace Utilities NoncontiguousPartitioner::import_from_ghosted_array( const VectorOperation::values vector_operation, const unsigned int communication_channel, - const ArrayView & ghost_array, - const ArrayView & temporary_storage, - const ArrayView & locally_owned_array, - std::vector & requests) const + const ArrayView &ghost_array, + const ArrayView &temporary_storage, + const ArrayView &locally_owned_array, + std::vector &requests) const { this->template import_from_ghosted_array_start( vector_operation, @@ -244,9 +244,9 @@ namespace Utilities NoncontiguousPartitioner::import_from_ghosted_array_start( const VectorOperation::values vector_operation, const unsigned int communication_channel, - const ArrayView & src, - const ArrayView & buffers, - std::vector & requests) const + const ArrayView &src, + const ArrayView &buffers, + std::vector &requests) const { #ifndef DEAL_II_WITH_MPI (void)vector_operation; @@ -317,8 +317,8 @@ namespace Utilities NoncontiguousPartitioner::import_from_ghosted_array_finish( const VectorOperation::values vector_operation, const ArrayView &buffers, - const ArrayView & dst, - std::vector & requests) const + const ArrayView &dst, + std::vector &requests) const { #ifndef DEAL_II_WITH_MPI (void)vector_operation; diff --git a/include/deal.II/base/mpi_remote_point_evaluation.h b/include/deal.II/base/mpi_remote_point_evaluation.h index 7b6c53def0..24f7d837a6 100644 --- a/include/deal.II/base/mpi_remote_point_evaluation.h +++ b/include/deal.II/base/mpi_remote_point_evaluation.h @@ -93,7 +93,7 @@ namespace Utilities void reinit(const std::vector> &points, const Triangulation &tria, - const Mapping & mapping); + const Mapping &mapping); /** * Set up internal data structures and communication pattern based on @@ -107,7 +107,7 @@ namespace Utilities void reinit(const GridTools::internal:: DistributedComputePointLocationsInternal &data, - const Triangulation & tria, + const Triangulation &tria, const Mapping &mapping); /** @@ -173,7 +173,7 @@ namespace Utilities void process_and_evaluate( const std::vector &input, - std::vector & buffer, + std::vector &buffer, const std::function &, const CellData &)> &evaluation_function) const; @@ -492,7 +492,7 @@ namespace Utilities void RemotePointEvaluation::process_and_evaluate( const std::vector &input, - std::vector & buffer, + std::vector &buffer, const std::function &, const CellData &)> &evaluation_function) const { diff --git a/include/deal.II/base/mu_parser_internal.h b/include/deal.II/base/mu_parser_internal.h index 8103e6468e..82b01f5837 100644 --- a/include/deal.II/base/mu_parser_internal.h +++ b/include/deal.II/base/mu_parser_internal.h @@ -168,8 +168,8 @@ namespace internal * information. */ virtual void - initialize(const std::string & vars, - const std::vector & expressions, + initialize(const std::string &vars, + const std::vector &expressions, const std::map &constants, const bool time_dependent = false); @@ -192,7 +192,7 @@ namespace internal * Compute the values of all components. */ void - do_all_values(const Point & p, + do_all_values(const Point &p, const double time, ArrayView &values) const; diff --git a/include/deal.II/base/mutable_bind.h b/include/deal.II/base/mutable_bind.h index baabdcf570..f6147e4d30 100644 --- a/include/deal.II/base/mutable_bind.h +++ b/include/deal.II/base/mutable_bind.h @@ -144,7 +144,7 @@ namespace Utilities * the conversion */ void - parse_arguments(const std::string & value_string, + parse_arguments(const std::string &value_string, const Patterns::PatternBase &pattern = *Patterns::Tools::Convert::to_pattern()); @@ -233,7 +233,7 @@ namespace Utilities template template MutableBind::MutableBind(FunctionType function, - TupleType && arguments) + TupleType &&arguments) : function(function) , arguments(std::move(arguments)) {} @@ -279,7 +279,7 @@ namespace Utilities template void MutableBind::parse_arguments( - const std::string & value_string, + const std::string &value_string, const Patterns::PatternBase &pattern) { arguments = @@ -301,7 +301,7 @@ namespace Utilities template MutableBind - mutable_bind(ReturnType (*function)(FunctionArgs...)) + mutable_bind(ReturnType (*function)(FunctionArgs...)) { return MutableBind(function); } diff --git a/include/deal.II/base/numbers.h b/include/deal.II/base/numbers.h index 099b4745cf..5b7e596154 100644 --- a/include/deal.II/base/numbers.h +++ b/include/deal.II/base/numbers.h @@ -452,7 +452,7 @@ namespace numbers * @note This function can also be used in @ref GlossDevice "device" code. */ static constexpr DEAL_II_HOST_DEVICE const number & - conjugate(const number &x); + conjugate(const number &x); /** * Return the square of the absolute value of the given number. Since the @@ -698,7 +698,7 @@ namespace internal struct NumberType { static constexpr DEAL_II_HOST_DEVICE_ALWAYS_INLINE const T & - value(const T &t) + value(const T &t) { return t; } diff --git a/include/deal.II/base/parallel.h b/include/deal.II/base/parallel.h index bbf6eeb354..f52b281b1e 100644 --- a/include/deal.II/base/parallel.h +++ b/include/deal.II/base/parallel.h @@ -83,7 +83,7 @@ namespace parallel void parallel_for(Iterator x_begin, Iterator x_end, - const Functor & functor, + const Functor &functor, const unsigned int grainsize) { tbb::parallel_for(tbb::blocked_range(x_begin, x_end, grainsize), @@ -100,7 +100,7 @@ namespace parallel void parallel_for(Iterator x_begin, Iterator x_end, - const Functor & functor, + const Functor &functor, const unsigned int grainsize, const std::shared_ptr &partitioner) { @@ -166,7 +166,7 @@ namespace parallel void transform(const InputIterator &begin_in, const InputIterator &end_in, OutputIterator out, - const Function & function, + const Function &function, const unsigned int grainsize) { #ifndef DEAL_II_WITH_TBB @@ -242,7 +242,7 @@ namespace parallel const InputIterator1 &end_in1, InputIterator2 in2, OutputIterator out, - const Function & function, + const Function &function, const unsigned int grainsize) { #ifndef DEAL_II_WITH_TBB @@ -325,7 +325,7 @@ namespace parallel InputIterator2 in2, InputIterator3 in3, OutputIterator out, - const Function & function, + const Function &function, const unsigned int grainsize) { #ifndef DEAL_II_WITH_TBB @@ -369,7 +369,7 @@ namespace parallel template DEAL_II_CXX20_REQUIRES((std::invocable)) void apply_to_subranges(const tbb::blocked_range &range, - const Function & f) + const Function &f) { f(range.begin(), range.end()); } @@ -450,9 +450,9 @@ namespace parallel */ template DEAL_II_CXX20_REQUIRES((std::invocable)) - void apply_to_subranges(const Iterator & begin, + void apply_to_subranges(const Iterator &begin, const std_cxx20::type_identity_t &end, - const Function & f, + const Function &f, const unsigned int grainsize) { #ifndef DEAL_II_WITH_TBB @@ -606,8 +606,8 @@ namespace parallel std::convertible_to, ResultType>)) ResultType - accumulate_from_subranges(const Function & f, - const Iterator & begin, + accumulate_from_subranges(const Function &f, + const Iterator &begin, const std_cxx20::type_identity_t &end, const unsigned int grainsize) { diff --git a/include/deal.II/base/parameter_acceptor.h b/include/deal.II/base/parameter_acceptor.h index 2898f0ea05..924ead9e20 100644 --- a/include/deal.II/base/parameter_acceptor.h +++ b/include/deal.II/base/parameter_acceptor.h @@ -420,7 +420,7 @@ public: const std::string &output_filename = "", const ParameterHandler::OutputStyle output_style_for_output_filename = ParameterHandler::Short, - ParameterHandler & prm = ParameterAcceptor::prm, + ParameterHandler &prm = ParameterAcceptor::prm, const ParameterHandler::OutputStyle output_style_for_filename = ParameterHandler::DefaultStyle); @@ -434,7 +434,7 @@ public: * @param prm The ParameterHandler to use */ static void - initialize(std::istream & input_stream, + initialize(std::istream &input_stream, ParameterHandler &prm = ParameterAcceptor::prm); @@ -522,10 +522,10 @@ public: */ template void - add_parameter(const std::string & entry, - ParameterType & parameter, - const std::string & documentation = "", - ParameterHandler & prm_ = prm, + add_parameter(const std::string &entry, + ParameterType ¶meter, + const std::string &documentation = "", + ParameterHandler &prm_ = prm, const Patterns::PatternBase &pattern = *Patterns::Tools::Convert::to_pattern()); @@ -726,10 +726,10 @@ public: // Inline and template functions template void -ParameterAcceptor::add_parameter(const std::string & entry, - ParameterType & parameter, - const std::string & documentation, - ParameterHandler & prm, +ParameterAcceptor::add_parameter(const std::string &entry, + ParameterType ¶meter, + const std::string &documentation, + ParameterHandler &prm, const Patterns::PatternBase &pattern) { enter_my_subsection(prm); diff --git a/include/deal.II/base/parameter_handler.h b/include/deal.II/base/parameter_handler.h index 559352f0cf..9fff4947d2 100644 --- a/include/deal.II/base/parameter_handler.h +++ b/include/deal.II/base/parameter_handler.h @@ -1024,7 +1024,7 @@ public: * value does not satisfy its pattern is ignored. */ virtual void - parse_input(std::istream & input, + parse_input(std::istream &input, const std::string &filename = "input file", const std::string &last_line = "", const bool skip_undefined = false); @@ -1122,10 +1122,10 @@ public: * error, for example to override an earlier default value. */ void - declare_entry(const std::string & entry, - const std::string & default_value, + declare_entry(const std::string &entry, + const std::string &default_value, const Patterns::PatternBase &pattern = Patterns::Anything(), - const std::string & documentation = "", + const std::string &documentation = "", const bool has_to_be_set = false); /** @@ -1176,7 +1176,7 @@ public: * ParameterHandler::parse_input() for more information. */ void - add_action(const std::string & entry, + add_action(const std::string &entry, const std::function &action, const bool execute_action = true); @@ -1197,9 +1197,9 @@ public: */ template void - add_parameter(const std::string & entry, - ParameterType & parameter, - const std::string & documentation = "", + add_parameter(const std::string &entry, + ParameterType ¶meter, + const std::string &documentation = "", const Patterns::PatternBase &pattern = *Patterns::Tools::Convert::to_pattern(), const bool has_to_be_set = false); @@ -1292,7 +1292,7 @@ public: */ std::string get(const std::vector &entry_subsection_path, - const std::string & entry_string) const; + const std::string &entry_string) const; /** * Return value of entry @p entry_string as long int. (A long @@ -1312,7 +1312,7 @@ public: */ long int get_integer(const std::vector &entry_subsection_path, - const std::string & entry_string) const; + const std::string &entry_string) const; /** * Return value of entry @p entry_name as @p double. @@ -1328,7 +1328,7 @@ public: */ double get_double(const std::vector &entry_subsection_path, - const std::string & entry_string) const; + const std::string &entry_string) const; /** * Return value of entry @p entry_name as @p bool. The entry may * be "true" or "yes" for @p true, "false" or "no" for @p false @@ -1347,7 +1347,7 @@ public: */ bool get_bool(const std::vector &entry_subsection_path, - const std::string & entry_string) const; + const std::string &entry_string) const; /** * Change the value presently stored for entry_name to the one @@ -1551,7 +1551,7 @@ public: * it called recursively by the previous function. */ void - log_parameters_section(LogStream & out, + log_parameters_section(LogStream &out, const OutputStyle style = DefaultStyle); /** @@ -1809,7 +1809,7 @@ private: */ std::string get_current_full_path(const std::vector &sub_path, - const std::string & name) const; + const std::string &name) const; /** * Scan one line of input. input_filename and @@ -1848,11 +1848,11 @@ private: */ void recursively_print_parameters( - const boost::property_tree::ptree & tree, - const std::vector & target_subsection_path, + const boost::property_tree::ptree &tree, + const std::vector &target_subsection_path, const ParameterHandler::OutputStyle style, const unsigned int indent_level, - std::ostream & out) const; + std::ostream &out) const; friend class MultipleParameterLoop; }; @@ -2150,7 +2150,7 @@ public: * just reformat their inputs and then call this version. */ virtual void - parse_input(std::istream & input, + parse_input(std::istream &input, const std::string &filename = "input file", const std::string &last_line = "", const bool skip_undefined = false) override; @@ -2214,8 +2214,8 @@ private: * split_different_values. */ Entry(const std::vector &Path, - const std::string & Name, - const std::string & Value); + const std::string &Name, + const std::string &Value); /** * Split the entry value into the different branches. @@ -2323,7 +2323,7 @@ ParameterHandler::load(Archive &ar, const unsigned int) ar &*entries.get(); std::vector descriptions; - ar & descriptions; + ar &descriptions; patterns.clear(); for (const auto &description : descriptions) @@ -2333,9 +2333,9 @@ ParameterHandler::load(Archive &ar, const unsigned int) template void -ParameterHandler::add_parameter(const std::string & entry, - ParameterType & parameter, - const std::string & documentation, +ParameterHandler::add_parameter(const std::string &entry, + ParameterType ¶meter, + const std::string &documentation, const Patterns::PatternBase &pattern, const bool has_to_be_set) { diff --git a/include/deal.II/base/parsed_convergence_table.h b/include/deal.II/base/parsed_convergence_table.h index bee344c06c..ef61795f05 100644 --- a/include/deal.II/base/parsed_convergence_table.h +++ b/include/deal.II/base/parsed_convergence_table.h @@ -173,7 +173,7 @@ public: * unique component name. */ ParsedConvergenceTable( - const std::vector & component_names = {"u"}, + const std::vector &component_names = {"u"}, const std::vector> &list_of_error_norms = { {VectorTools::H1_norm, VectorTools::L2_norm, VectorTools::Linfty_norm}}); @@ -242,13 +242,13 @@ public: * @endcode */ ParsedConvergenceTable( - const std::vector & component_names, + const std::vector &component_names, const std::vector> &list_of_error_norms, const double exponent, - const std::set & extra_columns, - const std::string & rate_key, - const std::string & rate_mode, - const std::string & error_file_name, + const std::set &extra_columns, + const std::string &rate_key, + const std::string &rate_mode, + const std::string &error_file_name, const unsigned int precision, const bool compute_error); @@ -274,20 +274,20 @@ public: template void error_from_exact(const DoFHandler &vspace, - const VectorType & solution, - const Function & exact, - const Function * weight = nullptr); + const VectorType &solution, + const Function &exact, + const Function *weight = nullptr); /** * Same as above, with a different mapping. */ template void - error_from_exact(const Mapping & mapping, + error_from_exact(const Mapping &mapping, const DoFHandler &vspace, - const VectorType & solution, - const Function & exact, - const Function * weight = nullptr); + const VectorType &solution, + const Function &exact, + const Function *weight = nullptr); /** * Add an additional column (with name @p column_name) to the table, by invoking @@ -356,7 +356,7 @@ public: * key in the parameter file. */ void - add_extra_column(const std::string & column_name, + add_extra_column(const std::string &column_name, const std::function &custom_function, const bool compute_rate = true); @@ -482,9 +482,9 @@ private: template void ParsedConvergenceTable::difference(const DoFHandler &dh, - const VectorType & solution1, - const VectorType & solution2, - const Function * weight) + const VectorType &solution1, + const VectorType &solution2, + const Function *weight) { AssertThrow(solution1.size() == solution2.size(), ExcDimensionMismatch(solution1.size(), solution2.size())); @@ -501,11 +501,11 @@ ParsedConvergenceTable::difference(const DoFHandler &dh, template void -ParsedConvergenceTable::difference(const Mapping & mapping, +ParsedConvergenceTable::difference(const Mapping &mapping, const DoFHandler &dh, - const VectorType & solution1, - const VectorType & solution2, - const Function * weight) + const VectorType &solution1, + const VectorType &solution2, + const Function *weight) { AssertThrow(solution1.size() == solution2.size(), ExcDimensionMismatch(solution1.size(), solution2.size())); @@ -524,7 +524,7 @@ ParsedConvergenceTable::difference(const Mapping & mapping, template void ParsedConvergenceTable::error_from_exact(const DoFHandler &dh, - const VectorType & solution, + const VectorType &solution, const Function &exact, const Function *weight) { @@ -541,7 +541,7 @@ template void ParsedConvergenceTable::error_from_exact(const Mapping &mapping, const DoFHandler &dh, - const VectorType & solution, + const VectorType &solution, const Function &exact, const Function *weight) { diff --git a/include/deal.II/base/parsed_function.h b/include/deal.II/base/parsed_function.h index 0c8fb63c84..9729307007 100644 --- a/include/deal.II/base/parsed_function.h +++ b/include/deal.II/base/parsed_function.h @@ -109,7 +109,7 @@ namespace Functions * @endcode */ static void - declare_parameters(ParameterHandler & prm, + declare_parameters(ParameterHandler &prm, const unsigned int n_components = 1); /** diff --git a/include/deal.II/base/partitioner.h b/include/deal.II/base/partitioner.h index d815220a9c..3e9feca946 100644 --- a/include/deal.II/base/partitioner.h +++ b/include/deal.II/base/partitioner.h @@ -521,9 +521,9 @@ namespace Utilities export_to_ghosted_array_start( const unsigned int communication_channel, const ArrayView &locally_owned_array, - const ArrayView & temporary_storage, - const ArrayView & ghost_array, - std::vector & requests) const; + const ArrayView &temporary_storage, + const ArrayView &ghost_array, + std::vector &requests) const; /** * Finish the exportation of the data in a locally owned array to the @@ -546,7 +546,7 @@ namespace Utilities void export_to_ghosted_array_finish( const ArrayView &ghost_array, - std::vector & requests) const; + std::vector &requests) const; /** * Start importing the data on an array indexed by the ghost indices of @@ -592,7 +592,7 @@ namespace Utilities const unsigned int communication_channel, const ArrayView &ghost_array, const ArrayView &temporary_storage, - std::vector & requests) const; + std::vector &requests) const; /** * Finish importing the data from an array indexed by the ghost @@ -633,9 +633,9 @@ namespace Utilities import_from_ghosted_array_finish( const VectorOperation::values vector_operation, const ArrayView &temporary_storage, - const ArrayView & locally_owned_storage, - const ArrayView & ghost_array, - std::vector & requests) const; + const ArrayView &locally_owned_storage, + const ArrayView &ghost_array, + std::vector &requests) const; #endif /** diff --git a/include/deal.II/base/partitioner.templates.h b/include/deal.II/base/partitioner.templates.h index 38db3728be..86132a20dc 100644 --- a/include/deal.II/base/partitioner.templates.h +++ b/include/deal.II/base/partitioner.templates.h @@ -42,9 +42,9 @@ namespace Utilities Partitioner::export_to_ghosted_array_start( const unsigned int communication_channel, const ArrayView &locally_owned_array, - const ArrayView & temporary_storage, - const ArrayView & ghost_array, - std::vector & requests) const + const ArrayView &temporary_storage, + const ArrayView &ghost_array, + std::vector &requests) const { AssertDimension(temporary_storage.size(), n_import_indices()); AssertIndexRange(communication_channel, 200); @@ -183,7 +183,7 @@ namespace Utilities void Partitioner::export_to_ghosted_array_finish( const ArrayView &ghost_array, - std::vector & requests) const + std::vector &requests) const { Assert(ghost_array.size() == n_ghost_indices() || ghost_array.size() == n_ghost_indices_in_larger_set, @@ -295,7 +295,7 @@ namespace Utilities const unsigned int communication_channel, const ArrayView &ghost_array, const ArrayView &temporary_storage, - std::vector & requests) const + std::vector &requests) const { AssertDimension(temporary_storage.size(), n_import_indices()); AssertIndexRange(communication_channel, 200); @@ -533,9 +533,9 @@ namespace Utilities Partitioner::import_from_ghosted_array_finish( const VectorOperation::values vector_operation, const ArrayView &temporary_storage, - const ArrayView & locally_owned_array, - const ArrayView & ghost_array, - std::vector & requests) const + const ArrayView &locally_owned_array, + const ArrayView &ghost_array, + std::vector &requests) const { AssertDimension(temporary_storage.size(), n_import_indices()); Assert(ghost_array.size() == n_ghost_indices() || diff --git a/include/deal.II/base/path_search.h b/include/deal.II/base/path_search.h index 6069e4aed3..d5e217c8c6 100644 --- a/include/deal.II/base/path_search.h +++ b/include/deal.II/base/path_search.h @@ -144,7 +144,7 @@ public: std::string find(const std::string &filename, const std::string &suffix, - const char * open_mode = "r"); + const char *open_mode = "r"); /** * Show the paths and suffixes used for this object. diff --git a/include/deal.II/base/patterns.h b/include/deal.II/base/patterns.h index 64fcb694b7..ea86f77f18 100644 --- a/include/deal.II/base/patterns.h +++ b/include/deal.II/base/patterns.h @@ -779,7 +779,7 @@ namespace Patterns * Constructor. */ Tuple(const std::vector> &patterns, - const std::string & separator = ":"); + const std::string &separator = ":"); /** * Constructor. Same as above, specialized for const char *. This is @@ -787,7 +787,7 @@ namespace Patterns * provided below. */ Tuple(const std::vector> &patterns, - const char * separator); + const char *separator); /** @@ -1320,7 +1320,7 @@ namespace Patterns * class template for particular kinds of template arguments @p T. */ static std::string - to_string(const T & s, + to_string(const T &s, const Patterns::PatternBase &p = *Convert::to_pattern()) = delete; @@ -1334,7 +1334,7 @@ namespace Patterns * class template for particular kinds of template arguments @p T. */ static T - to_value(const std::string & s, + to_value(const std::string &s, const Patterns::PatternBase &p = *Convert::to_pattern()) = delete; }; @@ -1515,7 +1515,7 @@ namespace Patterns } static std::string - to_string(const T & value, + to_string(const T &value, const Patterns::PatternBase &p = *Convert::to_pattern()) { std::stringstream str; @@ -1531,7 +1531,7 @@ namespace Patterns } static T - to_value(const std::string & s, + to_value(const std::string &s, const Patterns::PatternBase &p = *Convert::to_pattern()) { AssertThrow(p.match(s), ExcNoMatch(s, p.description())); @@ -1773,7 +1773,7 @@ namespace Patterns static std::string to_string( - const T & t, + const T &t, const Patterns::PatternBase &pattern = *Convert::to_pattern()) { const auto *p = dynamic_cast(&pattern); @@ -1799,7 +1799,7 @@ namespace Patterns } static T - to_value(const std::string & s, + to_value(const std::string &s, const Patterns::PatternBase &pattern = *Convert::to_pattern()) { AssertThrow(pattern.match(s), ExcNoMatch(s, pattern.description())); @@ -1844,7 +1844,7 @@ namespace Patterns static std::string to_string( - const T & t, + const T &t, const Patterns::PatternBase &pattern = *Convert::to_pattern()) { const auto *p = dynamic_cast(&pattern); @@ -1873,7 +1873,7 @@ namespace Patterns } static T - to_value(const std::string & s, + to_value(const std::string &s, const Patterns::PatternBase &pattern = *Convert::to_pattern()) { AssertThrow(pattern.match(s), ExcNoMatch(s, pattern.description())); @@ -1923,7 +1923,7 @@ namespace Patterns static std::string to_string( - const T & t, + const T &t, const Patterns::PatternBase &pattern = *Convert::to_pattern()) { const auto *p = dynamic_cast(&pattern); @@ -1949,7 +1949,7 @@ namespace Patterns } static T - to_value(const std::string & s, + to_value(const std::string &s, const Patterns::PatternBase &pattern = *Convert::to_pattern()) { AssertThrow(pattern.match(s), ExcNoMatch(s, pattern.description())); @@ -1990,7 +1990,7 @@ namespace Patterns static std::string to_string( - const T & t, + const T &t, const Patterns::PatternBase &pattern = *Convert::to_pattern()) { const auto *p = dynamic_cast(&pattern); @@ -2014,7 +2014,7 @@ namespace Patterns } static T - to_value(const std::string & s, + to_value(const std::string &s, const Patterns::PatternBase &pattern = *Convert::to_pattern()) { AssertThrow(pattern.match(s), ExcNoMatch(s, pattern.description())); @@ -2050,7 +2050,7 @@ namespace Patterns static std::string to_string( - const T & t, + const T &t, const Patterns::PatternBase &pattern = *Convert::to_pattern()) { return Convert>::to_string( @@ -2058,7 +2058,7 @@ namespace Patterns } static T - to_value(const std::string & s, + to_value(const std::string &s, const Patterns::PatternBase &pattern = *Convert::to_pattern()) { return T(Convert>::to_value(s, pattern)); @@ -2087,7 +2087,7 @@ namespace Patterns static std::string to_string( - const T & t, + const T &t, const Patterns::PatternBase &pattern = *Convert::to_pattern()) { const auto *p = dynamic_cast(&pattern); @@ -2108,7 +2108,7 @@ namespace Patterns } static T - to_value(const std::string & s, + to_value(const std::string &s, const Patterns::PatternBase &pattern = *Convert::to_pattern()) { AssertThrow(pattern.match(s), ExcNoMatch(s, pattern.description())); @@ -2144,7 +2144,7 @@ namespace Patterns static std::string to_string( - const T & t, + const T &t, const Patterns::PatternBase &pattern = *Convert::to_pattern()) { std::vector mask(t.size()); @@ -2155,7 +2155,7 @@ namespace Patterns } static T - to_value(const std::string & s, + to_value(const std::string &s, const Patterns::PatternBase &pattern = *Convert::to_pattern()) { const auto mask = Convert>::to_value(s, pattern); @@ -2184,7 +2184,7 @@ namespace Patterns static std::string to_string( - const T & t, + const T &t, const Patterns::PatternBase &pattern = *Convert::to_pattern()) { const auto *p = dynamic_cast(&pattern); @@ -2206,7 +2206,7 @@ namespace Patterns * Convert a string to a value, using the given pattern, or a default one. */ static T - to_value(const std::string & s, + to_value(const std::string &s, const Patterns::PatternBase &pattern = *Convert::to_pattern()) { AssertThrow(pattern.match(s), ExcNoMatch(s, pattern.description())); @@ -2240,7 +2240,7 @@ namespace Patterns static std::string to_string( - const T & t, + const T &t, const Patterns::PatternBase &pattern = *Convert::to_pattern()) { AssertThrow(pattern.match(t), ExcNoMatch(t, pattern.description())); @@ -2248,7 +2248,7 @@ namespace Patterns } static T - to_value(const std::string & s, + to_value(const std::string &s, const Patterns::PatternBase &pattern = *Convert::to_pattern()) { AssertThrow(pattern.match(s), ExcNoMatch(s, pattern.description())); @@ -2275,7 +2275,7 @@ namespace Patterns static std::string to_string( - const T & t, + const T &t, const Patterns::PatternBase &pattern = *Convert::to_pattern()) { std::tuple m(t); @@ -2285,7 +2285,7 @@ namespace Patterns } static T - to_value(const std::string & s, + to_value(const std::string &s, const Patterns::PatternBase &pattern = *Convert::to_pattern()) { std::tuple m; @@ -2312,7 +2312,7 @@ namespace Patterns static std::string to_string( - const T & t, + const T &t, const Patterns::PatternBase &pattern = *Convert::to_pattern()) { const auto *p = dynamic_cast(&pattern); @@ -2330,7 +2330,7 @@ namespace Patterns } static T - to_value(const std::string & s, + to_value(const std::string &s, const Patterns::PatternBase &pattern = *Convert::to_pattern()) { AssertThrow(pattern.match(s), ExcNoMatch(s, pattern.description())); @@ -2348,7 +2348,7 @@ namespace Patterns private: template static std::array::value> - to_string_internal_1(const T & t, + to_string_internal_1(const T &t, const Patterns::Tuple &pattern, std::index_sequence) { @@ -2368,7 +2368,7 @@ namespace Patterns template static T to_value_internal_1(const std::vector &s, - const Patterns::Tuple & pattern, + const Patterns::Tuple &pattern, std::index_sequence) { return std::make_tuple( @@ -2378,7 +2378,7 @@ namespace Patterns static T to_value_internal_2(const std::vector &s, - const Patterns::Tuple & pattern) + const Patterns::Tuple &pattern) { return Convert::to_value_internal_1( s, pattern, std::make_index_sequence::value>{}); diff --git a/include/deal.II/base/point.h b/include/deal.II/base/point.h index 1858cd3c2c..d99152f39a 100644 --- a/include/deal.II/base/point.h +++ b/include/deal.II/base/point.h @@ -193,7 +193,7 @@ public: * @note This function can also be used in @ref GlossDevice "device" code. */ DEAL_II_HOST_DEVICE Number & - operator()(const unsigned int index); + operator()(const unsigned int index); /** * Assignment operator from Tensor<1, dim, Number> with different underlying diff --git a/include/deal.II/base/polynomial.h b/include/deal.II/base/polynomial.h index 36f8b22523..2f44aa63bc 100644 --- a/include/deal.II/base/polynomial.h +++ b/include/deal.II/base/polynomial.h @@ -142,7 +142,7 @@ namespace Polynomials void value(const Number2 x, const unsigned int n_derivatives, - Number2 * values) const; + Number2 *values) const; /** * Similar to the function above, but evaluate the polynomials on several @@ -160,7 +160,7 @@ namespace Polynomials void values_of_array(const std::array &points, const unsigned int n_derivatives, - std::array * values) const; + std::array *values) const; /** * Degree of the polynomial. This is the degree reflected by the number of @@ -846,7 +846,7 @@ namespace Polynomials inline void Polynomial::value(const Number2 x, const unsigned int n_derivatives, - Number2 * values) const + Number2 *values) const { values_of_array(std::array{{x}}, n_derivatives, @@ -861,7 +861,7 @@ namespace Polynomials Polynomial::values_of_array( const std::array &x, const unsigned int n_derivatives, - std::array * values) const + std::array *values) const { // evaluate Lagrange polynomial and derivatives if (in_lagrange_product_form == true) diff --git a/include/deal.II/base/polynomial_space.h b/include/deal.II/base/polynomial_space.h index 279626fc3f..2739f70662 100644 --- a/include/deal.II/base/polynomial_space.h +++ b/include/deal.II/base/polynomial_space.h @@ -142,8 +142,8 @@ public: * compute_grad_grad() functions, see below, in a loop over all polynomials. */ void - evaluate(const Point & unit_point, - std::vector & values, + evaluate(const Point &unit_point, + std::vector &values, std::vector> &grads, std::vector> &grad_grads, std::vector> &third_derivatives, @@ -175,28 +175,28 @@ public: */ virtual Tensor<1, dim> compute_1st_derivative(const unsigned int i, - const Point & p) const override; + const Point &p) const override; /** * @copydoc ScalarPolynomialsBase::compute_2nd_derivative() */ virtual Tensor<2, dim> compute_2nd_derivative(const unsigned int i, - const Point & p) const override; + const Point &p) const override; /** * @copydoc ScalarPolynomialsBase::compute_3rd_derivative() */ virtual Tensor<3, dim> compute_3rd_derivative(const unsigned int i, - const Point & p) const override; + const Point &p) const override; /** * @copydoc ScalarPolynomialsBase::compute_4th_derivative() */ virtual Tensor<4, dim> compute_4th_derivative(const unsigned int i, - const Point & p) const override; + const Point &p) const override; /** * Compute the gradient of the ith polynomial at unit point @@ -331,7 +331,7 @@ template template Tensor PolynomialSpace::compute_derivative(const unsigned int i, - const Point & p) const + const Point &p) const { const std::array indices = compute_index(i); @@ -456,7 +456,7 @@ PolynomialSpace::compute_derivative(const unsigned int i, template inline Tensor<1, dim> PolynomialSpace::compute_1st_derivative(const unsigned int i, - const Point & p) const + const Point &p) const { return compute_derivative<1>(i, p); } @@ -466,7 +466,7 @@ PolynomialSpace::compute_1st_derivative(const unsigned int i, template inline Tensor<2, dim> PolynomialSpace::compute_2nd_derivative(const unsigned int i, - const Point & p) const + const Point &p) const { return compute_derivative<2>(i, p); } @@ -476,7 +476,7 @@ PolynomialSpace::compute_2nd_derivative(const unsigned int i, template inline Tensor<3, dim> PolynomialSpace::compute_3rd_derivative(const unsigned int i, - const Point & p) const + const Point &p) const { return compute_derivative<3>(i, p); } @@ -486,7 +486,7 @@ PolynomialSpace::compute_3rd_derivative(const unsigned int i, template inline Tensor<4, dim> PolynomialSpace::compute_4th_derivative(const unsigned int i, - const Point & p) const + const Point &p) const { return compute_derivative<4>(i, p); } diff --git a/include/deal.II/base/polynomials_abf.h b/include/deal.II/base/polynomials_abf.h index 3aaaed9a58..757848bb40 100644 --- a/include/deal.II/base/polynomials_abf.h +++ b/include/deal.II/base/polynomials_abf.h @@ -71,7 +71,7 @@ public: * the first case, the function will not compute these values. */ void - evaluate(const Point & unit_point, + evaluate(const Point &unit_point, std::vector> &values, std::vector> &grads, std::vector> &grad_grads, diff --git a/include/deal.II/base/polynomials_adini.h b/include/deal.II/base/polynomials_adini.h index 1fcd61be24..afa2c9f8f4 100644 --- a/include/deal.II/base/polynomials_adini.h +++ b/include/deal.II/base/polynomials_adini.h @@ -63,8 +63,8 @@ public: * compute_grad_grad() functions, see below, in a loop over all polynomials. */ void - evaluate(const Point & unit_point, - std::vector & values, + evaluate(const Point &unit_point, + std::vector &values, std::vector> &grads, std::vector> &grad_grads, std::vector> &third_derivatives, @@ -83,28 +83,28 @@ public: */ virtual Tensor<1, dim> compute_1st_derivative(const unsigned int i, - const Point & p) const override; + const Point &p) const override; /** * @copydoc ScalarPolynomialsBase::compute_2nd_derivative() */ virtual Tensor<2, dim> compute_2nd_derivative(const unsigned int i, - const Point & p) const override; + const Point &p) const override; /** * @copydoc ScalarPolynomialsBase::compute_3rd_derivative() */ virtual Tensor<3, dim> compute_3rd_derivative(const unsigned int i, - const Point & p) const override; + const Point &p) const override; /** * @copydoc ScalarPolynomialsBase::compute_4th_derivative() */ virtual Tensor<4, dim> compute_4th_derivative(const unsigned int i, - const Point & p) const override; + const Point &p) const override; /** * Compute the gradient of the ith polynomial at diff --git a/include/deal.II/base/polynomials_barycentric.h b/include/deal.II/base/polynomials_barycentric.h index cc1764fc2c..accc4ffb21 100644 --- a/include/deal.II/base/polynomials_barycentric.h +++ b/include/deal.II/base/polynomials_barycentric.h @@ -206,7 +206,7 @@ protected: * exponents). */ static TableIndices - index_to_indices(const std::size_t & index, + index_to_indices(const std::size_t &index, const TableIndices &extent); }; @@ -269,8 +269,8 @@ public: * @copydoc ScalarPolynomialsBase::evaluate() */ void - evaluate(const Point & unit_point, - std::vector & values, + evaluate(const Point &unit_point, + std::vector &values, std::vector> &grads, std::vector> &grad_grads, std::vector> &third_derivatives, @@ -287,28 +287,28 @@ public: */ Tensor<1, dim> compute_1st_derivative(const unsigned int i, - const Point & p) const override; + const Point &p) const override; /** * @copydoc ScalarPolynomialsBase::compute_2nd_derivative() */ Tensor<2, dim> compute_2nd_derivative(const unsigned int i, - const Point & p) const override; + const Point &p) const override; /** * @copydoc ScalarPolynomialsBase::compute_3rd_derivative() */ Tensor<3, dim> compute_3rd_derivative(const unsigned int i, - const Point & p) const override; + const Point &p) const override; /** * @copydoc ScalarPolynomialsBase::compute_4th_derivative() */ Tensor<4, dim> compute_4th_derivative(const unsigned int i, - const Point & p) const override; + const Point &p) const override; /** * @copydoc ScalarPolynomialsBase::compute_grad() @@ -598,7 +598,7 @@ BarycentricPolynomial::operator*( const auto &coef_1 = this->coefficients; const auto &coef_2 = multiplicand.coefficients; - auto & coef_out = result.coefficients; + auto &coef_out = result.coefficients; for (std::size_t i1 = 0; i1 < coef_1.n_elements(); ++i1) { @@ -633,8 +633,8 @@ BarycentricPolynomial::barycentric_derivative( deg[coordinate] -= 1; BarycentricPolynomial result(deg, std::numeric_limits::max()); - const auto & coeffs_in = coefficients; - auto & coeffs_out = result.coefficients; + const auto &coeffs_in = coefficients; + auto &coeffs_out = result.coefficients; for (std::size_t i = 0; i < coeffs_out.n_elements(); ++i) { const auto out_index = index_to_indices(i, coeffs_out.size()); @@ -705,7 +705,7 @@ BarycentricPolynomial::memory_consumption() const template TableIndices BarycentricPolynomial::index_to_indices( - const std::size_t & index, + const std::size_t &index, const TableIndices &extent) { TableIndices result; diff --git a/include/deal.II/base/polynomials_bdm.h b/include/deal.II/base/polynomials_bdm.h index a771861330..618cd5d29a 100644 --- a/include/deal.II/base/polynomials_bdm.h +++ b/include/deal.II/base/polynomials_bdm.h @@ -117,7 +117,7 @@ public: * the first case, the function will not compute these values. */ void - evaluate(const Point & unit_point, + evaluate(const Point &unit_point, std::vector> &values, std::vector> &grads, std::vector> &grad_grads, diff --git a/include/deal.II/base/polynomials_bernardi_raugel.h b/include/deal.II/base/polynomials_bernardi_raugel.h index e983be8e55..d4d1411d5c 100644 --- a/include/deal.II/base/polynomials_bernardi_raugel.h +++ b/include/deal.II/base/polynomials_bernardi_raugel.h @@ -108,7 +108,7 @@ public: * the first case, the function will not compute these values. */ void - evaluate(const Point & unit_point, + evaluate(const Point &unit_point, std::vector> &values, std::vector> &grads, std::vector> &grad_grads, diff --git a/include/deal.II/base/polynomials_nedelec.h b/include/deal.II/base/polynomials_nedelec.h index 9d23597cf4..a278ee00ab 100644 --- a/include/deal.II/base/polynomials_nedelec.h +++ b/include/deal.II/base/polynomials_nedelec.h @@ -68,7 +68,7 @@ public: * the first case, the function will not compute these values. */ void - evaluate(const Point & unit_point, + evaluate(const Point &unit_point, std::vector> &values, std::vector> &grads, std::vector> &grad_grads, diff --git a/include/deal.II/base/polynomials_piecewise.h b/include/deal.II/base/polynomials_piecewise.h index 70a57f01ae..dc9ee62f37 100644 --- a/include/deal.II/base/polynomials_piecewise.h +++ b/include/deal.II/base/polynomials_piecewise.h @@ -133,7 +133,7 @@ namespace Polynomials void value(const number x, const unsigned int n_derivatives, - number * values) const; + number *values) const; /** * Degree of the polynomial. This is the degree of the underlying base diff --git a/include/deal.II/base/polynomials_pyramid.h b/include/deal.II/base/polynomials_pyramid.h index 2ba79b8ca2..5e07e6239a 100644 --- a/include/deal.II/base/polynomials_pyramid.h +++ b/include/deal.II/base/polynomials_pyramid.h @@ -49,8 +49,8 @@ public: * @note Currently, only the vectors @p values and @p grads are filled. */ void - evaluate(const Point & unit_point, - std::vector & values, + evaluate(const Point &unit_point, + std::vector &values, std::vector> &grads, std::vector> &grad_grads, std::vector> &third_derivatives, @@ -70,11 +70,11 @@ public: Tensor<1, dim> compute_1st_derivative(const unsigned int i, - const Point & p) const override; + const Point &p) const override; Tensor<2, dim> compute_2nd_derivative(const unsigned int i, - const Point & p) const override; + const Point &p) const override; /** * @copydoc ScalarPolynomialsBase::compute_3rd_derivative() @@ -83,7 +83,7 @@ public: */ Tensor<3, dim> compute_3rd_derivative(const unsigned int i, - const Point & p) const override; + const Point &p) const override; /** * @copydoc ScalarPolynomialsBase::compute_4th_derivative() @@ -92,7 +92,7 @@ public: */ Tensor<4, dim> compute_4th_derivative(const unsigned int i, - const Point & p) const override; + const Point &p) const override; /** * @copydoc ScalarPolynomialsBase::compute_grad() @@ -124,7 +124,7 @@ template Tensor ScalarLagrangePolynomialPyramid::compute_derivative( const unsigned int i, - const Point & p) const + const Point &p) const { Tensor der; diff --git a/include/deal.II/base/polynomials_rannacher_turek.h b/include/deal.II/base/polynomials_rannacher_turek.h index b6ba0046c1..14934a1799 100644 --- a/include/deal.II/base/polynomials_rannacher_turek.h +++ b/include/deal.II/base/polynomials_rannacher_turek.h @@ -72,28 +72,28 @@ public: */ virtual Tensor<1, dim> compute_1st_derivative(const unsigned int i, - const Point & p) const override; + const Point &p) const override; /** * @copydoc ScalarPolynomialsBase::compute_2nd_derivative() */ virtual Tensor<2, dim> compute_2nd_derivative(const unsigned int i, - const Point & p) const override; + const Point &p) const override; /** * @copydoc ScalarPolynomialsBase::compute_3rd_derivative() */ virtual Tensor<3, dim> compute_3rd_derivative(const unsigned int i, - const Point & p) const override; + const Point &p) const override; /** * @copydoc ScalarPolynomialsBase::compute_4th_derivative() */ virtual Tensor<4, dim> compute_4th_derivative(const unsigned int i, - const Point & p) const override; + const Point &p) const override; /** * Gradient of basis function @p i at @p p. @@ -114,8 +114,8 @@ public: * zero. A size of zero means that we are not computing the vector entries. */ void - evaluate(const Point & unit_point, - std::vector & values, + evaluate(const Point &unit_point, + std::vector &values, std::vector> &grads, std::vector> &grad_grads, std::vector> &third_derivatives, @@ -238,7 +238,7 @@ template template Tensor PolynomialsRannacherTurek::compute_derivative(const unsigned int i, - const Point & p) const + const Point &p) const { return internal::PolynomialsRannacherTurekImplementation::compute_derivative< order>(i, p); @@ -250,7 +250,7 @@ template inline Tensor<1, dim> PolynomialsRannacherTurek::compute_1st_derivative( const unsigned int i, - const Point & p) const + const Point &p) const { return compute_derivative<1>(i, p); } @@ -261,7 +261,7 @@ template inline Tensor<2, dim> PolynomialsRannacherTurek::compute_2nd_derivative( const unsigned int i, - const Point & p) const + const Point &p) const { return compute_derivative<2>(i, p); } @@ -272,7 +272,7 @@ template inline Tensor<3, dim> PolynomialsRannacherTurek::compute_3rd_derivative( const unsigned int i, - const Point & p) const + const Point &p) const { return compute_derivative<3>(i, p); } @@ -283,7 +283,7 @@ template inline Tensor<4, dim> PolynomialsRannacherTurek::compute_4th_derivative( const unsigned int i, - const Point & p) const + const Point &p) const { return compute_derivative<4>(i, p); } diff --git a/include/deal.II/base/polynomials_raviart_thomas.h b/include/deal.II/base/polynomials_raviart_thomas.h index 0699043ddd..f8b7ab020f 100644 --- a/include/deal.II/base/polynomials_raviart_thomas.h +++ b/include/deal.II/base/polynomials_raviart_thomas.h @@ -82,7 +82,7 @@ public: * the first case, the function will not compute these values. */ void - evaluate(const Point & unit_point, + evaluate(const Point &unit_point, std::vector> &values, std::vector> &grads, std::vector> &grad_grads, diff --git a/include/deal.II/base/polynomials_rt_bubbles.h b/include/deal.II/base/polynomials_rt_bubbles.h index 7807b6a188..84ebf5bc47 100644 --- a/include/deal.II/base/polynomials_rt_bubbles.h +++ b/include/deal.II/base/polynomials_rt_bubbles.h @@ -105,7 +105,7 @@ public: * the first case, the function will not compute these values. */ void - evaluate(const Point & unit_point, + evaluate(const Point &unit_point, std::vector> &values, std::vector> &grads, std::vector> &grad_grads, diff --git a/include/deal.II/base/polynomials_wedge.h b/include/deal.II/base/polynomials_wedge.h index 734e75b9f7..d39c0f39f7 100644 --- a/include/deal.II/base/polynomials_wedge.h +++ b/include/deal.II/base/polynomials_wedge.h @@ -95,8 +95,8 @@ public: * @note Currently, only the vectors @p values and @p grads are filled. */ void - evaluate(const Point & unit_point, - std::vector & values, + evaluate(const Point &unit_point, + std::vector &values, std::vector> &grads, std::vector> &grad_grads, std::vector> &third_derivatives, @@ -116,7 +116,7 @@ public: Tensor<1, dim> compute_1st_derivative(const unsigned int i, - const Point & p) const override; + const Point &p) const override; /** * @copydoc ScalarPolynomialsBase::compute_2nd_derivative() @@ -125,7 +125,7 @@ public: */ Tensor<2, dim> compute_2nd_derivative(const unsigned int i, - const Point & p) const override; + const Point &p) const override; /** * @copydoc ScalarPolynomialsBase::compute_3rd_derivative() @@ -134,7 +134,7 @@ public: */ Tensor<3, dim> compute_3rd_derivative(const unsigned int i, - const Point & p) const override; + const Point &p) const override; /** * @copydoc ScalarPolynomialsBase::compute_4th_derivative() @@ -143,7 +143,7 @@ public: */ Tensor<4, dim> compute_4th_derivative(const unsigned int i, - const Point & p) const override; + const Point &p) const override; /** * @copydoc ScalarPolynomialsBase::compute_grad() @@ -186,7 +186,7 @@ template Tensor ScalarLagrangePolynomialWedge::compute_derivative( const unsigned int i, - const Point & p) const + const Point &p) const { Tensor der; diff --git a/include/deal.II/base/qprojector.h b/include/deal.II/base/qprojector.h index af79debc34..40849a6b53 100644 --- a/include/deal.II/base/qprojector.h +++ b/include/deal.II/base/qprojector.h @@ -94,8 +94,8 @@ public: * doc for this class. */ static void - project_to_face(const ReferenceCell & reference_cell, - const SubQuadrature & quadrature, + project_to_face(const ReferenceCell &reference_cell, + const SubQuadrature &quadrature, const unsigned int face_no, std::vector> &q_points); @@ -133,11 +133,11 @@ public: * same as those of the original rule. */ static void - project_to_subface(const ReferenceCell & reference_cell, - const SubQuadrature & quadrature, + project_to_subface(const ReferenceCell &reference_cell, + const SubQuadrature &quadrature, const unsigned int face_no, const unsigned int subface_no, - std::vector> & q_points, + std::vector> &q_points, const RefinementCase &ref_case = RefinementCase::isotropic_refinement); @@ -155,8 +155,8 @@ public: * version of this function that takes the reference cell type instead. */ static Quadrature - project_to_subface(const ReferenceCell & reference_cell, - const SubQuadrature & quadrature, + project_to_subface(const ReferenceCell &reference_cell, + const SubQuadrature &quadrature, const unsigned int face_no, const unsigned int subface_no, const RefinementCase &ref_case = @@ -172,8 +172,8 @@ public: * same as those of the original rule. */ static Quadrature - project_to_oriented_subface(const ReferenceCell & reference_cell, - const SubQuadrature & quadrature, + project_to_oriented_subface(const ReferenceCell &reference_cell, + const SubQuadrature &quadrature, const unsigned int face_no, const unsigned int subface_no, const bool face_orientation, @@ -198,7 +198,7 @@ public: * each face, in order to cope possibly different orientations of the mesh. */ static Quadrature - project_to_all_faces(const ReferenceCell & reference_cell, + project_to_all_faces(const ReferenceCell &reference_cell, const hp::QCollection &quadrature); /** @@ -206,7 +206,7 @@ public: * formula on all faces. */ static Quadrature - project_to_all_faces(const ReferenceCell & reference_cell, + project_to_all_faces(const ReferenceCell &reference_cell, const Quadrature &quadrature); /** @@ -237,7 +237,7 @@ public: * GeometryInfo::children_per_cell. */ static Quadrature - project_to_child(const ReferenceCell & reference_cell, + project_to_child(const ReferenceCell &reference_cell, const Quadrature &quadrature, const unsigned int child_no); @@ -251,7 +251,7 @@ public: * refinement of the cell. */ static Quadrature - project_to_all_children(const ReferenceCell & reference_cell, + project_to_all_children(const ReferenceCell &reference_cell, const Quadrature &quadrature); /** @@ -261,8 +261,8 @@ public: static Quadrature project_to_line(const ReferenceCell &reference_cell, const Quadrature<1> &quadrature, - const Point & p1, - const Point & p2); + const Point &p1, + const Point &p2); /** * Since the project_to_all_faces() and project_to_all_subfaces() functions @@ -316,7 +316,7 @@ public: * that each face might have different number of quadrature points. */ static DataSetDescriptor - face(const ReferenceCell & reference_cell, + face(const ReferenceCell &reference_cell, const unsigned int face_no, const bool face_orientation, const bool face_flip, @@ -336,7 +336,7 @@ public: * Through the last argument anisotropic refinement can be respected. */ static DataSetDescriptor - subface(const ReferenceCell & reference_cell, + subface(const ReferenceCell &reference_cell, const unsigned int face_no, const unsigned int subface_no, const bool face_orientation, @@ -408,7 +408,7 @@ inline QProjector::DataSetDescriptor::operator unsigned int() const template Quadrature inline QProjector::project_to_all_faces( - const ReferenceCell & reference_cell, + const ReferenceCell &reference_cell, const Quadrature &quadrature) { return project_to_all_faces(reference_cell, @@ -429,20 +429,20 @@ QProjector<1>::project_to_face(const ReferenceCell &reference_cell, std::vector> &); template <> void -QProjector<2>::project_to_face(const ReferenceCell & reference_cell, - const Quadrature<1> & quadrature, +QProjector<2>::project_to_face(const ReferenceCell &reference_cell, + const Quadrature<1> &quadrature, const unsigned int face_no, std::vector> &q_points); template <> void -QProjector<3>::project_to_face(const ReferenceCell & reference_cell, - const Quadrature<2> & quadrature, +QProjector<3>::project_to_face(const ReferenceCell &reference_cell, + const Quadrature<2> &quadrature, const unsigned int face_no, std::vector> &q_points); template <> Quadrature<1> -QProjector<1>::project_to_all_faces(const ReferenceCell & reference_cell, +QProjector<1>::project_to_all_faces(const ReferenceCell &reference_cell, const hp::QCollection<0> &quadrature); @@ -456,19 +456,19 @@ QProjector<1>::project_to_subface(const ReferenceCell &reference_cell, const RefinementCase<0> &); template <> void -QProjector<2>::project_to_subface(const ReferenceCell & reference_cell, - const Quadrature<1> & quadrature, +QProjector<2>::project_to_subface(const ReferenceCell &reference_cell, + const Quadrature<1> &quadrature, const unsigned int face_no, const unsigned int subface_no, std::vector> &q_points, const RefinementCase<1> &); template <> void -QProjector<3>::project_to_subface(const ReferenceCell & reference_cell, - const Quadrature<2> & quadrature, +QProjector<3>::project_to_subface(const ReferenceCell &reference_cell, + const Quadrature<2> &quadrature, const unsigned int face_no, const unsigned int subface_no, - std::vector> & q_points, + std::vector> &q_points, const RefinementCase<2> &face_ref_case); template <> diff --git a/include/deal.II/base/quadrature.h b/include/deal.II/base/quadrature.h index e83b89682f..16bd884e36 100644 --- a/include/deal.II/base/quadrature.h +++ b/include/deal.II/base/quadrature.h @@ -187,7 +187,7 @@ public: * You will want to have the weights sum up to one, but this is not checked. */ Quadrature(const std::vector> &points, - const std::vector & weights); + const std::vector &weights); /** * Construct a quadrature formula from given vectors of quadrature points @@ -242,7 +242,7 @@ public: */ void initialize(const std::vector> &points, - const std::vector & weights); + const std::vector &weights); /** * Number of quadrature points. @@ -439,7 +439,7 @@ public: * * @note We require that `intervals.front() == 0` and `interval.back() == 1`. */ - QIterated(const Quadrature<1> & base_quadrature, + QIterated(const Quadrature<1> &base_quadrature, const std::vector> &intervals); /** diff --git a/include/deal.II/base/quadrature_lib.h b/include/deal.II/base/quadrature_lib.h index 86238331f0..e7ba3b2f85 100644 --- a/include/deal.II/base/quadrature_lib.h +++ b/include/deal.II/base/quadrature_lib.h @@ -244,7 +244,7 @@ public: * formula or it is factored out, to be included in the integrand. */ QGaussLogR(const unsigned int n, - const Point & x0 = Point(), + const Point &x0 = Point(), const double alpha = 1, const bool factor_out_singular_weight = false); @@ -324,7 +324,7 @@ public: * @endcode */ QGaussOneOverR(const unsigned int n, - const Point & singularity, + const Point &singularity, const bool factor_out_singular_weight = false); /** * The constructor takes three arguments: the order of the Gauss formula, @@ -966,7 +966,7 @@ template <> QGaussLog<1>::QGaussLog(const unsigned int n, const bool revert); template <> QGaussLogR<1>::QGaussLogR(const unsigned int n, - const Point<1> & x0, + const Point<1> &x0, const double alpha, const bool flag); template <> @@ -975,7 +975,7 @@ QGaussOneOverR<2>::QGaussOneOverR(const unsigned int n, const bool flag); template <> QTelles<1>::QTelles(const Quadrature<1> &base_quad, - const Point<1> & singularity); + const Point<1> &singularity); #endif // DOXYGEN diff --git a/include/deal.II/base/quadrature_point_data.h b/include/deal.II/base/quadrature_point_data.h index ca622cac12..be487ce0fe 100644 --- a/include/deal.II/base/quadrature_point_data.h +++ b/include/deal.II/base/quadrature_point_data.h @@ -475,7 +475,7 @@ namespace parallel */ void prepare_for_coarsening_and_refinement( - parallel::distributed::Triangulation & tria, + parallel::distributed::Triangulation &tria, CellDataStorage &data_storage); /** @@ -500,7 +500,7 @@ namespace parallel std::vector pack_function( const typename parallel::distributed::Triangulation::cell_iterator - & cell, + &cell, const CellStatus status); /** @@ -511,7 +511,7 @@ namespace parallel void unpack_function( const typename parallel::distributed::Triangulation::cell_iterator - & cell, + &cell, const CellStatus status, const boost::iterator_range::const_iterator> &data_range); @@ -818,9 +818,9 @@ CellDataStorage::try_get_data( */ template inline void -pack_cell_data(const CellIteratorType & cell, +pack_cell_data(const CellIteratorType &cell, const CellDataStorage *data_storage, - FullMatrix & matrix_data) + FullMatrix &matrix_data) { static_assert(std::is_base_of_v, "User's DataType class should be derived from QPData"); @@ -855,8 +855,8 @@ pack_cell_data(const CellIteratorType & cell, */ template inline void -unpack_to_cell_data(const CellIteratorType & cell, - const FullMatrix & values_at_qp, +unpack_to_cell_data(const CellIteratorType &cell, + const FullMatrix &values_at_qp, CellDataStorage *data_storage) { static_assert(std::is_base_of_v, @@ -889,8 +889,8 @@ namespace parallel template inline ContinuousQuadratureDataTransfer:: ContinuousQuadratureDataTransfer(const FiniteElement &projection_fe_, - const Quadrature & lhs_quadrature, - const Quadrature & rhs_quadrature) + const Quadrature &lhs_quadrature, + const Quadrature &rhs_quadrature) : projection_fe( std::unique_ptr>(projection_fe_.clone())) , data_size_in_bytes(0) @@ -922,7 +922,7 @@ namespace parallel inline void ContinuousQuadratureDataTransfer:: prepare_for_coarsening_and_refinement( - parallel::distributed::Triangulation & tr_, + parallel::distributed::Triangulation &tr_, CellDataStorage &data_storage_) { Assert(data_storage == nullptr, @@ -986,7 +986,7 @@ namespace parallel inline void ContinuousQuadratureDataTransfer::unpack_function( const typename parallel::distributed::Triangulation::cell_iterator - & cell, + &cell, const CellStatus status, const boost::iterator_range::const_iterator> &data_range) diff --git a/include/deal.II/base/scalar_polynomials_base.h b/include/deal.II/base/scalar_polynomials_base.h index 7e6b4507d1..4ab3f99dd6 100644 --- a/include/deal.II/base/scalar_polynomials_base.h +++ b/include/deal.II/base/scalar_polynomials_base.h @@ -99,8 +99,8 @@ public: * in a loop over all tensor product polynomials. */ virtual void - evaluate(const Point & unit_point, - std::vector & values, + evaluate(const Point &unit_point, + std::vector &values, std::vector> &grads, std::vector> &grad_grads, std::vector> &third_derivatives, @@ -257,7 +257,7 @@ template template inline Tensor ScalarPolynomialsBase::compute_derivative(const unsigned int i, - const Point & p) const + const Point &p) const { if (order == 1) { diff --git a/include/deal.II/base/subscriptor.h b/include/deal.II/base/subscriptor.h index b1d787b2b2..1930ab2622 100644 --- a/include/deal.II/base/subscriptor.h +++ b/include/deal.II/base/subscriptor.h @@ -115,7 +115,7 @@ public: */ void subscribe(std::atomic *const validity, - const std::string & identifier = "") const; + const std::string &identifier = "") const; /** * Unsubscribes a user from the object. @@ -125,7 +125,7 @@ public: */ void unsubscribe(std::atomic *const validity, - const std::string & identifier = "") const; + const std::string &identifier = "") const; /** * Return the present number of subscriptions to this object. This allows to diff --git a/include/deal.II/base/symbolic_function.h b/include/deal.II/base/symbolic_function.h index 42a7a3c14d..0e3728c3aa 100644 --- a/include/deal.II/base/symbolic_function.h +++ b/include/deal.II/base/symbolic_function.h @@ -298,17 +298,17 @@ namespace Functions // documentation inherited from the base class virtual Tensor<1, dim, RangeNumberType> - gradient(const Point & p, + gradient(const Point &p, const unsigned int component = 0) const override; // documentation inherited from the base class virtual RangeNumberType - laplacian(const Point & p, + laplacian(const Point &p, const unsigned int component = 0) const override; // documentation inherited from the base class virtual SymmetricTensor<2, dim, RangeNumberType> - hessian(const Point & p, + hessian(const Point &p, const unsigned int component = 0) const override; /** diff --git a/include/deal.II/base/symbolic_function.templates.h b/include/deal.II/base/symbolic_function.templates.h index b71425ec1c..e1e8a136e8 100644 --- a/include/deal.II/base/symbolic_function.templates.h +++ b/include/deal.II/base/symbolic_function.templates.h @@ -42,9 +42,9 @@ namespace Functions template SymbolicFunction::SymbolicFunction( - const std::vector & functions, + const std::vector &functions, const Tensor<1, dim, Differentiation::SD::Expression> &argument, - const Differentiation::SD::Expression & time, + const Differentiation::SD::Expression &time, const Differentiation::SD::types::substitution_map &user_substitution_map) : Function(functions.size(), 0.0) , user_function(functions) @@ -227,7 +227,7 @@ namespace Functions template RangeNumberType SymbolicFunction::value( - const Point & p, + const Point &p, const unsigned int component) const { update_values(); @@ -241,7 +241,7 @@ namespace Functions template Tensor<1, dim, RangeNumberType> SymbolicFunction::gradient( - const Point & p, + const Point &p, const unsigned int component) const { update_first_derivatives(); @@ -255,7 +255,7 @@ namespace Functions template RangeNumberType SymbolicFunction::laplacian( - const Point & p, + const Point &p, const unsigned int component) const { update_second_derivatives(); @@ -269,7 +269,7 @@ namespace Functions template SymmetricTensor<2, dim, RangeNumberType> SymbolicFunction::hessian( - const Point & p, + const Point &p, const unsigned int component) const { update_second_derivatives(); diff --git a/include/deal.II/base/symmetric_tensor.h b/include/deal.II/base/symmetric_tensor.h index 646265e8f6..c8e9f6cd8b 100644 --- a/include/deal.II/base/symmetric_tensor.h +++ b/include/deal.II/base/symmetric_tensor.h @@ -509,7 +509,7 @@ namespace internal * than the mother object, avoid problems with data consistency. */ DEAL_II_HOST - constexpr Accessor(tensor_type & tensor, + constexpr Accessor(tensor_type &tensor, const TableIndices &previous_indices); /** @@ -538,7 +538,7 @@ namespace internal /** * Store the data given to the constructor. */ - tensor_type & tensor; + tensor_type &tensor; const TableIndices previous_indices; // Declare some other classes as friends. Make sure to work around bugs @@ -595,7 +595,7 @@ namespace internal * than the mother object, avoid problems with data consistency. */ DEAL_II_HOST - constexpr Accessor(tensor_type & tensor, + constexpr Accessor(tensor_type &tensor, const TableIndices &previous_indices); /** @@ -624,7 +624,7 @@ namespace internal /** * Store the data given to the constructor. */ - tensor_type & tensor; + tensor_type &tensor; const TableIndices previous_indices; // Declare some other classes as friends. Make sure to work around bugs @@ -1198,7 +1198,7 @@ namespace internal template DEAL_II_HOST constexpr DEAL_II_ALWAYS_INLINE Accessor::Accessor( - tensor_type & tensor, + tensor_type &tensor, const TableIndices &previous_indices) : tensor(tensor) , previous_indices(previous_indices) @@ -1233,7 +1233,7 @@ namespace internal template DEAL_II_HOST constexpr DEAL_II_ALWAYS_INLINE Accessor::Accessor( - tensor_type & tensor, + tensor_type &tensor, const TableIndices &previous_indices) : tensor(tensor) , previous_indices(previous_indices) @@ -2691,7 +2691,7 @@ SymmetricTensor::serialize(Archive &ar, const unsigned int) template DEAL_II_HOST constexpr inline DEAL_II_ALWAYS_INLINE SymmetricTensor::type> - operator+(const SymmetricTensor & left, + operator+(const SymmetricTensor &left, const SymmetricTensor &right) { SymmetricTensor::type> @@ -2716,7 +2716,7 @@ DEAL_II_HOST constexpr inline DEAL_II_ALWAYS_INLINE template DEAL_II_HOST constexpr inline DEAL_II_ALWAYS_INLINE SymmetricTensor::type> - operator-(const SymmetricTensor & left, + operator-(const SymmetricTensor &left, const SymmetricTensor &right) { SymmetricTensor::type> @@ -2737,7 +2737,7 @@ template DEAL_II_HOST constexpr DEAL_II_ALWAYS_INLINE Tensor::type> operator+(const SymmetricTensor &left, - const Tensor & right) + const Tensor &right) { return Tensor(left) + right; } @@ -2753,7 +2753,7 @@ DEAL_II_HOST constexpr DEAL_II_ALWAYS_INLINE template DEAL_II_HOST constexpr DEAL_II_ALWAYS_INLINE Tensor::type> - operator+(const Tensor & left, + operator+(const Tensor &left, const SymmetricTensor &right) { return left + Tensor(right); @@ -2771,7 +2771,7 @@ template DEAL_II_HOST constexpr DEAL_II_ALWAYS_INLINE Tensor::type> operator-(const SymmetricTensor &left, - const Tensor & right) + const Tensor &right) { return Tensor(left) - right; } @@ -2787,7 +2787,7 @@ DEAL_II_HOST constexpr DEAL_II_ALWAYS_INLINE template DEAL_II_HOST constexpr DEAL_II_ALWAYS_INLINE Tensor::type> - operator-(const Tensor & left, + operator-(const Tensor &left, const SymmetricTensor &right) { return left - Tensor(right); @@ -3052,9 +3052,9 @@ namespace internal template void tridiagonalize(const dealii::SymmetricTensor<2, dim, Number> &A, - dealii::Tensor<2, dim, Number> & Q, - std::array & d, - std::array & e); + dealii::Tensor<2, dim, Number> &Q, + std::array &d, + std::array &e); @@ -3615,7 +3615,7 @@ DEAL_II_HOST constexpr inline DEAL_II_ALWAYS_INLINE SymmetricTensor< typename ProductType::type>::type> operator*(const SymmetricTensor &t, - const OtherNumber & factor) + const OtherNumber &factor) { // form the product. we have to convert the two factors into the final // type via explicit casts because, for awkward reasons, the C++ @@ -3643,7 +3643,7 @@ DEAL_II_HOST constexpr inline DEAL_II_ALWAYS_INLINE SymmetricTensor< dim, typename ProductType::type>::type> -operator*(const Number & factor, +operator*(const Number &factor, const SymmetricTensor &t) { // simply forward to the other operator with switched arguments @@ -3664,7 +3664,7 @@ DEAL_II_HOST constexpr inline SymmetricTensor< typename ProductType::type>::type> operator/(const SymmetricTensor &t, - const OtherNumber & factor) + const OtherNumber &factor) { using product_type = typename ProductType::type; SymmetricTensor tt(t); @@ -3734,7 +3734,7 @@ operator/(const SymmetricTensor &t, const double factor) template DEAL_II_HOST constexpr DEAL_II_ALWAYS_INLINE typename ProductType::type - scalar_product(const SymmetricTensor<2, dim, Number> & t1, + scalar_product(const SymmetricTensor<2, dim, Number> &t1, const SymmetricTensor<2, dim, OtherNumber> &t2) { return (t1 * t2); @@ -3757,7 +3757,7 @@ template DEAL_II_HOST constexpr inline DEAL_II_ALWAYS_INLINE typename ProductType::type scalar_product(const SymmetricTensor<2, dim, Number> &t1, - const Tensor<2, dim, OtherNumber> & t2) + const Tensor<2, dim, OtherNumber> &t2) { typename ProductType::type s = internal::NumberType< typename ProductType::type>::value(0.0); @@ -3783,7 +3783,7 @@ DEAL_II_HOST constexpr inline DEAL_II_ALWAYS_INLINE template DEAL_II_HOST constexpr DEAL_II_ALWAYS_INLINE typename ProductType::type - scalar_product(const Tensor<2, dim, Number> & t1, + scalar_product(const Tensor<2, dim, Number> &t1, const SymmetricTensor<2, dim, OtherNumber> &t2) { return scalar_product(t2, t1); @@ -3808,8 +3808,8 @@ template DEAL_II_HOST constexpr inline DEAL_II_ALWAYS_INLINE void double_contract( SymmetricTensor<2, 1, typename ProductType::type> &tmp, - const SymmetricTensor<4, 1, Number> & t, - const SymmetricTensor<2, 1, OtherNumber> & s) + const SymmetricTensor<4, 1, Number> &t, + const SymmetricTensor<2, 1, OtherNumber> &s) { tmp[0][0] = t[0][0][0][0] * s[0][0]; } @@ -3834,8 +3834,8 @@ template DEAL_II_HOST constexpr inline void double_contract( SymmetricTensor<2, 1, typename ProductType::type> &tmp, - const SymmetricTensor<2, 1, Number> & s, - const SymmetricTensor<4, 1, OtherNumber> & t) + const SymmetricTensor<2, 1, Number> &s, + const SymmetricTensor<4, 1, OtherNumber> &t) { tmp[0][0] = t[0][0][0][0] * s[0][0]; } @@ -3860,8 +3860,8 @@ template DEAL_II_HOST constexpr inline void double_contract( SymmetricTensor<2, 2, typename ProductType::type> &tmp, - const SymmetricTensor<4, 2, Number> & t, - const SymmetricTensor<2, 2, OtherNumber> & s) + const SymmetricTensor<4, 2, Number> &t, + const SymmetricTensor<2, 2, OtherNumber> &s) { const unsigned int dim = 2; @@ -3891,8 +3891,8 @@ template DEAL_II_HOST constexpr inline void double_contract( SymmetricTensor<2, 2, typename ProductType::type> &tmp, - const SymmetricTensor<2, 2, Number> & s, - const SymmetricTensor<4, 2, OtherNumber> & t) + const SymmetricTensor<2, 2, Number> &s, + const SymmetricTensor<4, 2, OtherNumber> &t) { const unsigned int dim = 2; @@ -3922,8 +3922,8 @@ template DEAL_II_HOST constexpr inline void double_contract( SymmetricTensor<2, 3, typename ProductType::type> &tmp, - const SymmetricTensor<4, 3, Number> & t, - const SymmetricTensor<2, 3, OtherNumber> & s) + const SymmetricTensor<4, 3, Number> &t, + const SymmetricTensor<2, 3, OtherNumber> &s) { const unsigned int dim = 3; @@ -3954,8 +3954,8 @@ template DEAL_II_HOST constexpr inline void double_contract( SymmetricTensor<2, 3, typename ProductType::type> &tmp, - const SymmetricTensor<2, 3, Number> & s, - const SymmetricTensor<4, 3, OtherNumber> & t) + const SymmetricTensor<2, 3, Number> &s, + const SymmetricTensor<4, 3, OtherNumber> &t) { const unsigned int dim = 3; @@ -3979,7 +3979,7 @@ DEAL_II_HOST constexpr Tensor<1, dim, typename ProductType::type> operator*(const SymmetricTensor<2, dim, Number> &src1, - const Tensor<1, dim, OtherNumber> & src2) + const Tensor<1, dim, OtherNumber> &src2) { Tensor<1, dim, typename ProductType::type> dest; for (unsigned int i = 0; i < dim; ++i) @@ -3999,7 +3999,7 @@ template DEAL_II_HOST constexpr Tensor<1, dim, typename ProductType::type> -operator*(const Tensor<1, dim, Number> & src1, +operator*(const Tensor<1, dim, Number> &src1, const SymmetricTensor<2, dim, OtherNumber> &src2) { // this is easy for symmetric tensors: @@ -4036,7 +4036,7 @@ DEAL_II_HOST constexpr DEAL_II_ALWAYS_INLINE typename Tensor::type>::tensor_type - operator*(const Tensor & src1, + operator*(const Tensor &src1, const SymmetricTensor &src2) { return src1 * Tensor(src2); @@ -4073,7 +4073,7 @@ DEAL_II_HOST constexpr DEAL_II_ALWAYS_INLINE dim, typename ProductType::type>::tensor_type operator*(const SymmetricTensor &src1, - const Tensor & src2) + const Tensor &src2) { return Tensor(src1) * src2; } diff --git a/include/deal.II/base/symmetric_tensor.templates.h b/include/deal.II/base/symmetric_tensor.templates.h index 07f32031be..ce092f084e 100644 --- a/include/deal.II/base/symmetric_tensor.templates.h +++ b/include/deal.II/base/symmetric_tensor.templates.h @@ -162,9 +162,9 @@ namespace internal template void tridiagonalize(const dealii::SymmetricTensor<2, dim, Number> &A, - dealii::Tensor<2, dim, Number> & Q, - std::array & d, - std::array & e) + dealii::Tensor<2, dim, Number> &Q, + std::array &d, + std::array &e) { // Make things work with AD types using std::sqrt; diff --git a/include/deal.II/base/table.h b/include/deal.II/base/table.h index 09e733bb0f..e7f9170f50 100644 --- a/include/deal.II/base/table.h +++ b/include/deal.II/base/table.h @@ -1027,7 +1027,7 @@ namespace MatrixTableIterators template friend bool operator==( - const AccessorBase & left, + const AccessorBase &left, const AccessorBase &right) { return left.container == right.container && diff --git a/include/deal.II/base/table_handler.h b/include/deal.II/base/table_handler.h index a3e60825a8..526935f04f 100644 --- a/include/deal.II/base/table_handler.h +++ b/include/deal.II/base/table_handler.h @@ -535,7 +535,7 @@ public: * the description of TextOutputFormat for more information. */ void - write_text(std::ostream & out, + write_text(std::ostream &out, const TextOutputFormat format = table_with_headers) const; /** @@ -848,31 +848,31 @@ namespace internal { const int p = std::get(value); char c = 'i'; - ar &c &p; + ar &c &p; } else if (std::holds_alternative(value)) { const unsigned int p = std::get(value); char c = 'u'; - ar &c &p; + ar &c &p; } else if (std::holds_alternative(value)) { const double p = std::get(value); char c = 'd'; - ar &c &p; + ar &c &p; } else if (std::holds_alternative(value)) { const std::string p = std::get(value); char c = 's'; - ar &c &p; + ar &c &p; } else if (std::holds_alternative(value)) { const std::uint64_t p = std::get(value); char c = 'l'; - ar &c &p; + ar &c &p; } else Assert(false, ExcInternalError()); @@ -889,7 +889,7 @@ namespace internal // as a one-character id, and then read // the data char c; - ar & c; + ar &c; switch (c) { @@ -904,7 +904,7 @@ namespace internal case 'u': { unsigned int val; - ar & val; + ar &val; value = val; break; } @@ -912,7 +912,7 @@ namespace internal case 'd': { double val; - ar & val; + ar &val; value = val; break; } @@ -920,7 +920,7 @@ namespace internal case 's': { std::string val; - ar & val; + ar &val; value = val; break; } @@ -928,7 +928,7 @@ namespace internal case 'l': { std::uint64_t val; - ar & val; + ar &val; value = val; break; } diff --git a/include/deal.II/base/template_constraints.h b/include/deal.II/base/template_constraints.h index 8b7cd96591..903b4a36bb 100644 --- a/include/deal.II/base/template_constraints.h +++ b/include/deal.II/base/template_constraints.h @@ -694,8 +694,8 @@ namespace concepts * example, on class Triangulation. */ template - concept is_valid_dim_spacedim = (dim >= 1 && spacedim <= 3 && - dim <= spacedim); + concept is_valid_dim_spacedim = + (dim >= 1 && spacedim <= 3 && dim <= spacedim); namespace internal { @@ -849,9 +849,8 @@ namespace concepts * not. */ template - concept is_writable_dealii_vector_type = is_dealii_vector_type && - (std::is_const_v == - false); + concept is_writable_dealii_vector_type = + is_dealii_vector_type && (std::is_const_v == false); /** * A concept that tests whether a given template argument is a deal.II @@ -963,8 +962,7 @@ namespace concepts VectorType W, typename VectorType::value_type a, typename VectorType::value_type b, - typename VectorType::value_type s) - { + typename VectorType::value_type s) { // Check local type requirements: typename VectorType::value_type; typename VectorType::size_type; @@ -998,45 +996,37 @@ namespace concepts // Norms and similar stuff: { U.mean_value() - } - ->std::convertible_to; + } -> std::convertible_to; { U.l1_norm() - } - ->std::convertible_to; + } -> std::convertible_to; { U.l2_norm() - } - ->std::convertible_to; + } -> std::convertible_to; { U.linfty_norm() - } - ->std::convertible_to; + } -> std::convertible_to; // Dot products: { U *V - } - ->std::convertible_to; + } -> std::convertible_to; { U.add_and_dot(a, V, W) - } - ->std::convertible_to; + } -> std::convertible_to; // Some queries: { U.size() - } - ->std::convertible_to; + } -> std::convertible_to; { U.all_zero() - } - ->std::same_as; + } -> std::same_as; }; #endif diff --git a/include/deal.II/base/tensor.h b/include/deal.II/base/tensor.h index ea7798e66f..942bb19dd4 100644 --- a/include/deal.II/base/tensor.h +++ b/include/deal.II/base/tensor.h @@ -272,7 +272,7 @@ public: * @note This function can also be used in @ref GlossDevice "device" code. */ constexpr DEAL_II_HOST_DEVICE Tensor & - operator=(const Tensor<0, dim, Number> &rhs); + operator=(const Tensor<0, dim, Number> &rhs); #endif #ifdef DEAL_II_DELETED_MOVE_CONSTRUCTOR_BUG @@ -291,7 +291,7 @@ public: */ template constexpr DEAL_II_HOST_DEVICE Tensor & - operator=(const OtherNumber &d) &; + operator=(const OtherNumber &d) &; /** * Assign a scalar to the current object. This overload is used for @@ -300,7 +300,7 @@ public: */ template constexpr DEAL_II_HOST_DEVICE Tensor & - operator=(const OtherNumber &d) && = delete; + operator=(const OtherNumber &d) && = delete; /** * Test for equality of two tensors. @@ -341,7 +341,7 @@ public: */ template constexpr DEAL_II_HOST_DEVICE Tensor & - operator*=(const OtherNumber &factor); + operator*=(const OtherNumber &factor); /** * Divide the scalar by factor. @@ -350,7 +350,7 @@ public: */ template constexpr DEAL_II_HOST_DEVICE Tensor & - operator/=(const OtherNumber &factor); + operator/=(const OtherNumber &factor); /** * Tensor with inverted entries. @@ -629,7 +629,7 @@ public: * @note This function can also be used in @ref GlossDevice "device" code. */ constexpr DEAL_II_HOST_DEVICE value_type & - operator[](const unsigned int i); + operator[](const unsigned int i); /** * Read-only access operator. @@ -637,7 +637,7 @@ public: * @note This function can also be used in @ref GlossDevice "device" code. */ constexpr DEAL_II_HOST_DEVICE const value_type & - operator[](const unsigned int i) const; + operator[](const unsigned int i) const; /** * Read access using TableIndices indices @@ -693,7 +693,7 @@ public: * t=0 to reset all elements of the tensor to zero. */ constexpr DEAL_II_HOST_DEVICE Tensor & - operator=(const Number &d) &; + operator=(const Number &d) &; /** * Assign a scalar to the current object. This overload is used for @@ -701,7 +701,7 @@ public: * something to a temporary, the function is deleted. */ constexpr DEAL_II_HOST_DEVICE Tensor & - operator=(const Number &d) && = delete; + operator=(const Number &d) && = delete; #ifdef DEAL_II_DELETED_MOVE_CONSTRUCTOR_BUG /** @@ -757,7 +757,7 @@ public: */ template constexpr DEAL_II_HOST_DEVICE Tensor & - operator*=(const OtherNumber &factor); + operator*=(const OtherNumber &factor); /** * Scale the vector by 1/factor. @@ -766,7 +766,7 @@ public: */ template constexpr DEAL_II_HOST_DEVICE Tensor & - operator/=(const OtherNumber &factor); + operator/=(const OtherNumber &factor); /** * Unary minus operator. Negate all entries of a tensor. @@ -1412,7 +1412,7 @@ namespace internal { template constexpr DEAL_II_HOST_DEVICE_ALWAYS_INLINE ArrayElementType & - subscript(ArrayElementType * values, + subscript(ArrayElementType *values, const unsigned int i, std::integral_constant) { @@ -1584,7 +1584,7 @@ Tensor::operator=(const Tensor &other) template -constexpr DEAL_II_ALWAYS_INLINE Tensor & +constexpr DEAL_II_ALWAYS_INLINE Tensor & Tensor::operator=( Tensor &&other) noexcept { @@ -1635,7 +1635,7 @@ Tensor::operator!=( template template constexpr inline DEAL_II_ALWAYS_INLINE - DEAL_II_HOST_DEVICE Tensor & + DEAL_II_HOST_DEVICE Tensor & Tensor::operator+=( const Tensor &p) { @@ -1648,7 +1648,7 @@ constexpr inline DEAL_II_ALWAYS_INLINE template template constexpr inline DEAL_II_ALWAYS_INLINE - DEAL_II_HOST_DEVICE Tensor & + DEAL_II_HOST_DEVICE Tensor & Tensor::operator-=( const Tensor &p) { @@ -1729,7 +1729,7 @@ constexpr inline DEAL_II_ALWAYS_INLINE template constexpr inline DEAL_II_ALWAYS_INLINE DEAL_II_HOST_DEVICE Tensor - Tensor::operator-() const + Tensor::operator-() const { Tensor tmp; @@ -2012,7 +2012,7 @@ constexpr DEAL_II_HOST_DEVICE inline DEAL_II_ALWAYS_INLINE template DEAL_II_HOST_DEVICE constexpr DEAL_II_ALWAYS_INLINE typename ProductType::type - operator*(const Tensor<0, dim, Number> & src1, + operator*(const Tensor<0, dim, Number> &src1, const Tensor<0, dim, OtherNumber> &src2) { return static_cast(src1) * @@ -2049,7 +2049,7 @@ DEAL_II_HOST_DEVICE constexpr DEAL_II_ALWAYS_INLINE template constexpr DEAL_II_HOST_DEVICE_ALWAYS_INLINE Tensor<0, dim, typename ProductType::type> - operator+(const Tensor<0, dim, Number> & p, + operator+(const Tensor<0, dim, Number> &p, const Tensor<0, dim, OtherNumber> &q) { return static_cast(p) + static_cast(q); @@ -2066,7 +2066,7 @@ constexpr DEAL_II_HOST_DEVICE_ALWAYS_INLINE template constexpr DEAL_II_HOST_DEVICE_ALWAYS_INLINE Tensor<0, dim, typename ProductType::type> - operator-(const Tensor<0, dim, Number> & p, + operator-(const Tensor<0, dim, Number> &p, const Tensor<0, dim, OtherNumber> &q) { return static_cast(p) - static_cast(q); @@ -2141,7 +2141,7 @@ namespace internal constexpr DEAL_II_HOST_DEVICE inline DEAL_II_ALWAYS_INLINE Tensor::type> division_operator(const Tensor &t, - const OtherNumber & factor) + const OtherNumber &factor) { Tensor::type> tt; const Number inverse_factor = Number(1.) / factor; @@ -2163,7 +2163,7 @@ namespace internal constexpr DEAL_II_HOST_DEVICE inline DEAL_II_ALWAYS_INLINE Tensor::type> division_operator(const Tensor &t, - const OtherNumber & factor) + const OtherNumber &factor) { Tensor::type> tt; // recurse over the base objects @@ -2208,7 +2208,7 @@ constexpr DEAL_II_HOST_DEVICE inline DEAL_II_ALWAYS_INLINE template constexpr DEAL_II_HOST_DEVICE inline DEAL_II_ALWAYS_INLINE Tensor::type> - operator+(const Tensor & p, + operator+(const Tensor &p, const Tensor &q) { Tensor::type> tmp(p); @@ -2232,7 +2232,7 @@ constexpr DEAL_II_HOST_DEVICE inline DEAL_II_ALWAYS_INLINE template constexpr DEAL_II_HOST_DEVICE inline DEAL_II_ALWAYS_INLINE Tensor::type> - operator-(const Tensor & p, + operator-(const Tensor &p, const Tensor &q) { Tensor::type> tmp(p); @@ -2252,7 +2252,7 @@ constexpr DEAL_II_HOST_DEVICE inline DEAL_II_ALWAYS_INLINE template inline constexpr DEAL_II_ALWAYS_INLINE Tensor<0, dim, typename ProductType::type> - schur_product(const Tensor<0, dim, Number> & src1, + schur_product(const Tensor<0, dim, Number> &src1, const Tensor<0, dim, OtherNumber> &src2) { Tensor<0, dim, typename ProductType::type> tmp(src1); @@ -2281,7 +2281,7 @@ inline constexpr DEAL_II_ALWAYS_INLINE template inline constexpr DEAL_II_ALWAYS_INLINE Tensor::type> - schur_product(const Tensor & src1, + schur_product(const Tensor &src1, const Tensor &src2) { Tensor::type> tmp; @@ -2347,7 +2347,7 @@ constexpr inline DEAL_II_ALWAYS_INLINE typename Tensor::type>::tensor_type - operator*(const Tensor & src1, + operator*(const Tensor &src1, const Tensor &src2) { typename Tensor::type>::tensor_type - contract(const Tensor & src1, + contract(const Tensor &src1, const Tensor &src2) { Assert(0 <= index_1 && index_1 < rank_1, @@ -2478,7 +2478,7 @@ constexpr inline typename Tensor::type>::tensor_type - double_contract(const Tensor & src1, + double_contract(const Tensor &src1, const Tensor &src2) { Assert(0 <= index_1 && index_1 < rank_1, @@ -2557,7 +2557,7 @@ constexpr inline template constexpr inline DEAL_II_ALWAYS_INLINE typename ProductType::type - scalar_product(const Tensor & left, + scalar_product(const Tensor &left, const Tensor &right) { typename ProductType::type result{}; @@ -2596,9 +2596,9 @@ template