]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Rename TensorPolynomials::compute() to ::evaluate().
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 21 Aug 2019 19:54:59 +0000 (13:54 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 21 Aug 2019 19:54:59 +0000 (13:54 -0600)
We've used this kind of terminology in a number of other places. The point is
that we don't 'compute' the polynomial at that point; its form is fixed. Rather,
we 'evaluate' the polynomial for a particular value of its argument.

15 files changed:
include/deal.II/base/polynomials_abf.h
include/deal.II/base/polynomials_bdm.h
include/deal.II/base/polynomials_bernardi_raugel.h
include/deal.II/base/polynomials_nedelec.h
include/deal.II/base/polynomials_raviart_thomas.h
include/deal.II/base/polynomials_rt_bubbles.h
include/deal.II/base/tensor_polynomials_base.h
include/deal.II/fe/fe_poly_tensor.h
source/base/polynomials_abf.cc
source/base/polynomials_bdm.cc
source/base/polynomials_bernardi_raugel.cc
source/base/polynomials_nedelec.cc
source/base/polynomials_raviart_thomas.cc
source/base/polynomials_rt_bubbles.cc
source/fe/fe_poly_tensor.cc

index 44ef70688b208841c1b5c82f6a5b12ee6ab75953..74f37dc403abd2807e98cd3249f55df06ae15809 100644 (file)
@@ -78,12 +78,12 @@ public:
    * in a loop over all tensor product polynomials.
    */
   void
-  compute(const Point<dim> &           unit_point,
-          std::vector<Tensor<1, dim>> &values,
-          std::vector<Tensor<2, dim>> &grads,
-          std::vector<Tensor<3, dim>> &grad_grads,
-          std::vector<Tensor<4, dim>> &third_derivatives,
-          std::vector<Tensor<5, dim>> &fourth_derivatives) const override;
+  evaluate(const Point<dim> &           unit_point,
+           std::vector<Tensor<1, dim>> &values,
+           std::vector<Tensor<2, dim>> &grads,
+           std::vector<Tensor<3, dim>> &grad_grads,
+           std::vector<Tensor<4, dim>> &third_derivatives,
+           std::vector<Tensor<5, dim>> &fourth_derivatives) const override;
 
   /**
    * Return the name of the space, which is <tt>ABF</tt>.
index be37ecc584e44e9115c9a46f97c038054abeb7a6..75a4bde8fb242d718d24c6fa8bac2b8371654faf 100644 (file)
@@ -124,12 +124,12 @@ public:
    * in a loop over all tensor product polynomials.
    */
   void
-  compute(const Point<dim> &           unit_point,
-          std::vector<Tensor<1, dim>> &values,
-          std::vector<Tensor<2, dim>> &grads,
-          std::vector<Tensor<3, dim>> &grad_grads,
-          std::vector<Tensor<4, dim>> &third_derivatives,
-          std::vector<Tensor<5, dim>> &fourth_derivatives) const override;
+  evaluate(const Point<dim> &           unit_point,
+           std::vector<Tensor<1, dim>> &values,
+           std::vector<Tensor<2, dim>> &grads,
+           std::vector<Tensor<3, dim>> &grad_grads,
+           std::vector<Tensor<4, dim>> &third_derivatives,
+           std::vector<Tensor<5, dim>> &fourth_derivatives) const override;
 
   /**
    * Return the degree of the BDM space, which is one less than the highest
index 3c4c605256a32a720a2100210f8ca5e7b7609738..d83a2e4d1c29feb1225c2bea14a5e451f5e5149f 100644 (file)
@@ -113,12 +113,12 @@ public:
    * in a loop over all tensor product polynomials.
    */
   void
-  compute(const Point<dim> &           unit_point,
-          std::vector<Tensor<1, dim>> &values,
-          std::vector<Tensor<2, dim>> &grads,
-          std::vector<Tensor<3, dim>> &grad_grads,
-          std::vector<Tensor<4, dim>> &third_derivatives,
-          std::vector<Tensor<5, dim>> &fourth_derivatives) const override;
+  evaluate(const Point<dim> &           unit_point,
+           std::vector<Tensor<1, dim>> &values,
+           std::vector<Tensor<2, dim>> &grads,
+           std::vector<Tensor<3, dim>> &grad_grads,
+           std::vector<Tensor<4, dim>> &third_derivatives,
+           std::vector<Tensor<5, dim>> &fourth_derivatives) const override;
 
   /**
    * Return the number of polynomials in the space <tt>BR(degree)</tt> without
index ef1e061a261348422e76d9d24c1a38582a765b7d..290734487901e464343e7ca51d954058c7aae549 100644 (file)
@@ -75,12 +75,12 @@ public:
    * in a loop over all tensor product polynomials.
    */
   void
-  compute(const Point<dim> &           unit_point,
-          std::vector<Tensor<1, dim>> &values,
-          std::vector<Tensor<2, dim>> &grads,
-          std::vector<Tensor<3, dim>> &grad_grads,
-          std::vector<Tensor<4, dim>> &third_derivatives,
-          std::vector<Tensor<5, dim>> &fourth_derivatives) const override;
+  evaluate(const Point<dim> &           unit_point,
+           std::vector<Tensor<1, dim>> &values,
+           std::vector<Tensor<2, dim>> &grads,
+           std::vector<Tensor<3, dim>> &grad_grads,
+           std::vector<Tensor<4, dim>> &third_derivatives,
+           std::vector<Tensor<5, dim>> &fourth_derivatives) const override;
 
   /**
    * Return the name of the space, which is <tt>Nedelec</tt>.
index c0cd7c7bc43fc73745d051d2b5a3769d00bf0e7a..0176e3714ff95de4b36765fb8ebbe59ccde52b99 100644 (file)
@@ -73,12 +73,12 @@ public:
    * in a loop over all tensor product polynomials.
    */
   void
-  compute(const Point<dim> &           unit_point,
-          std::vector<Tensor<1, dim>> &values,
-          std::vector<Tensor<2, dim>> &grads,
-          std::vector<Tensor<3, dim>> &grad_grads,
-          std::vector<Tensor<4, dim>> &third_derivatives,
-          std::vector<Tensor<5, dim>> &fourth_derivatives) const override;
+  evaluate(const Point<dim> &           unit_point,
+           std::vector<Tensor<1, dim>> &values,
+           std::vector<Tensor<2, dim>> &grads,
+           std::vector<Tensor<3, dim>> &grad_grads,
+           std::vector<Tensor<4, dim>> &third_derivatives,
+           std::vector<Tensor<5, dim>> &fourth_derivatives) const override;
 
   /**
    * Return the name of the space, which is <tt>RaviartThomas</tt>.
index a77f1af3607b4c768df9d3818a75f7e04830e40e..04fe4da5b471974c1a5fb793d1ecfc9bbad957dd 100644 (file)
@@ -107,12 +107,12 @@ public:
    * in a loop over all tensor product polynomials.
    */
   void
-  compute(const Point<dim> &           unit_point,
-          std::vector<Tensor<1, dim>> &values,
-          std::vector<Tensor<2, dim>> &grads,
-          std::vector<Tensor<3, dim>> &grad_grads,
-          std::vector<Tensor<4, dim>> &third_derivatives,
-          std::vector<Tensor<5, dim>> &fourth_derivatives) const override;
+  evaluate(const Point<dim> &           unit_point,
+           std::vector<Tensor<1, dim>> &values,
+           std::vector<Tensor<2, dim>> &grads,
+           std::vector<Tensor<3, dim>> &grad_grads,
+           std::vector<Tensor<4, dim>> &third_derivatives,
+           std::vector<Tensor<5, dim>> &fourth_derivatives) const override;
 
   /**
    * Return the name of the space, which is <tt>RT_Bubbles</tt>.
index cbd82f376720feeb8f941797795c1523f160aad5..c8c1e286db14bca7de3b4f5ff263eb0c6e7d0cfc 100644 (file)
@@ -37,8 +37,8 @@ DEAL_II_NAMESPACE_OPEN
  *
  * Any derived class must provide the most basic properties for shape
  * functions evaluated on the reference cell. This includes, but is not
- * limited to, implementing the <tt>compute</tt>, <tt>name</tt>, and
- * <tt>clone</tt> member functions. These functions are necessary to store the
+ * limited to, implementing the evaluate(), name(), and
+ * clone() member functions. These functions are necessary to store the
  * most basic information of how the polynomials in the derived class evaluate
  * at a given point on the reference cell. More information on each function can
  * be found in the corresponding function's documentation.
@@ -97,12 +97,12 @@ public:
    * in a loop over all tensor product polynomials.
    */
   virtual void
-  compute(const Point<dim> &           unit_point,
-          std::vector<Tensor<1, dim>> &values,
-          std::vector<Tensor<2, dim>> &grads,
-          std::vector<Tensor<3, dim>> &grad_grads,
-          std::vector<Tensor<4, dim>> &third_derivatives,
-          std::vector<Tensor<5, dim>> &fourth_derivatives) const = 0;
+  evaluate(const Point<dim> &           unit_point,
+           std::vector<Tensor<1, dim>> &values,
+           std::vector<Tensor<2, dim>> &grads,
+           std::vector<Tensor<3, dim>> &grad_grads,
+           std::vector<Tensor<4, dim>> &third_derivatives,
+           std::vector<Tensor<5, dim>> &fourth_derivatives) const = 0;
 
   /**
    * Return the number of polynomials.
index 1fa69c4156788879e06cb69a9b0f1d878281b822..82aadeb6e22b2e8517d43252e12c33b4db793f00 100644 (file)
@@ -322,12 +322,12 @@ protected:
     if (update_flags & (update_values | update_gradients))
       for (unsigned int k = 0; k < n_q_points; ++k)
         {
-          poly_space->compute(quadrature.point(k),
-                              values,
-                              grads,
-                              grad_grads,
-                              third_derivatives,
-                              fourth_derivatives);
+          poly_space->evaluate(quadrature.point(k),
+                               values,
+                               grads,
+                               grad_grads,
+                               third_derivatives,
+                               fourth_derivatives);
 
           if (update_flags & update_values)
             {
index 6bd98f574717c41f801f9fdfe4374867433ec98e..5d825474e013a5669d01c4bbcd048ddcd1a96f6d 100644 (file)
@@ -61,7 +61,7 @@ PolynomialsABF<dim>::PolynomialsABF(const unsigned int k)
 
 template <int dim>
 void
-PolynomialsABF<dim>::compute(
+PolynomialsABF<dim>::evaluate(
   const Point<dim> &           unit_point,
   std::vector<Tensor<1, dim>> &values,
   std::vector<Tensor<2, dim>> &grads,
index 4669b0ddbb10ab760f93c73627bc3c0c432d5f9c..5c0d8d811a1830626783d20b99eaab150e6a7edd 100644 (file)
@@ -53,7 +53,7 @@ PolynomialsBDM<dim>::PolynomialsBDM(const unsigned int k)
 
 template <int dim>
 void
-PolynomialsBDM<dim>::compute(
+PolynomialsBDM<dim>::evaluate(
   const Point<dim> &           unit_point,
   std::vector<Tensor<1, dim>> &values,
   std::vector<Tensor<2, dim>> &grads,
index 62e643274eb787ea3f5ce7bc36f9ac45e359b565..43d9fd22c54ad7e25bbe7974faf27286207373d3 100644 (file)
@@ -67,7 +67,7 @@ PolynomialsBernardiRaugel<dim>::create_polynomials_Q()
 
 template <int dim>
 void
-PolynomialsBernardiRaugel<dim>::compute(
+PolynomialsBernardiRaugel<dim>::evaluate(
   const Point<dim> &           unit_point,
   std::vector<Tensor<1, dim>> &values,
   std::vector<Tensor<2, dim>> &grads,
index de531fada5e69b6a2784e1e6a275d6cb7f51bc40..f72966a4b45ebd9e950724f2b0af55c4fb1a461a 100644 (file)
@@ -51,7 +51,7 @@ PolynomialsNedelec<dim>::create_polynomials(const unsigned int k)
 // polynomial at the given point.
 template <int dim>
 void
-PolynomialsNedelec<dim>::compute(
+PolynomialsNedelec<dim>::evaluate(
   const Point<dim> &           unit_point,
   std::vector<Tensor<1, dim>> &values,
   std::vector<Tensor<2, dim>> &grads,
index d15e210ca8a855194d1b7e0f1a979d20b8e5ed19..1ea3176bc68b5632dab6c5dc05e9025af2c85e0e 100644 (file)
@@ -61,7 +61,7 @@ PolynomialsRaviartThomas<dim>::create_polynomials(const unsigned int k)
 
 template <int dim>
 void
-PolynomialsRaviartThomas<dim>::compute(
+PolynomialsRaviartThomas<dim>::evaluate(
   const Point<dim> &           unit_point,
   std::vector<Tensor<1, dim>> &values,
   std::vector<Tensor<2, dim>> &grads,
index c4412c930c2c14fcee5bc90ed9242f1b4c95b199..e85d165c22fc328c1db9a03ed2671daf00ee8695 100644 (file)
@@ -42,7 +42,7 @@ PolynomialsRT_Bubbles<dim>::PolynomialsRT_Bubbles(const unsigned int k)
 
 template <int dim>
 void
-PolynomialsRT_Bubbles<dim>::compute(
+PolynomialsRT_Bubbles<dim>::evaluate(
   const Point<dim> &           unit_point,
   std::vector<Tensor<1, dim>> &values,
   std::vector<Tensor<2, dim>> &grads,
@@ -89,12 +89,12 @@ PolynomialsRT_Bubbles<dim>::compute(
     p_grad_grads.resize((grad_grads.size() == 0) ? 0 : n_sub);
 
     // This is the Raviart-Thomas part of the space
-    raviart_thomas_space.compute(unit_point,
-                                 p_values,
-                                 p_grads,
-                                 p_grad_grads,
-                                 p_third_derivatives,
-                                 p_fourth_derivatives);
+    raviart_thomas_space.evaluate(unit_point,
+                                  p_values,
+                                  p_grads,
+                                  p_grad_grads,
+                                  p_third_derivatives,
+                                  p_fourth_derivatives);
     for (unsigned int i = 0; i < p_values.size(); ++i)
       values[i] = p_values[i];
     for (unsigned int i = 0; i < p_grads.size(); ++i)
index c7222ae526b56e7fdc671c43766ea24b47046d31..a54c39a9f06cca08ddb5f614a442337445671217 100644 (file)
@@ -255,7 +255,7 @@ FE_PolyTensor<dim, spacedim>::shape_value_component(
 
       std::vector<Tensor<4, dim>> dummy1;
       std::vector<Tensor<5, dim>> dummy2;
-      poly_space->compute(
+      poly_space->evaluate(
         p, cached_values, cached_grads, cached_grad_grads, dummy1, dummy2);
     }
 
@@ -300,7 +300,7 @@ FE_PolyTensor<dim, spacedim>::shape_grad_component(
 
       std::vector<Tensor<4, dim>> dummy1;
       std::vector<Tensor<5, dim>> dummy2;
-      poly_space->compute(
+      poly_space->evaluate(
         p, cached_values, cached_grads, cached_grad_grads, dummy1, dummy2);
     }
 
@@ -346,7 +346,7 @@ FE_PolyTensor<dim, spacedim>::shape_grad_grad_component(
 
       std::vector<Tensor<4, dim>> dummy1;
       std::vector<Tensor<5, dim>> dummy2;
-      poly_space->compute(
+      poly_space->evaluate(
         p, cached_values, cached_grads, cached_grad_grads, dummy1, dummy2);
     }
 

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.