]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make many more variables 'const'. 16960/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Fri, 3 May 2024 16:55:29 +0000 (22:25 +0530)
committerWolfgang Bangerth <bangerth@colostate.edu>
Fri, 3 May 2024 16:55:29 +0000 (22:25 +0530)
49 files changed:
examples/step-14/step-14.cc
examples/step-17/step-17.cc
examples/step-20/step-20.cc
examples/step-21/step-21.cc
examples/step-22/step-22.cc
examples/step-25/step-25.cc
examples/step-29/step-29.cc
examples/step-31/step-31.cc
examples/step-35/step-35.cc
examples/step-36/step-36.cc
examples/step-4/step-4.cc
examples/step-42/step-42.cc
examples/step-43/step-43.cc
examples/step-45/step-45.cc
examples/step-5/step-5.cc
examples/step-50/step-50.cc
examples/step-55/step-55.cc
examples/step-56/step-56.cc
examples/step-57/step-57.cc
examples/step-59/step-59.cc
examples/step-60/step-60.cc
examples/step-62/step-62.cc
examples/step-7/step-7.cc
examples/step-70/step-70.cc
examples/step-72/step-72.cc
examples/step-78/step-78.cc
examples/step-79/step-79.cc
examples/step-8/step-8.cc
examples/step-81/step-81.cc
examples/step-82/step-82.cc
examples/step-87/step-87.cc
source/base/polynomial.cc
source/base/quadrature_lib.cc
source/dofs/dof_renumbering.cc
source/dofs/dof_tools_constraints.cc
source/fe/fe_abf.cc
source/fe/fe_bdm.cc
source/fe/fe_dgq.cc
source/fe/fe_q_base.cc
source/fe/fe_q_iso_q1.cc
source/fe/fe_raviart_thomas.cc
source/fe/fe_rt_bubbles.cc
source/fe/mapping_q_cache.cc
source/grid/grid_out.cc
source/grid/grid_tools.cc
source/grid/manifold_lib.cc
source/numerics/data_out_resample.cc
source/numerics/data_out_stack.cc
source/numerics/derivative_approximation.cc

index 58a8d8614ac0a29beef96eae5163c77452197ac0..ba87eb6dab319cf02bdf652824c68c8596dd20cc 100644 (file)
@@ -202,7 +202,7 @@ namespace Step14
 
       // ...then have some objects of which the meaning will become clear
       // below...
-      QTrapezoid<dim>             vertex_quadrature;
+      const QTrapezoid<dim>       vertex_quadrature;
       FEValues<dim>               fe_values(dof_handler.get_fe(),
                               vertex_quadrature,
                               update_gradients | update_quadrature_points);
@@ -1528,7 +1528,7 @@ namespace Step14
       // Initialize a <code>FEValues</code> object with a quadrature formula,
       // have abbreviations for the number of quadrature points and shape
       // functions...
