]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Rename the Poly*::compute_n_pols() function to ::n_polynomials().
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 21 Aug 2019 20:04:30 +0000 (14:04 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 22 Aug 2019 17:48:31 +0000 (11:48 -0600)
This more accurately reflects the purpose of the function, which may or may not
actually compute anything -- oftentimes it just returns something already
computed. The new name also more closely follows our usual naming convention.

14 files changed:
include/deal.II/base/polynomial_space.h
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
source/base/polynomial_space.cc
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

index 41b35d1e2dfb58475d208cdb520efa7d073e811f..1e43d9a73a65744826c30e51fc69c05ba019bf37 100644 (file)
@@ -214,7 +214,7 @@ public:
    * onedimensional polynomials, thus the degree plus one.
    */
   static unsigned int
-  compute_n_pols(const unsigned int n);
+  n_polynomials(const unsigned int n);
 
 protected:
   /**
@@ -271,7 +271,7 @@ template <int dim>
 template <class Pol>
 PolynomialSpace<dim>::PolynomialSpace(const std::vector<Pol> &pols)
   : polynomials(pols.begin(), pols.end())
-  , n_pols(compute_n_pols(polynomials.size()))
+  , n_pols(n_polynomials(polynomials.size()))
   , index_map(n_pols)
   , index_map_inverse(n_pols)
 {
index 44ef70688b208841c1b5c82f6a5b12ee6ab75953..73f1017b86b7a31808c852b803d612bec7d23a6b 100644 (file)
@@ -97,7 +97,7 @@ public:
    * FiniteElement classes.
    */
   static unsigned int
-  compute_n_pols(unsigned int degree);
+  n_polynomials(unsigned int degree);
 
   /**
    * @copydoc TensorPolynomialsBase<dim>::clone()
index be37ecc584e44e9115c9a46f97c038054abeb7a6..2e6a8055f3f030ffd3f1fa254254682c455fb79b 100644 (file)
@@ -150,7 +150,7 @@ public:
    * by the FiniteElement classes.
    */
   static unsigned int
-  compute_n_pols(unsigned int degree);
+  n_polynomials(unsigned int degree);
 
   /**
    * @copydoc TensorPolynomialsBase<dim>::clone()
index 3c4c605256a32a720a2100210f8ca5e7b7609738..0860f4ff64a44bc6367eb3d5ea56336ea117a625 100644 (file)
@@ -126,7 +126,7 @@ public:
    * required by the FiniteElement classes.
    */
   static unsigned int
-  compute_n_pols(const unsigned int k);
+  n_polynomials(const unsigned int k);
 
   /**
    * @copydoc TensorPolynomialsBase<dim>::clone()
index ef1e061a261348422e76d9d24c1a38582a765b7d..604a248749b2f0529a05ef38bb9737007acc791c 100644 (file)
@@ -94,7 +94,7 @@ public:
    * the FiniteElement classes.
    */
   static unsigned int
-  compute_n_pols(unsigned int degree);
+  n_polynomials(unsigned int degree);
 
   /**
    * @copydoc TensorPolynomialsBase<dim>::clone()
index c0cd7c7bc43fc73745d051d2b5a3769d00bf0e7a..4ad47da7f28112bb9ab4dc2263da28a0fe480377 100644 (file)
@@ -92,7 +92,7 @@ public:
    * required by the FiniteElement classes.
    */
   static unsigned int
-  compute_n_pols(unsigned int degree);
+  n_polynomials(unsigned int degree);
 
   /**
    * @copydoc TensorPolynomialsBase<dim>::clone()
index a77f1af3607b4c768df9d3818a75f7e04830e40e..c729ace450dc7ff830e2a2c69f473c1a40d491cd 100644 (file)
@@ -126,7 +126,7 @@ public:
    * required by the FiniteElement classes.
    */
   static unsigned int
-  compute_n_pols(const unsigned int degree);
+  n_polynomials(const unsigned int degree);
 
   /**
    * @copydoc TensorPolynomialsBase<dim>::clone()
index e08db5c11bfbc8e397a69a18b80d714eb2888329..a87fcefa226de00c6dd37e30457d2b6a1bd940c5 100644 (file)
@@ -22,7 +22,7 @@ DEAL_II_NAMESPACE_OPEN
 
 template <int dim>
 unsigned int
-PolynomialSpace<dim>::compute_n_pols(const unsigned int n)
+PolynomialSpace<dim>::n_polynomials(const unsigned int n)
 {
   unsigned int n_pols = n;
   for (unsigned int i = 1; i < dim; ++i)
@@ -36,7 +36,7 @@ PolynomialSpace<dim>::compute_n_pols(const unsigned int n)
 
 template <>
 unsigned int
-PolynomialSpace<0>::compute_n_pols(const unsigned int)
+PolynomialSpace<0>::n_polynomials(const unsigned int)
 {
   return 0;
 }
index 6bd98f574717c41f801f9fdfe4374867433ec98e..e018505072b22ed16502621ad2ee2054aa70913d 100644 (file)
@@ -48,13 +48,13 @@ namespace
 
 template <int dim>
 PolynomialsABF<dim>::PolynomialsABF(const unsigned int k)
-  : TensorPolynomialsBase<dim>(k, compute_n_pols(k))
+  : TensorPolynomialsBase<dim>(k, n_polynomials(k))
   , polynomial_space(get_abf_polynomials<dim>(k))
 {
   // check that the dimensions match. we only store one of the 'dim'
   // anisotropic polynomials that make up the vector-valued space, so
   // multiply by 'dim'
-  Assert(dim * polynomial_space.n() == compute_n_pols(k), ExcInternalError());
+  Assert(dim * polynomial_space.n() == n_polynomials(k), ExcInternalError());
 }
 
 
@@ -155,7 +155,7 @@ PolynomialsABF<dim>::compute(
 
 template <int dim>
 unsigned int
-PolynomialsABF<dim>::compute_n_pols(const unsigned int k)
+PolynomialsABF<dim>::n_polynomials(const unsigned int k)
 {
   switch (dim)
     {
index 4669b0ddbb10ab760f93c73627bc3c0c432d5f9c..a5388f6e58c5ec6bd8f76151b577738638cb5931 100644 (file)
@@ -28,7 +28,7 @@ DEAL_II_NAMESPACE_OPEN
 
 template <int dim>
 PolynomialsBDM<dim>::PolynomialsBDM(const unsigned int k)
-  : TensorPolynomialsBase<dim>(k, compute_n_pols(k))
+  : TensorPolynomialsBase<dim>(k, n_polynomials(k))
   , polynomial_space(Polynomials::Legendre::generate_complete_basis(k))
   , monomials((dim == 2) ? (1) : (k + 2))
   , p_values(polynomial_space.n())
@@ -429,7 +429,7 @@ square for (unsigned int j=0;j<moment_weight.size();++j)
 
 template <int dim>
 unsigned int
-PolynomialsBDM<dim>::compute_n_pols(unsigned int k)
+PolynomialsBDM<dim>::n_polynomials(unsigned int k)
 {
   if (dim == 1)
     return k + 1;
index 62e643274eb787ea3f5ce7bc36f9ac45e359b565..7beca60ba331f386b580ebb5e4bf299a0e396775 100644 (file)
@@ -22,7 +22,7 @@ DEAL_II_NAMESPACE_OPEN
 
 template <int dim>
 PolynomialsBernardiRaugel<dim>::PolynomialsBernardiRaugel(const unsigned int k)
-  : TensorPolynomialsBase<dim>(k + 1, compute_n_pols(k))
+  : TensorPolynomialsBase<dim>(k + 1, n_polynomials(k))
   , polynomial_space_Q(create_polynomials_Q())
   , polynomial_space_bubble(create_polynomials_bubble())
 {}
@@ -236,7 +236,7 @@ PolynomialsBernardiRaugel<dim>::compute(
 
 template <int dim>
 unsigned int
-PolynomialsBernardiRaugel<dim>::compute_n_pols(const unsigned int k)
+PolynomialsBernardiRaugel<dim>::n_polynomials(const unsigned int k)
 {
   (void)k;
   Assert(k == 1, ExcNotImplemented());
index de531fada5e69b6a2784e1e6a275d6cb7f51bc40..96ab333ad82e51efa42a723b9b1c9d1dc0ab7683 100644 (file)
@@ -27,7 +27,7 @@ DEAL_II_NAMESPACE_OPEN
 
 template <int dim>
 PolynomialsNedelec<dim>::PolynomialsNedelec(const unsigned int k)
-  : TensorPolynomialsBase<dim>(k, compute_n_pols(k))
+  : TensorPolynomialsBase<dim>(k, n_polynomials(k))
   , polynomial_space(create_polynomials(k))
 {}
 
@@ -1486,7 +1486,7 @@ PolynomialsNedelec<dim>::compute(
 
 template <int dim>
 unsigned int
-PolynomialsNedelec<dim>::compute_n_pols(unsigned int k)
+PolynomialsNedelec<dim>::n_polynomials(unsigned int k)
 {
   switch (dim)
     {
index d15e210ca8a855194d1b7e0f1a979d20b8e5ed19..531aee636e2742235e694e6c6019419d1506dc91 100644 (file)
@@ -36,7 +36,7 @@ DEAL_II_NAMESPACE_OPEN
 
 template <int dim>
 PolynomialsRaviartThomas<dim>::PolynomialsRaviartThomas(const unsigned int k)
-  : TensorPolynomialsBase<dim>(k, compute_n_pols(k))
+  : TensorPolynomialsBase<dim>(k, n_polynomials(k))
   , polynomial_space(create_polynomials(k))
 {}
 
@@ -170,7 +170,7 @@ PolynomialsRaviartThomas<dim>::compute(
 
 template <int dim>
 unsigned int
-PolynomialsRaviartThomas<dim>::compute_n_pols(unsigned int k)
+PolynomialsRaviartThomas<dim>::n_polynomials(unsigned int k)
 {
   if (dim == 1)
     return k + 1;
index c4412c930c2c14fcee5bc90ed9242f1b4c95b199..2b619cfbac73c16a46dafa025fbcf88b5df8a926 100644 (file)
@@ -28,7 +28,7 @@ DEAL_II_NAMESPACE_OPEN
 
 template <int dim>
 PolynomialsRT_Bubbles<dim>::PolynomialsRT_Bubbles(const unsigned int k)
-  : TensorPolynomialsBase<dim>(k, compute_n_pols(k))
+  : TensorPolynomialsBase<dim>(k, n_polynomials(k))
   , raviart_thomas_space(k - 1)
   , monomials(k + 2)
 {
@@ -835,7 +835,7 @@ PolynomialsRT_Bubbles<dim>::compute(
 
 template <int dim>
 unsigned int
-PolynomialsRT_Bubbles<dim>::compute_n_pols(const unsigned int k)
+PolynomialsRT_Bubbles<dim>::n_polynomials(const unsigned int k)
 {
   if (dim == 1 || dim == 2 || dim == 3)
     return dim * Utilities::fixed_power<dim>(k + 1);

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.