]> https://gitweb.dealii.org/ - code-gallery.git/commitdiff
Mark FEValuesExtractors objects as 'const'. 176/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Fri, 3 May 2024 17:19:03 +0000 (22:49 +0530)
committerWolfgang Bangerth <bangerth@colostate.edu>
Fri, 3 May 2024 17:19:03 +0000 (22:49 +0530)
Nonlinear_PoroViscoelasticity/nonlinear-poro-viscoelasticity.cc
information_based_mesh_refinement/mesh_refinement.cc
time_dependent_navier_stokes/time_dependent_navier_stokes.cc

index ff55888495afbb1ecf8a689ffc422404fb883db7..96b6e4380a27a3a4d0c39813c05efd3fef0fca6f 100644 (file)
@@ -4562,7 +4562,7 @@ namespace NonLinearPoroViscoElasticity
             if (this->parameters.load_type == "displacement")
             {
                 const std::vector<double> value = get_dirichlet_load(5,2);
-                FEValuesExtractors::Scalar direction;
+                const FEValuesExtractors::Scalar direction;
                 direction = this->z_displacement;
 
                 VectorTools::interpolate_boundary_values( this->dof_handler_ref,
@@ -4707,7 +4707,7 @@ namespace NonLinearPoroViscoElasticity
             if (this->parameters.load_type == "displacement")
             {
                 const std::vector<double> value = get_dirichlet_load(5,2);
-                FEValuesExtractors::Scalar direction;
+                const FEValuesExtractors::Scalar direction;
                 direction = this->z_displacement;
 
                 VectorTools::interpolate_boundary_values( this->dof_handler_ref,
@@ -4857,7 +4857,7 @@ namespace NonLinearPoroViscoElasticity
             if (this->parameters.load_type == "displacement")
             {
                 const std::vector<double> value = get_dirichlet_load(4,0);
-                FEValuesExtractors::Scalar direction;
+                const FEValuesExtractors::Scalar direction;
                 direction = this->x_displacement;
 
                 VectorTools::interpolate_boundary_values( this->dof_handler_ref,
index edd9ff53df53a28ab89db066067f0fd5ed079840..b43ea1ada6e61df3ae3e170208202365e3c77ab1 100644 (file)
@@ -395,7 +395,7 @@ void InformationDensityMeshRefinement<dim>::assemble_system ()
 
   std::vector<unsigned int> local_dof_indices (dofs_per_cell);
 
-  FEValuesExtractors::Scalar c(0), lambda(1), f(2);
+  const FEValuesExtractors::Scalar c(0), lambda(1), f(2);
 
   for (const auto &cell : dof_handler.active_cell_iterators())
     {
@@ -760,7 +760,7 @@ void InformationDensityMeshRefinement<dim>::refine_grid ()
       QGauss<dim> quadrature(3);
       FEValues<dim> fe_values (fe, quadrature, update_values | update_JxW_values);
 
-      FEValuesExtractors::Scalar lambda(1), f(2);
+      const FEValuesExtractors::Scalar lambda(1), f(2);
 
       std::vector<double> lambda_values (quadrature.size());
       std::vector<double> f_values (quadrature.size());
index 6795901fc5dc34286eba224d9abcd59d0b72a637..a7f07385d62ce08fe38242ac28caa1da6d51f3ce 100644 (file)
@@ -697,7 +697,7 @@ namespace fluid
     else
       dirichlet_bc_ids = std::vector<unsigned int>{0, 2, 3, 4, 5, 6};
 
-    FEValuesExtractors::Vector velocities(0);
+    const FEValuesExtractors::Vector velocities(0);
     for (auto id : dirichlet_bc_ids)
       {
         VectorTools::interpolate_boundary_values(dof_handler,
@@ -1081,7 +1081,7 @@ namespace fluid
     pcout << "Refining mesh..." << std::endl;
 
     Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
-    FEValuesExtractors::Vector velocity(0);
+    const FEValuesExtractors::Vector velocity(0);
     KellyErrorEstimator<dim>::estimate(dof_handler,
                                        face_quad_formula,
                                        {},

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.