-      QGauss<dim>        quadrature(dof_handler.get_fe().degree + 1);
+      const QGauss<dim>  quadrature(dof_handler.get_fe().degree + 1);
       FEValues<dim>      fe_values(dof_handler.get_fe(),
                               quadrature,
                               update_gradients | update_quadrature_points |
index 54055548b7683d07bd86ddb7d48f204bbb010d1a..845eb626bf214100b6a6956598d8f347b3da7179 100644 (file)
@@ -424,8 +424,8 @@ namespace Step17
   template <int dim>
   void ElasticProblem<dim>::assemble_system()
   {
-    QGauss<dim>   quadrature_formula(fe.degree + 1);
-    FEValues<dim> fe_values(fe,
+    const QGauss<dim> quadrature_formula(fe.degree + 1);
+    FEValues<dim>     fe_values(fe,
                             quadrature_formula,
                             update_values | update_gradients |
                               update_quadrature_points | update_JxW_values);
index 63285a2705c0c2d822212f90d4b8e5eb8c6ac890..d8a6afd6785a30ca7e335493e6be938f25b3edf3 100644 (file)
@@ -433,8 +433,8 @@ namespace Step20
   template <int dim>
   void MixedLaplaceProblem<dim>::assemble_system()
   {
-    QGauss<dim>     quadrature_formula(degree + 2);
-    QGauss<dim - 1> face_quadrature_formula(degree + 2);
+    const QGauss<dim>     quadrature_formula(degree + 2);
+    const QGauss<dim - 1> face_quadrature_formula(degree + 2);
 
     FEValues<dim>     fe_values(fe,
                             quadrature_formula,
@@ -699,8 +699,8 @@ namespace Step20
     // points for integration. To avoid this problem, we simply use a
     // trapezoidal rule and iterate it <code>degree+2</code> times in each
     // coordinate direction (again as explained in step-7):
-    QTrapezoid<1>  q_trapez;
-    QIterated<dim> quadrature(q_trapez, degree + 2);
+    const QTrapezoid<1>  q_trapez;
+    const QIterated<dim> quadrature(q_trapez, degree + 2);
 
     // With this, we can then let the library compute the errors and output
     // them to the screen:
index d4b8c868d9e8aa48382386448582f500a516d7a0..0c3760a02eb236712cddfc25ba6eefd0598e1bf6 100644 (file)
@@ -579,8 +579,8 @@ namespace Step21
     system_matrix = 0;
     system_rhs    = 0;
 
-    QGauss<dim>     quadrature_formula(degree + 2);
-    QGauss<dim - 1> face_quadrature_formula(degree + 2);
+    const QGauss<dim>     quadrature_formula(degree + 2);
+    const QGauss<dim - 1> face_quadrature_formula(degree + 2);
 
     FEValues<dim>     fe_values(fe,
                             quadrature_formula,
@@ -729,18 +729,18 @@ namespace Step21
   template <int dim>
   void TwoPhaseFlowProblem<dim>::assemble_rhs_S()
   {
-    QGauss<dim>       quadrature_formula(degree + 2);
-    QGauss<dim - 1>   face_quadrature_formula(degree + 2);
-    FEValues<dim>     fe_values(fe,
+    const QGauss<dim>     quadrature_formula(degree + 2);
+    const QGauss<dim - 1> face_quadrature_formula(degree + 2);
+    FEValues<dim>         fe_values(fe,
                             quadrature_formula,
                             update_values | update_gradients |
                               update_quadrature_points | update_JxW_values);
-    FEFaceValues<dim> fe_face_values(fe,
+    FEFaceValues<dim>     fe_face_values(fe,
                                      face_quadrature_formula,
                                      update_values | update_normal_vectors |
                                        update_quadrature_points |
                                        update_JxW_values);
-    FEFaceValues<dim> fe_face_values_neighbor(fe,
+    FEFaceValues<dim>     fe_face_values_neighbor(fe,
                                               face_quadrature_formula,
                                               update_values);
 
@@ -1048,7 +1048,7 @@ namespace Step21
   template <int dim>
   double TwoPhaseFlowProblem<dim>::get_maximal_velocity() const
   {
-    QGauss<dim>        quadrature_formula(degree + 2);
+    const QGauss<dim>  quadrature_formula(degree + 2);
     const unsigned int n_q_points = quadrature_formula.size();
 
     FEValues<dim> fe_values(fe, quadrature_formula, update_values);
index bb3b712056e6eeed6854a3a7eb84371e89f8871c..8351f74d8e0418fa76096f3358652e74b23e661d 100644 (file)
@@ -602,7 +602,7 @@ namespace Step22
     system_rhs            = 0;
     preconditioner_matrix = 0;
 
-    QGauss<dim> quadrature_formula(degree + 2);
+    const QGauss<dim> quadrature_formula(degree + 2);
 
     FEValues<dim> fe_values(fe,
                             quadrature_formula,
index 8d5bc8e44225e1f6398dd30fc01476ef386c415e..a417c54ea284233a947a1a71f1951472a5a4cd4f 100644 (file)
@@ -455,8 +455,8 @@ namespace Step25
     const Vector<double> &new_data,
     SparseMatrix<double> &nl_matrix) const
   {
-    QGauss<dim>   quadrature_formula(fe.degree + 1);
-    FEValues<dim> fe_values(fe,
+    const QGauss<dim> quadrature_formula(fe.degree + 1);
+    FEValues<dim>     fe_values(fe,
                             quadrature_formula,
                             update_values | update_JxW_values |
                               update_quadrature_points);
index 86113c3ffd53996f2c73634c807364de7e21c951..238ec4448ba2ae1ba2cd97e3feebeb481163846f 100644 (file)
@@ -529,8 +529,8 @@ namespace Step29
     // used. Since our bilinear form involves boundary integrals on
     // $\Gamma_2$, we also need a quadrature rule for surface integration on
     // the faces, which are $dim-1$ dimensional:
-    QGauss<dim>     quadrature_formula(fe.degree + 1);
-    QGauss<dim - 1> face_quadrature_formula(fe.degree + 1);
+    const QGauss<dim>     quadrature_formula(fe.degree + 1);
+    const QGauss<dim - 1> face_quadrature_formula(fe.degree + 1);
 
     const unsigned int n_q_points      = quadrature_formula.size(),
                        n_face_q_points = face_quadrature_formula.size(),
index 6b14bfa4cacb027ed661d5257652b63c71427efd..3e66bc0710e8bb1bbadd0228a3e755858c8ae885 100644 (file)
@@ -1398,8 +1398,8 @@ namespace Step31
     temperature_mass_matrix      = 0;
     temperature_stiffness_matrix = 0;
 
-    QGauss<dim>   quadrature_formula(temperature_degree + 2);
-    FEValues<dim> temperature_fe_values(temperature_fe,
+    const QGauss<dim> quadrature_formula(temperature_degree + 2);
+    FEValues<dim>     temperature_fe_values(temperature_fe,
                                         quadrature_formula,
                                         update_values | update_gradients |
                                           update_JxW_values);
index d16a509a22dcadc4f01a91d1923d3d436c01416a..9f4c6ff9e2a8ddf9a23ede67743b60780248e865 100644 (file)
@@ -451,8 +451,8 @@ namespace Step35
     DoFHandler<dim> dof_handler_velocity;
     DoFHandler<dim> dof_handler_pressure;
 
-    QGauss<dim> quadrature_pressure;
-    QGauss<dim> quadrature_velocity;
+    const QGauss<dim> quadrature_pressure;
+    const QGauss<dim> quadrature_velocity;
 
     SparsityPattern sparsity_pattern_velocity;
     SparsityPattern sparsity_pattern_pressure;
index e20625930d97c4bbde279ab9b4c889e8ccfa51c4..dd7f52afb9506ba0bae90ee96689d0e81c8683e5 100644 (file)
@@ -232,7 +232,7 @@ namespace Step36
   template <int dim>
   void EigenvalueProblem<dim>::assemble_system()
   {
-    QGauss<dim> quadrature_formula(fe.degree + 1);
+    const QGauss<dim> quadrature_formula(fe.degree + 1);
 
     FEValues<dim> fe_values(fe,
                             quadrature_formula,
index 4a3d3be510031dce678b8e98a93f56dc139a4324..472610c2e50ec5e2badcc8bc3d07316e8f03aded 100644 (file)
@@ -313,7 +313,7 @@ void Step4<dim>::setup_system()
 template <int dim>
 void Step4<dim>::assemble_system()
 {
-  QGauss<dim> quadrature_formula(fe.degree + 1);
+  const QGauss<dim> quadrature_formula(fe.degree + 1);
 
   // We wanted to have a non-constant right hand side, so we use an object of
   // the class declared above to generate the necessary data. Since this right
index ef05dfd7597c443ade9b91dd4a08e04f5af5b0f8..0cd0ecf61cc8381b63a9c2d039b52a05a8eac32c 100644 (file)
@@ -1123,7 +1123,7 @@ namespace Step42
   void PlasticityContactProblem<dim>::assemble_mass_matrix_diagonal(
     TrilinosWrappers::SparseMatrix &mass_matrix)
   {
-    QGaussLobatto<dim - 1> face_quadrature_formula(fe.degree + 1);
+    const QGaussLobatto<dim - 1> face_quadrature_formula(fe.degree + 1);
 
     FEFaceValues<dim> fe_values_face(fe,
                                      face_quadrature_formula,
@@ -1216,8 +1216,9 @@ namespace Step42
     // many quadrature points as there are shape functions per face and
     // looping over quadrature points is equivalent to looping over shape
     // functions defined on a face. With this, the code looks as follows:
-    Quadrature<dim - 1> face_quadrature(fe.get_unit_face_support_points());
-    FEFaceValues<dim>   fe_values_face(fe,
+    const Quadrature<dim - 1> face_quadrature(
+      fe.get_unit_face_support_points());
+    FEFaceValues<dim> fe_values_face(fe,
                                      face_quadrature,
                                      update_quadrature_points);
 
@@ -1326,8 +1327,8 @@ namespace Step42
   {
     TimerOutput::Scope t(computing_timer, "Assembling");
 
-    QGauss<dim>     quadrature_formula(fe.degree + 1);
-    QGauss<dim - 1> face_quadrature_formula(fe.degree + 1);
+    const QGauss<dim>     quadrature_formula(fe.degree + 1);
+    const QGauss<dim - 1> face_quadrature_formula(fe.degree + 1);
 
     FEValues<dim> fe_values(fe,
                             quadrature_formula,
@@ -1479,8 +1480,8 @@ namespace Step42
   void PlasticityContactProblem<dim>::compute_nonlinear_residual(
     const TrilinosWrappers::MPI::Vector &linearization_point)
   {
-    QGauss<dim>     quadrature_formula(fe.degree + 1);
-    QGauss<dim - 1> face_quadrature_formula(fe.degree + 1);
+    const QGauss<dim>     quadrature_formula(fe.degree + 1);
+    const QGauss<dim - 1> face_quadrature_formula(fe.degree + 1);
 
     FEValues<dim> fe_values(fe,
                             quadrature_formula,
@@ -2078,8 +2079,8 @@ namespace Step42
 
     double contact_force = 0.0;
 
-    QGauss<dim - 1>   face_quadrature_formula(fe.degree + 1);
-    FEFaceValues<dim> fe_values_face(fe,
+    const QGauss<dim - 1> face_quadrature_formula(fe.degree + 1);
+    FEFaceValues<dim>     fe_values_face(fe,
                                      face_quadrature_formula,
                                      update_values | update_JxW_values);
 
index 7a527092802a5b6333abcf9f50ffdf45ece84446..b36b03bc9fdcef47f64746a3c6c9779aaa065d15 100644 (file)
@@ -970,8 +970,8 @@ namespace Step43
     darcy_matrix = 0;
     darcy_rhs    = 0;
 
-    QGauss<dim>     quadrature_formula(darcy_degree + 2);
-    QGauss<dim - 1> face_quadrature_formula(darcy_degree + 2);
+    const QGauss<dim>     quadrature_formula(darcy_degree + 2);
+    const QGauss<dim - 1> face_quadrature_formula(darcy_degree + 2);
 
     FEValues<dim> darcy_fe_values(darcy_fe,
                                   quadrature_formula,
@@ -1174,7 +1174,7 @@ namespace Step43
   template <int dim>
   void TwoPhaseFlowProblem<dim>::assemble_saturation_matrix()
   {
-    QGauss<dim> quadrature_formula(saturation_degree + 2);
+    const QGauss<dim> quadrature_formula(saturation_degree + 2);
 
     FEValues<dim> saturation_fe_values(saturation_fe,
                                        quadrature_formula,
@@ -1242,8 +1242,8 @@ namespace Step43
   template <int dim>
   void TwoPhaseFlowProblem<dim>::assemble_saturation_rhs()
   {
-    QGauss<dim>     quadrature_formula(saturation_degree + 2);
-    QGauss<dim - 1> face_quadrature_formula(saturation_degree + 2);
+    const QGauss<dim>     quadrature_formula(saturation_degree + 2);
+    const QGauss<dim - 1> face_quadrature_formula(saturation_degree + 2);
 
     FEValues<dim> saturation_fe_values(saturation_fe,
                                        quadrature_formula,
index 109aef15c156de3234e0f5cbd5abc1f3e7f582d9..307aa616d602951711da327f1720c59451a0f039 100644 (file)
@@ -534,7 +534,7 @@ namespace Step45
     system_rhs            = 0.;
     preconditioner_matrix = 0.;
 
-    QGauss<dim> quadrature_formula(degree + 2);
+    const QGauss<dim> quadrature_formula(degree + 2);
 
     FEValues<dim> fe_values(mapping,
                             fe,
index c696f2cfa565d8eeac582bd11a52ef54bffb3920..d2f56853abca6396063db8e7a7e4e541c1c85a36 100644 (file)
@@ -157,7 +157,7 @@ void Step5<dim>::setup_system()
 template <int dim>
 void Step5<dim>::assemble_system()
 {
-  QGauss<dim> quadrature_formula(fe.degree + 1);
+  const QGauss<dim> quadrature_formula(fe.degree + 1);
 
   FEValues<dim> fe_values(fe,
                           quadrature_formula,
index 4eb415b4f7ce37c94b1aa8697d786c25decaa82e..38a390f1db0db202253d9b97ea1150c8c876ae1f 100644 (file)
@@ -803,7 +803,7 @@ void LaplaceProblem<dim, degree>::assemble_multigrid()
 {
   TimerOutput::Scope timing(computing_timer, "Assemble multigrid");
 
-  QGauss<dim> quadrature_formula(degree + 1);
+  const QGauss<dim> quadrature_formula(degree + 1);
 
   FEValues<dim> fe_values(fe,
                           quadrature_formula,
index 27ecafab6e4b16a415e39de716353f512b3b48b2..c12cc6d9ce7eb302bd497c6dcc5567812e6847a1 100644 (file)
@@ -684,8 +684,8 @@ namespace Step55
       const ComponentSelectFunction<dim> velocity_mask(std::make_pair(0, dim),
                                                        dim + 1);
 
-      Vector<double> cellwise_errors(triangulation.n_active_cells());
-      QGauss<dim>    quadrature(velocity_degree + 2);
+      Vector<double>    cellwise_errors(triangulation.n_active_cells());
+      const QGauss<dim> quadrature(velocity_degree + 2);
 
       VectorTools::integrate_difference(dof_handler,
                                         locally_relevant_solution,
index a933e84ac5409e25676dd1ea22c7a7f48bab2dd6..518256a0f0f44b3b78fe9f3d696e91669661efea 100644 (file)
@@ -609,7 +609,7 @@ namespace Step56
     const bool assemble_pressure_mass_matrix =
       (solver_type == SolverType::UMFPACK) ? false : true;
 
-    QGauss<dim> quadrature_formula(pressure_degree + 2);
+    const QGauss<dim> quadrature_formula(pressure_degree + 2);
 
     FEValues<dim> fe_values(fe,
                             quadrature_formula,
@@ -707,7 +707,7 @@ namespace Step56
 
     mg_matrices = 0.;
 
-    QGauss<dim> quadrature_formula(pressure_degree + 2);
+    const QGauss<dim> quadrature_formula(pressure_degree + 2);
 
     FEValues<dim> fe_values(velocity_fe,
                             quadrature_formula,
index 6f3fb8c676a44d950917d5d8194a7501d3a2c606..0ac9165a600ac25f55581e6ed21d604651fee3eb 100644 (file)
@@ -367,7 +367,7 @@ namespace Step57
 
     system_rhs = 0;
 
-    QGauss<dim> quadrature_formula(degree + 2);
+    const QGauss<dim> quadrature_formula(degree + 2);
 
     FEValues<dim> fe_values(fe,
                             quadrature_formula,
index 002d7f4feb31adbf63d03cb21605e5450f1a10d7..c9a448b95648f63005f189896dfc3d1fe515768b 100644 (file)
@@ -750,7 +750,7 @@ namespace Step59
         laplace_matrices[d].reinit(N, N);
       }
 
-    QGauss<1> quadrature(N);
+    const QGauss<1> quadrature(N);
     for (unsigned int i = 0; i < N; ++i)
       for (unsigned int j = 0; j < N; ++j)
         {
index 7db74fba238c0420933a334e88ac05579a874299..fa4a8e47ee3ca6fff10469aedebb914fdcebab51 100644 (file)
@@ -904,7 +904,7 @@ namespace Step60
   {
     TimerOutput::Scope timer_section(monitor, "Setup coupling");
 
-    QGauss<dim> quad(parameters.coupling_quadrature_order);
+    const QGauss<dim> quad(parameters.coupling_quadrature_order);
 
     DynamicSparsityPattern dsp(space_dh->n_dofs(), embedded_dh->n_dofs());
 
@@ -954,7 +954,7 @@ namespace Step60
       // To compute the coupling matrix we use the
       // NonMatching::create_coupling_mass_matrix tool, which works similarly to
       // NonMatching::create_coupling_sparsity_pattern.
-      QGauss<dim> quad(parameters.coupling_quadrature_order);
+      const QGauss<dim> quad(parameters.coupling_quadrature_order);
       NonMatching::create_coupling_mass_matrix(*space_grid_tools_cache,
                                                *space_dh,
                                                *embedded_dh,
index 9b62d6ce750554bed51440a116b794eff4d043e4..f8d73115a424cafc612bc7099349d9689b8d3ae4 100644 (file)
@@ -314,7 +314,7 @@ namespace step62
 
     parallel::distributed::Triangulation<dim> triangulation;
 
-    QGauss<dim> quadrature_formula;
+    const QGauss<dim> quadrature_formula;
 
     // We store the mass and stiffness matrices for each cell this vector.
     std::vector<QuadratureCache<dim>> quadrature_cache;
index 53dd9e4083c2106b0ed6534077c3a435be025e51..8b2ca2fda7c71de8a120391fd17edf2b0f9a2066 100644 (file)
@@ -513,8 +513,8 @@ namespace Step7
   template <int dim>
   void HelmholtzProblem<dim>::assemble_system()
   {
-    QGauss<dim>     quadrature_formula(fe->degree + 1);
-    QGauss<dim - 1> face_quadrature_formula(fe->degree + 1);
+    const QGauss<dim>     quadrature_formula(fe->degree + 1);
+    const QGauss<dim - 1> face_quadrature_formula(fe->degree + 1);
 
     const unsigned int n_q_points      = quadrature_formula.size();
     const unsigned int n_face_q_points = face_quadrature_formula.size();
index 02b2aa7fd1eb3216071300edfacb0d3694206629..107503d41938ebc8167a4d6e0439f2f2b05569e7 100644 (file)
@@ -1115,7 +1115,7 @@ namespace Step70
   template <int dim, int spacedim>
   void StokesImmersedProblem<dim, spacedim>::setup_solid_particles()
   {
-    QGauss<dim> quadrature(fluid_fe->degree + 1);
+    const QGauss<dim> quadrature(fluid_fe->degree + 1);
 
     const unsigned int n_properties = 1;
     solid_particle_handler.initialize(fluid_tria,
@@ -1338,8 +1338,8 @@ namespace Step70
 
     TimerOutput::Scope t(computing_timer, "Assemble Stokes terms");
 
-    QGauss<spacedim>   quadrature_formula(fluid_fe->degree + 1);
-    FEValues<spacedim> fe_values(*fluid_fe,
+    const QGauss<spacedim> quadrature_formula(fluid_fe->degree + 1);
+    FEValues<spacedim>     fe_values(*fluid_fe,
                                  quadrature_formula,
                                  update_values | update_gradients |
                                    update_quadrature_points |
index 275123258ad4abc6b513926d9a314f108150d6c1..b0479b77e5d0745c1ffe187a0dc227c7c5c23c92 100644 (file)
@@ -159,9 +159,9 @@ namespace Step72
 
     Triangulation<dim> triangulation;
 
-    DoFHandler<dim> dof_handler;
-    FE_Q<dim>       fe;
-    QGauss<dim>     quadrature_formula;
+    DoFHandler<dim>   dof_handler;
+    const FE_Q<dim>   fe;
+    const QGauss<dim> quadrature_formula;
 
     AffineConstraints<double> hanging_node_constraints;
 
index 85cdfe9e275e9bcb5c6c1778f9a2226f25c0dce3..be93d3cf34cfbbcf355513793266053594b5002c 100644 (file)
@@ -414,7 +414,7 @@ namespace BlackScholesSolver
     // <code>current_coefficient</code> variable.
     const unsigned int dofs_per_cell = fe.dofs_per_cell;
     FullMatrix<double> cell_matrix(dofs_per_cell, dofs_per_cell);
-    QGauss<dim>        quadrature_formula(fe.degree + 1);
+    const QGauss<dim>  quadrature_formula(fe.degree + 1);
     FEValues<dim>      fe_values(fe,
                             quadrature_formula,
                             update_values | update_gradients |
index 9eb09cb372e2f220deeecaecabc2d8df713d470a..5cca5c6f0720525189bf7549615a4707cb526259 100644 (file)
@@ -753,15 +753,15 @@ namespace SAND
     system_rhs    = 0;
 
 
-    MappingQ<dim>     mapping(1);
-    QGauss<dim>       quadrature_formula(fe.degree + 1);
-    QGauss<dim - 1>   face_quadrature_formula(fe.degree + 1);
-    FEValues<dim>     fe_values(mapping,
+    MappingQ<dim>         mapping(1);
+    const QGauss<dim>     quadrature_formula(fe.degree + 1);
+    const QGauss<dim - 1> face_quadrature_formula(fe.degree + 1);
+    FEValues<dim>         fe_values(mapping,
                             fe,
                             quadrature_formula,
                             update_values | update_gradients |
                               update_quadrature_points | update_JxW_values);
-    FEFaceValues<dim> fe_face_values(mapping,
+    FEFaceValues<dim>     fe_face_values(mapping,
                                      fe,
                                      face_quadrature_formula,
                                      update_values | update_quadrature_points |
index 1f1def8c60555775df95673d8e43a547a715e07e..f159a2cc57b48945bbde16420e6a60efdd87a693 100644 (file)
@@ -281,7 +281,7 @@ namespace Step8
   template <int dim>
   void ElasticProblem<dim>::assemble_system()
   {
-    QGauss<dim> quadrature_formula(fe.degree + 1);
+    const QGauss<dim> quadrature_formula(fe.degree + 1);
 
     FEValues<dim> fe_values(fe,
                             quadrature_formula,
index 91f2ae098bad997968737ab5ab27cf22460d25b1..42c42df8f72af22e72d619fe818f35a1a60e7c58 100644 (file)
@@ -597,8 +597,8 @@ namespace Step81
   template <int dim>
   void Maxwell<dim>::assemble_system()
   {
-    QGauss<dim>     quadrature_formula(quadrature_order);
-    QGauss<dim - 1> face_quadrature_formula(quadrature_order);
+    const QGauss<dim>     quadrature_formula(quadrature_order);
+    const QGauss<dim - 1> face_quadrature_formula(quadrature_order);
 
     FEValues<dim, dim>     fe_values(*fe,
                                  quadrature_formula,
index 1650e3ef9b0c6c73a4af7e46ed9697d0635cc69e..67df8a7a555b18a93af75193caeb8e73e7615a9a 100644 (file)
@@ -482,8 +482,8 @@ namespace Step82
   {
     matrix = 0;
 
-    QGauss<dim>     quad(fe.degree + 1);
-    QGauss<dim - 1> quad_face(fe.degree + 1);
+    const QGauss<dim>     quad(fe.degree + 1);
+    const QGauss<dim - 1> quad_face(fe.degree + 1);
 
     const unsigned int n_q_points      = quad.size();
     const unsigned int n_q_points_face = quad_face.size();
@@ -931,8 +931,8 @@ namespace Step82
     double error_H1 = 0;
     double error_L2 = 0;
 
-    QGauss<dim>     quad(fe.degree + 1);
-    QGauss<dim - 1> quad_face(fe.degree + 1);
+    const QGauss<dim>     quad(fe.degree + 1);
+    const QGauss<dim - 1> quad_face(fe.degree + 1);
 
     FEValues<dim> fe_values(fe,
                             quad,
@@ -1191,8 +1191,8 @@ namespace Step82
     const typename Triangulation<dim>::cell_iterator cell_lift =
       static_cast<typename Triangulation<dim>::cell_iterator>(cell);
 
-    QGauss<dim>     quad(fe.degree + 1);
-    QGauss<dim - 1> quad_face(fe.degree + 1);
+    const QGauss<dim>     quad(fe.degree + 1);
+    const QGauss<dim - 1> quad_face(fe.degree + 1);
 
     const unsigned int n_q_points      = quad.size();
     const unsigned int n_q_points_face = quad_face.size();
index e51a3e34a6809862ac7d26a36d7971ea5cc8b17e..b9701e973ec8fada6f23802be1f982040e70d0ed 100644 (file)
@@ -761,7 +761,7 @@ namespace Step87
     MappingQ<dim - 1, dim>      mapping_immersed_base(3);
     MappingQCache<dim - 1, dim> mapping_immersed(3);
     mapping_immersed.initialize(mapping_immersed_base, tria_immersed);
-    QGauss<dim - 1> quadrature_immersed(degree + 1);
+    const QGauss<dim - 1> quadrature_immersed(degree + 1);
 
     FE_Q<dim - 1, dim>       fe_scalar_immersed(degree);
     FESystem<dim - 1, dim>   fe_immersed(fe_scalar_immersed, dim);
index 000a1155f20508cc1d8ac83bc92e15c8e2da9a04..ed7b74da4211ce97ca23218873afddf80caf2f23 100644 (file)
@@ -710,7 +710,7 @@ namespace Polynomials
     // Gauss-Legendre quadrature formula
     if (k > 0)
       {
-        QGauss<1> gauss(k);
+        const QGauss<1> gauss(k);
         for (unsigned int i = 0; i < k; ++i)
           this->lagrange_support_points[i] = gauss.get_points()[i][0];
       }
@@ -1139,8 +1139,8 @@ namespace Polynomials
       // Note that the polynomials are not yet normalized here, which is not
       // necessary because we are only looking for the x_star where the matrix
       // entry is zero, for which the constants do not matter.
-      QGauss<1> gauss(degree + 1);
-      double    integral_left = 0, integral_right = 0;
+      const QGauss<1> gauss(degree + 1);
+      double          integral_left = 0, integral_right = 0;
       for (unsigned int q = 0; q < gauss.size(); ++q)
         {
           const double x               = gauss.point(q)[0];
index dc1e41ccc12f10676618e85b9f5fe1d548b05851..577ef8e48b391deaeb2152bf243162ac84f6effd 100644 (file)
@@ -785,9 +785,9 @@ QGaussLogR<1>::QGaussLogR(const unsigned int n,
   // only need n quadrature points. In the most difficult one, we
   // need 2*n points for the first segment, and 2*n points for the
   // second segment.
-  QGaussLog<1> quad1(n, origin[0] != 0);
-  QGaussLog<1> quad2(n);
-  QGauss<1>    quad(n);
+  const QGaussLog<1> quad1(n, origin[0] != 0);
+  const QGaussLog<1> quad2(n);
+  const QGauss<1>    quad(n);
 
   // Check that the origin is inside 0,1
   Assert((fraction >= 0) && (fraction <= 1),
@@ -928,7 +928,7 @@ QGaussOneOverR<2>::QGaussOneOverR(const unsigned int n,
 
   // Start with the gauss quadrature formula on the (u,v) reference
   // element.
-  QGauss<2> gauss(n);
+  const QGauss<2> gauss(n);
 
   Assert(gauss.size() == n * n, ExcInternalError());
 
@@ -2353,8 +2353,8 @@ QGaussWedge<dim>::QGaussWedge(const unsigned int n_points)
 {
   AssertDimension(dim, 3);
 
-  QGaussSimplex<2> quad_tri(n_points);
-  QGauss<1>        quad_line(n_points);
+  const QGaussSimplex<2> quad_tri(n_points);
+  const QGauss<1>        quad_line(n_points);
 
   for (unsigned int i = 0; i < quad_line.size(); ++i)
     for (unsigned int j = 0; j < quad_tri.size(); ++j)
index d4f060248b32037f14fdd48b84fa3d9c63dfafec..9733dbecdb4390fdce082544ba1ac4ef38aaeb28 100644 (file)
@@ -1901,7 +1901,7 @@ namespace DoFRenumbering
         std::vector<std::pair<Point<spacedim>, unsigned int>>
           support_point_list(n_dofs);
 
-        Quadrature<dim>         q_dummy(dof.get_fe().get_unit_support_points());
+        const Quadrature<dim>   q_dummy(dof.get_fe().get_unit_support_points());
         FEValues<dim, spacedim> fe_values(dof.get_fe(),
                                           q_dummy,
                                           update_quadrature_points);
index 0272036e72633018b5c76d0e4023245e4f00f671..5cf682abe357eb5a84492b30fee2265ec951512a 100644 (file)
@@ -3521,7 +3521,8 @@ namespace DoFTools
 
       Assert(matrix.m() == spacedim, ExcInternalError());
 
-      Quadrature<dim - 1> quadrature(fe.get_unit_face_support_points(face_no));
+      const Quadrature<dim - 1> quadrature(
+        fe.get_unit_face_support_points(face_no));
 
       // have an array that stores the location of each vector-dof tuple we want
       // to rotate.
index 44b8fc65677e6add93b7bfae278e966ed17124f4..b251bfa2dc07e4d2d656daf130f6f2ca41ac1be2 100644 (file)
@@ -169,7 +169,7 @@ template <int dim>
 void
 FE_ABF<dim>::initialize_support_points(const unsigned int deg)
 {
-  QGauss<dim>        cell_quadrature(deg + 2);
+  const QGauss<dim>  cell_quadrature(deg + 2);
   const unsigned int n_interior_points = cell_quadrature.size();
 
   // TODO: the implementation makes the assumption that all faces have the
@@ -207,7 +207,7 @@ FE_ABF<dim>::initialize_support_points(const unsigned int deg)
 
   if (dim > 1)
     {
-      QGauss<dim - 1>                   face_points(deg + 1);
+      const QGauss<dim - 1>             face_points(deg + 1);
       TensorProductPolynomials<dim - 1> legendre =
         Polynomials::Legendre::generate_complete_basis(deg);
 
@@ -348,9 +348,9 @@ FE_ABF<dim>::initialize_restriction()
         this->restriction[iso][i].reinit(0, 0);
       return;
     }
-  unsigned int       iso = RefinementCase<dim>::isotropic_refinement - 1;
-  QGauss<dim - 1>    q_base(rt_order + 1);
-  const unsigned int n_face_points = q_base.size();
+  unsigned int          iso = RefinementCase<dim>::isotropic_refinement - 1;
+  const QGauss<dim - 1> q_base(rt_order + 1);
+  const unsigned int    n_face_points = q_base.size();
   // First, compute interpolation on
   // subfaces
   for (const unsigned int face : GeometryInfo<dim>::face_indices())
@@ -441,7 +441,7 @@ FE_ABF<dim>::initialize_restriction()
   AssertDimension(this->n_unique_faces(), 1);
   const unsigned int face_no = 0;
 
-  QGauss<dim>        q_cell(rt_order + 1);
+  const QGauss<dim>  q_cell(rt_order + 1);
   const unsigned int start_cell_dofs =
     GeometryInfo<dim>::faces_per_cell * this->n_dofs_per_face(face_no);
 
index d5aa67d62a95b27e505b95727d2bce0ed8399e8f..2ae1c0e2794e05b7310eb4fc8dd29b1db6cdba44 100644 (file)
@@ -359,7 +359,7 @@ FE_BDM<dim>::initialize_support_points(const unsigned int deg)
   // up to deg, which means we need dg+1 points in each direction. The
   // fact that we do not have tensor product polynomials will be
   // considered later. In 2d, we can use point values.
-  QGauss<dim - 1> face_points(deg + 1);
+  const QGauss<dim - 1> face_points(deg + 1);
 
   // TODO: the implementation makes the assumption that all faces have the
   // same number of dofs
@@ -375,7 +375,7 @@ FE_BDM<dim>::initialize_support_points(const unsigned int deg)
   // deg-2, thus we use deg points. Note that deg>=1 and the lowest
   // order element has no points in the cell, such that we have to
   // distinguish this case.
-  QGauss<dim> cell_points(deg == 1 ? 0 : deg);
+  const QGauss<dim> cell_points(deg == 1 ? 0 : deg);
 
   // Compute the size of the whole support point set
   const unsigned int npoints =
@@ -383,7 +383,7 @@ FE_BDM<dim>::initialize_support_points(const unsigned int deg)
 
   this->generalized_support_points.resize(npoints);
 
-  Quadrature<dim> faces =
+  const Quadrature<dim> faces =
     QProjector<dim>::project_to_all_faces(this->reference_cell(), face_points);
 
   for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
index 0d8a65ba52ede03c207987f9730e3d8682574a7b..83ea9c889a467d89af81d6b159a8475853cb005c 100644 (file)
@@ -994,7 +994,7 @@ FE_DGQArbitraryNodes<dim, spacedim>::clone() const
     polynomial_space->get_numbering_inverse();
   for (unsigned int i = 0; i <= this->degree; ++i)
     qpoints[i] = Point<1>(this->unit_support_points[lexicographic[i]][0]);
-  Quadrature<1> pquadrature(qpoints);
+  const Quadrature<1> pquadrature(qpoints);
 
   return std::make_unique<FE_DGQArbitraryNodes<dim, spacedim>>(pquadrature);
 }
index 94d26cc5b8e154105de055cd48f86bb2b1fe284a..10107e543e1dcdcbe9c0fa38e84cb91a722771ed 100644 (file)
@@ -257,7 +257,7 @@ struct FE_Q_Base<xdim, xspacedim>::Implementation
         std::vector<Point<dim - 2>> line_support_points(n);
         for (unsigned int i = 0; i < n; ++i)
           line_support_points[i][0] = (i + 1) * step;
-        Quadrature<dim - 2> qline(line_support_points);
+        const Quadrature<dim - 2> qline(line_support_points);
 
         // auxiliary points in 2d
         std::vector<Point<dim - 1>> p_line(n);
index 190b9261715cbd86374d6135c4524475f8401e39..12ce528b305737830196609f9cb5a8aa526cf759 100644 (file)
@@ -46,8 +46,8 @@ FE_Q_iso_Q1<dim, spacedim>::FE_Q_iso_Q1(const unsigned int subdivisions)
          ExcMessage("This element can only be used with a positive number of "
                     "subelements"));
 
-  QTrapezoid<1> trapez;
-  QIterated<1>  points(trapez, subdivisions);
+  const QTrapezoid<1> trapez;
+  const QIterated<1>  points(trapez, subdivisions);
 
   this->initialize(points.get_points());
 }
index f5c194b6bcfef70ec2c2eed8442532b476a75e7b..163a3623fb88d97b22a504fed1b5416f27280ac7 100644 (file)
@@ -158,7 +158,7 @@ template <int dim>
 void
 FE_RaviartThomas<dim>::initialize_support_points(const unsigned int deg)
 {
-  QGauss<dim>        cell_quadrature(deg + 1);
+  const QGauss<dim>  cell_quadrature(deg + 1);
   const unsigned int n_interior_points = (deg > 0) ? cell_quadrature.size() : 0;
 
   // TODO: the implementation makes the assumption that all faces have the
@@ -181,7 +181,7 @@ FE_RaviartThomas<dim>::initialize_support_points(const unsigned int deg)
 
   if (dim > 1)
     {
-      QGauss<dim - 1>                   face_points(deg + 1);
+      const QGauss<dim - 1>             face_points(deg + 1);
       TensorProductPolynomials<dim - 1> legendre =
         Polynomials::Legendre::generate_complete_basis(deg);
 
@@ -453,8 +453,8 @@ FE_RaviartThomas<dim>::initialize_restriction()
 {
   const unsigned int iso = RefinementCase<dim>::isotropic_refinement - 1;
 
-  QGauss<dim - 1>    q_base(this->degree);
-  const unsigned int n_face_points = q_base.size();
+  const QGauss<dim - 1> q_base(this->degree);
+  const unsigned int    n_face_points = q_base.size();
   // First, compute interpolation on
   // subfaces
   for (const unsigned int face : GeometryInfo<dim>::face_indices())
@@ -463,7 +463,7 @@ FE_RaviartThomas<dim>::initialize_restriction()
       // child cell are evaluated
       // in the quadrature points
       // of a full face.
-      Quadrature<dim> q_face =
+      const Quadrature<dim> q_face =
         QProjector<dim>::project_to_face(this->reference_cell(), q_base, face);
       // Store shape values, since the
       // evaluation suffers if not
@@ -482,7 +482,7 @@ FE_RaviartThomas<dim>::initialize_restriction()
           // the coarse face are
           // evaluated on the subface
           // only.
-          Quadrature<dim> q_sub = QProjector<dim>::project_to_subface(
+          const Quadrature<dim> q_sub = QProjector<dim>::project_to_subface(
             this->reference_cell(), q_base, face, sub);
           const unsigned int child = GeometryInfo<dim>::child_cell_on_face(
             RefinementCase<dim>::isotropic_refinement, face, sub);
@@ -546,7 +546,7 @@ FE_RaviartThomas<dim>::initialize_restriction()
   AssertDimension(this->n_unique_faces(), 1);
   const unsigned int face_no = 0;
 
-  QGauss<dim>        q_cell(this->degree);
+  const QGauss<dim>  q_cell(this->degree);
   const unsigned int start_cell_dofs =
     GeometryInfo<dim>::faces_per_cell * this->n_dofs_per_face(face_no);
 
index a9339f68b24e2117a7e5bc5dabd5a91e3121167a..97a3304a0004c9293ec29057b0d0a25759bb1972 100644 (file)
@@ -175,7 +175,7 @@ FE_RT_Bubbles<dim>::initialize_support_points(const unsigned int deg)
   // This is the deg of the RT_Bubble element plus one.
   if (dim > 1)
     {
-      QGaussLobatto<dim - 1> face_points(deg + 1);
+      const QGaussLobatto<dim - 1> face_points(deg + 1);
       Assert(face_points.size() == this->n_dofs_per_face(face_no),
              ExcInternalError());
       for (unsigned int k = 0; k < this->n_dofs_per_face(face_no); ++k)
@@ -203,8 +203,8 @@ FE_RT_Bubbles<dim>::initialize_support_points(const unsigned int deg)
 
   // In the interior, we need anisotropic Gauss-Lobatto quadratures,
   // one for each direction
-  QGaussLobatto<1>      high(deg + 1);
-  std::vector<Point<1>> pts = high.get_points();
+  const QGaussLobatto<1> high(deg + 1);
+  std::vector<Point<1>>  pts = high.get_points();
   if (pts.size() > 2)
     {
       pts.erase(pts.begin());
@@ -212,7 +212,7 @@ FE_RT_Bubbles<dim>::initialize_support_points(const unsigned int deg)
     }
 
   std::vector<double> wts(pts.size(), 1);
-  Quadrature<1>       low(pts, wts);
+  const Quadrature<1> low(pts, wts);
 
   for (unsigned int d = 0; d < dim; ++d)
     {
index ae95a3ba796924575ac164f5d18011eb8e342828..5f0cf67c9f3906d3c37f02320fefe5f0d53b7eb5 100644 (file)
@@ -111,14 +111,15 @@ MappingQCache<dim, spacedim>::initialize(
           auto &fe_values = fe_values_all.get();
           if (fe_values.get() == nullptr)
             {
-              QGaussLobatto<dim> quadrature_gl(this->polynomial_degree + 1);
+              const QGaussLobatto<dim> quadrature_gl(this->polynomial_degree +
+                                                     1);
 
               std::vector<Point<dim>> quadrature_points;
               for (const auto i :
                    FETools::hierarchic_to_lexicographic_numbering<dim>(
                      this->polynomial_degree))
                 quadrature_points.push_back(quadrature_gl.point(i));
-              Quadrature<dim> quadrature(quadrature_points);
+              const Quadrature<dim> quadrature(quadrature_points);
 
               fe_values = std::make_unique<FEValues<dim, spacedim>>(
                 mapping, fe, quadrature, update_quadrature_points);
@@ -208,14 +209,15 @@ MappingQCache<dim, spacedim>::initialize(
           auto &fe_values = fe_values_all.get();
           if (fe_values.get() == nullptr)
             {
-              QGaussLobatto<dim> quadrature_gl(this->polynomial_degree + 1);
+              const QGaussLobatto<dim> quadrature_gl(this->polynomial_degree +
+                                                     1);
 
               std::vector<Point<dim>> quadrature_points;
               for (const auto i :
                    FETools::hierarchic_to_lexicographic_numbering<dim>(
                      this->polynomial_degree))
                 quadrature_points.push_back(quadrature_gl.point(i));
-              Quadrature<dim> quadrature(quadrature_points);
+              const Quadrature<dim> quadrature(quadrature_points);
 
               fe_values = std::make_unique<FEValues<dim, spacedim>>(
                 mapping, fe, quadrature, update_quadrature_points);
@@ -364,14 +366,15 @@ MappingQCache<dim, spacedim>::initialize(
           auto &fe_values = fe_values_all.get();
           if (fe_values.get() == nullptr)
             {
-              QGaussLobatto<dim> quadrature_gl(this->polynomial_degree + 1);
+              const QGaussLobatto<dim> quadrature_gl(this->polynomial_degree +
+                                                     1);
 
               std::vector<Point<dim>> quadrature_points;
               for (const auto i :
                    FETools::hierarchic_to_lexicographic_numbering<dim>(
                      this->polynomial_degree))
                 quadrature_points.push_back(quadrature_gl.point(i));
-              Quadrature<dim> quadrature(quadrature_points);
+              const Quadrature<dim> quadrature(quadrature_points);
 
               fe_values = std::make_unique<FEValues<dim, spacedim>>(
                 mapping,
@@ -567,14 +570,15 @@ MappingQCache<dim, spacedim>::initialize(
           auto &fe_values = fe_values_all.get();
           if (fe_values.get() == nullptr)
             {
-              QGaussLobatto<dim> quadrature_gl(this->polynomial_degree + 1);
+              const QGaussLobatto<dim> quadrature_gl(this->polynomial_degree +
+                                                     1);
 
               std::vector<Point<dim>> quadrature_points;
               for (const auto i :
                    FETools::hierarchic_to_lexicographic_numbering<dim>(
                      this->polynomial_degree))
                 quadrature_points.push_back(quadrature_gl.point(i));
-              Quadrature<dim> quadrature(quadrature_points);
+              const Quadrature<dim> quadrature(quadrature_points);
 
               fe_values = std::make_unique<FEValues<dim, spacedim>>(
                 mapping,
index 1daf6d7eaf45f0cc0360871ba1cdc590a3ca58a8..d30eec1f0cda02d7015736d0bb4aef7775727a0f 100644 (file)
@@ -3698,7 +3698,7 @@ GridOut::write_mesh_per_processor_as_vtu(
 
           // We need a dummy vector with the names of the data values in the
           // .vtu files in order that the .pvtu contains reference these values
-          Vector<float> dummy_vector(tr->n_active_cells());
+          const Vector<float> dummy_vector(tr->n_active_cells());
           data_out.add_data_vector(dummy_vector, "level");
           data_out.add_data_vector(dummy_vector, "subdomain");
           data_out.add_data_vector(dummy_vector, "level_subdomain");
@@ -4233,8 +4233,8 @@ namespace internal
           for (unsigned int i = 1; i < n_points - 1; ++i)
             boundary_points[i][0] = 1. * i / (n_points - 1);
 
-          std::vector<double> dummy_weights(n_points, 1. / n_points);
-          Quadrature<dim - 1> quadrature(boundary_points, dummy_weights);
+          const std::vector<double> dummy_weights(n_points, 1. / n_points);
+          const Quadrature<dim - 1> quadrature(boundary_points, dummy_weights);
 
           q_projector = QProjector<dim>::project_to_all_faces(
             ReferenceCells::get_hypercube<dim>(), quadrature);
@@ -4355,11 +4355,11 @@ namespace internal
           for (unsigned int i = 1; i < n_points - 1; ++i)
             boundary_points[i][0] = 1. * i / (n_points - 1);
 
-          std::vector<double> dummy_weights(n_points, 1. / n_points);
-          Quadrature<1>       quadrature1d(boundary_points, dummy_weights);
+          const std::vector<double> dummy_weights(n_points, 1. / n_points);
+          const Quadrature<1> quadrature1d(boundary_points, dummy_weights);
 
           // tensor product of points, only one copy
-          QIterated<dim - 1> quadrature(quadrature1d, 1);
+          const QIterated<dim - 1> quadrature(quadrature1d, 1);
           q_projector = std::make_unique<Quadrature<dim>>(
             QProjector<dim>::project_to_all_faces(
               ReferenceCells::get_hypercube<dim>(), quadrature));
@@ -4788,8 +4788,8 @@ namespace internal
                   for (unsigned int i = 0; i < n_points; ++i)
                     boundary_points[i][0] = 1. * (i + 1) / (n_points + 1);
 
-                  Quadrature<dim - 1> quadrature(boundary_points);
-                  Quadrature<dim>     q_projector(
+                  const Quadrature<dim - 1> quadrature(boundary_points);
+                  const Quadrature<dim>     q_projector(
                     QProjector<dim>::project_to_all_faces(
                       ReferenceCells::get_hypercube<dim>(), quadrature));
 
index c0adeb3d22eacfe4b14d8e8fdcdd678ad1145d34..2503c671fdaff249eba79bf4807a3dfa9d06738a 100644 (file)
@@ -322,7 +322,7 @@ namespace GridTools
 
     SparseMatrix<double> S(sparsity_pattern);
 
-    QGauss<dim> quadrature(4);
+    const QGauss<dim> quadrature(4);
 
     Assert(triangulation.all_reference_cells_are_hyper_cube(),
            ExcNotImplemented());
index 089bfa59892735bea3a913e837015fbb18ce5723..ddc375cb60b818f01356d2a4175d1528bebe3b5a 100644 (file)
@@ -1656,7 +1656,7 @@ TransfiniteInterpolationManifold<dim, spacedim>::initialize(
   // back to a simple GridTools::affine_cell_approximation<dim>() which
   // requires 2^dim points, instead. Thus, initialize the QIterated
   // quadrature with no subdivisions.
-  std::vector<Point<dim>> unit_points =
+  const std::vector<Point<dim>> unit_points =
     QIterated<dim>(QTrapezoid<1>(), (dim == spacedim ? 2 : 1)).get_points();
   std::vector<Point<spacedim>> real_points(unit_points.size());
 
index 1d2d0d59dc4d2ee7ab067bba734f6b47c00b9672..0715c29a09b67d55c3202a35022858d2659e295f 100644 (file)
@@ -54,7 +54,7 @@ DataOutResample<dim, patch_dim, spacedim>::update_mapping(
 
   std::vector<std::pair<types::global_dof_index, Point<spacedim>>> points_all;
 
-  Quadrature<patch_dim> quadrature(fe.get_unit_support_points());
+  const Quadrature<patch_dim> quadrature(fe.get_unit_support_points());
 
   FEValues<patch_dim, spacedim> fe_values(*patch_mapping,
                                           fe,
index c2dcd3b83708b472e073f1382bac064a2296686c..e64b1f5f3dea4b051666fe42f76ce185335168b6 100644 (file)
@@ -277,8 +277,8 @@ DataOutStack<dim, spacedim>::build_patches(const unsigned int nnnn_subdivisions)
   // patch, and an object that
   // extracts the data on each
   // cell to these points
-  QTrapezoid<1>  q_trapez;
-  QIterated<dim> patch_points(q_trapez, n_subdivisions);
+  const QTrapezoid<1>  q_trapez;
+  const QIterated<dim> patch_points(q_trapez, n_subdivisions);
 
   // create collection objects from
   // single quadratures,
index fb43e67b9fe2c20a59ae86f54a8e422ee2269fe0..61154c2b1a8ad08923d6cb34dc5f00f1650a0cdf 100644 (file)
@@ -749,7 +749,7 @@ namespace DerivativeApproximation
       const typename DoFHandler<dim, spacedim>::active_cell_iterator &cell,
       typename DerivativeDescription::Derivative &derivative)
     {
-      QMidpoint<dim> midpoint_rule;
+      const QMidpoint<dim> midpoint_rule;
 
       // create collection objects from
       // single quadratures, mappings,

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

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.