From 3fe138239282475cae91044f9f8cdf73388dcbad Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 3 May 2024 22:49:03 +0530 Subject: [PATCH] Mark FEValuesExtractors objects as 'const'. --- .../nonlinear-poro-viscoelasticity.cc | 6 +++--- information_based_mesh_refinement/mesh_refinement.cc | 4 ++-- .../time_dependent_navier_stokes.cc | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Nonlinear_PoroViscoelasticity/nonlinear-poro-viscoelasticity.cc b/Nonlinear_PoroViscoelasticity/nonlinear-poro-viscoelasticity.cc index ff55888..96b6e43 100644 --- a/Nonlinear_PoroViscoelasticity/nonlinear-poro-viscoelasticity.cc +++ b/Nonlinear_PoroViscoelasticity/nonlinear-poro-viscoelasticity.cc @@ -4562,7 +4562,7 @@ namespace NonLinearPoroViscoElasticity if (this->parameters.load_type == "displacement") { const std::vector 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 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 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, diff --git a/information_based_mesh_refinement/mesh_refinement.cc b/information_based_mesh_refinement/mesh_refinement.cc index edd9ff5..b43ea1a 100644 --- a/information_based_mesh_refinement/mesh_refinement.cc +++ b/information_based_mesh_refinement/mesh_refinement.cc @@ -395,7 +395,7 @@ void InformationDensityMeshRefinement::assemble_system () std::vector 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::refine_grid () QGauss quadrature(3); FEValues fe_values (fe, quadrature, update_values | update_JxW_values); - FEValuesExtractors::Scalar lambda(1), f(2); + const FEValuesExtractors::Scalar lambda(1), f(2); std::vector lambda_values (quadrature.size()); std::vector f_values (quadrature.size()); diff --git a/time_dependent_navier_stokes/time_dependent_navier_stokes.cc b/time_dependent_navier_stokes/time_dependent_navier_stokes.cc index 6795901..a7f0738 100644 --- a/time_dependent_navier_stokes/time_dependent_navier_stokes.cc +++ b/time_dependent_navier_stokes/time_dependent_navier_stokes.cc @@ -697,7 +697,7 @@ namespace fluid else dirichlet_bc_ids = std::vector{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 estimated_error_per_cell(triangulation.n_active_cells()); - FEValuesExtractors::Vector velocity(0); + const FEValuesExtractors::Vector velocity(0); KellyErrorEstimator::estimate(dof_handler, face_quad_formula, {}, -- 2.39.5