From c96a5fe5230c2c3f2f6527e9aac43ca4f0128781 Mon Sep 17 00:00:00 2001 From: Bruno Turcksin Date: Wed, 31 May 2023 01:05:54 +0000 Subject: [PATCH] Fix reviewer's comments --- examples/step-47/step-47.cc | 10 +++------- examples/step-7/step-7.cc | 6 ++---- examples/step-85/step-85.cc | 6 ++---- include/deal.II/base/tensor.h | 4 ++-- 4 files changed, 9 insertions(+), 17 deletions(-) diff --git a/examples/step-47/step-47.cc b/examples/step-47/step-47.cc index d68eb2b8b5..99c5a6a05e 100644 --- a/examples/step-47/step-47.cc +++ b/examples/step-47/step-47.cc @@ -87,8 +87,6 @@ namespace Step47 public: static_assert(dim == 2, "Only dim==2 is implemented."); - Solution() = default; - virtual double value(const Point &p, const unsigned int /*component*/ = 0) const override { @@ -129,8 +127,6 @@ namespace Step47 public: static_assert(dim == 2, "Only dim==2 is implemented"); - RightHandSide() = default; - virtual double value(const Point &p, const unsigned int /*component*/ = 0) const override @@ -411,7 +407,7 @@ namespace Step47 cell->get_dof_indices(copy_data.local_dof_indices); - const ExactSolution::RightHandSide right_hand_side; + ExactSolution::RightHandSide right_hand_side; const unsigned int dofs_per_cell = scratch_data.fe_values.get_fe().n_dofs_per_cell(); @@ -614,8 +610,8 @@ namespace Step47 fe_interface_values.get_normal_vectors(); - const ExactSolution::Solution exact_solution; - std::vector> exact_gradients(q_points.size()); + ExactSolution::Solution exact_solution; + std::vector> exact_gradients(q_points.size()); exact_solution.gradient_list(q_points, exact_gradients); diff --git a/examples/step-7/step-7.cc b/examples/step-7/step-7.cc index 823d8d4d59..efc8e16740 100644 --- a/examples/step-7/step-7.cc +++ b/examples/step-7/step-7.cc @@ -268,8 +268,6 @@ namespace Step7 class RightHandSide : public Function, protected SolutionBase { public: - RightHandSide() = default; - virtual double value(const Point & p, const unsigned int component = 0) const override; }; @@ -571,8 +569,8 @@ namespace Step7 // Note that the operations we will do with the right hand side object are // only querying data, never changing the object. We can therefore declare // it const: - const RightHandSide right_hand_side; - std::vector rhs_values(n_q_points); + RightHandSide right_hand_side; + std::vector rhs_values(n_q_points); // Finally we define an object denoting the exact solution function. We // will use it to compute the Neumann values at the boundary from diff --git a/examples/step-85/step-85.cc b/examples/step-85/step-85.cc index 3ab68a218c..63466872b8 100644 --- a/examples/step-85/step-85.cc +++ b/examples/step-85/step-85.cc @@ -582,8 +582,6 @@ namespace Step85 class AnalyticalSolution : public Function { public: - AnalyticalSolution() = default; - double value(const Point & point, const unsigned int component = 0) const override; }; @@ -627,8 +625,8 @@ namespace Step85 // We then iterate iterate over the cells that have LocationToLevelSetValue // value inside or intersected again. For each quadrature point, we compute // the pointwise error and use this to compute the integral. - const AnalyticalSolution analytical_solution; - double error_L2_squared = 0; + AnalyticalSolution analytical_solution; + double error_L2_squared = 0; for (const auto &cell : dof_handler.active_cell_iterators() | diff --git a/include/deal.II/base/tensor.h b/include/deal.II/base/tensor.h index e197a695fe..589b7a7691 100644 --- a/include/deal.II/base/tensor.h +++ b/include/deal.II/base/tensor.h @@ -845,7 +845,7 @@ public: * Return an unrolled index in the range $[0,\text{dim}^{\text{rank}}-1]$ * for the element of the tensor indexed by the argument to the function. */ - DEAL_II_HOST_DEVICE static constexpr unsigned int + static constexpr DEAL_II_HOST_DEVICE unsigned int component_to_unrolled_index(const TableIndices &indices); /** @@ -853,7 +853,7 @@ public: * $[0, \text{dim}^{\text{rank}}-1]$, return which set of indices it would * correspond to. */ - DEAL_II_HOST_DEVICE static constexpr TableIndices + static constexpr DEAL_II_HOST_DEVICE TableIndices unrolled_to_component_indices(const unsigned int i); /** -- 2.39.5