]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix reviewer's comments 15270/head
authorBruno Turcksin <bruno.turcksin@gmail.com>
Wed, 31 May 2023 01:05:54 +0000 (01:05 +0000)
committerBruno Turcksin <bruno.turcksin@gmail.com>
Wed, 31 May 2023 19:49:51 +0000 (19:49 +0000)
examples/step-47/step-47.cc
examples/step-7/step-7.cc
examples/step-85/step-85.cc
include/deal.II/base/tensor.h

index d68eb2b8b5141c965b46f6c0c700c5de3b0308ee..99c5a6a05e207dd59331badc9fbd56f1f65be05c 100644 (file)
@@ -87,8 +87,6 @@ namespace Step47
     public:
       static_assert(dim == 2, "Only dim==2 is implemented.");
 
-      Solution() = default;
-
       virtual double value(const Point<dim> &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<dim> &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<dim> right_hand_side;
+      ExactSolution::RightHandSide<dim> 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<dim> exact_solution;
-      std::vector<Tensor<1, dim>>        exact_gradients(q_points.size());
+      ExactSolution::Solution<dim> exact_solution;
+      std::vector<Tensor<1, dim>>  exact_gradients(q_points.size());
       exact_solution.gradient_list(q_points, exact_gradients);
 
 
index 823d8d4d59c9bec256d95f8422876b5cc8fd0438..efc8e16740bea521e0ce07115c3bf13b54b478c9 100644 (file)
@@ -268,8 +268,6 @@ namespace Step7
   class RightHandSide : public Function<dim>, protected SolutionBase<dim>
   {
   public:
-    RightHandSide() = default;
-
     virtual double value(const Point<dim> & 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 <code>const</code>:
-    const RightHandSide<dim> right_hand_side;
-    std::vector<double>      rhs_values(n_q_points);
+    RightHandSide<dim>  right_hand_side;
+    std::vector<double> 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
index 3ab68a218cdd498ed0d56691340baa90f3eb5319..63466872b85c84816ac9a7f7c6676f004516f5bc 100644 (file)
@@ -582,8 +582,6 @@ namespace Step85
   class AnalyticalSolution : public Function<dim>
   {
   public:
-    AnalyticalSolution() = default;
-
     double value(const Point<dim> & 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<dim> analytical_solution;
-    double                        error_L2_squared = 0;
+    AnalyticalSolution<dim> analytical_solution;
+    double                  error_L2_squared = 0;
 
     for (const auto &cell :
          dof_handler.active_cell_iterators() |
index e197a695fec6fbd733130c329333c124ade05a1a..589b7a76911684d49ca3804ae4c832753e3fa765 100644 (file)
@@ -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<rank_> &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<rank_>
+  static constexpr DEAL_II_HOST_DEVICE TableIndices<rank_>
   unrolled_to_component_indices(const unsigned int i);
 
   /**

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.