From 3fa47bd4ed0d1a2dbc969ab5663f1b6943b823b1 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 21 Aug 2019 14:04:30 -0600 Subject: [PATCH] Rename the Poly*::compute_n_pols() function to ::n_polynomials(). 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. --- include/deal.II/base/polynomial_space.h | 4 ++-- include/deal.II/base/polynomials_abf.h | 2 +- include/deal.II/base/polynomials_bdm.h | 2 +- include/deal.II/base/polynomials_bernardi_raugel.h | 2 +- include/deal.II/base/polynomials_nedelec.h | 2 +- include/deal.II/base/polynomials_raviart_thomas.h | 2 +- include/deal.II/base/polynomials_rt_bubbles.h | 2 +- source/base/polynomial_space.cc | 4 ++-- source/base/polynomials_abf.cc | 6 +++--- source/base/polynomials_bdm.cc | 4 ++-- source/base/polynomials_bernardi_raugel.cc | 4 ++-- source/base/polynomials_nedelec.cc | 4 ++-- source/base/polynomials_raviart_thomas.cc | 4 ++-- source/base/polynomials_rt_bubbles.cc | 4 ++-- 14 files changed, 23 insertions(+), 23 deletions(-) diff --git a/include/deal.II/base/polynomial_space.h b/include/deal.II/base/polynomial_space.h index 41b35d1e2d..1e43d9a73a 100644 --- a/include/deal.II/base/polynomial_space.h +++ b/include/deal.II/base/polynomial_space.h @@ -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 template PolynomialSpace::PolynomialSpace(const std::vector &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) { diff --git a/include/deal.II/base/polynomials_abf.h b/include/deal.II/base/polynomials_abf.h index 44ef70688b..73f1017b86 100644 --- a/include/deal.II/base/polynomials_abf.h +++ b/include/deal.II/base/polynomials_abf.h @@ -97,7 +97,7 @@ public: * FiniteElement classes. */ static unsigned int - compute_n_pols(unsigned int degree); + n_polynomials(unsigned int degree); /** * @copydoc TensorPolynomialsBase::clone() diff --git a/include/deal.II/base/polynomials_bdm.h b/include/deal.II/base/polynomials_bdm.h index be37ecc584..2e6a8055f3 100644 --- a/include/deal.II/base/polynomials_bdm.h +++ b/include/deal.II/base/polynomials_bdm.h @@ -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::clone() diff --git a/include/deal.II/base/polynomials_bernardi_raugel.h b/include/deal.II/base/polynomials_bernardi_raugel.h index 3c4c605256..0860f4ff64 100644 --- a/include/deal.II/base/polynomials_bernardi_raugel.h +++ b/include/deal.II/base/polynomials_bernardi_raugel.h @@ -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::clone() diff --git a/include/deal.II/base/polynomials_nedelec.h b/include/deal.II/base/polynomials_nedelec.h index ef1e061a26..604a248749 100644 --- a/include/deal.II/base/polynomials_nedelec.h +++ b/include/deal.II/base/polynomials_nedelec.h @@ -94,7 +94,7 @@ public: * the FiniteElement classes. */ static unsigned int - compute_n_pols(unsigned int degree); + n_polynomials(unsigned int degree); /** * @copydoc TensorPolynomialsBase::clone() diff --git a/include/deal.II/base/polynomials_raviart_thomas.h b/include/deal.II/base/polynomials_raviart_thomas.h index c0cd7c7bc4..4ad47da7f2 100644 --- a/include/deal.II/base/polynomials_raviart_thomas.h +++ b/include/deal.II/base/polynomials_raviart_thomas.h @@ -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::clone() diff --git a/include/deal.II/base/polynomials_rt_bubbles.h b/include/deal.II/base/polynomials_rt_bubbles.h index a77f1af360..c729ace450 100644 --- a/include/deal.II/base/polynomials_rt_bubbles.h +++ b/include/deal.II/base/polynomials_rt_bubbles.h @@ -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::clone() diff --git a/source/base/polynomial_space.cc b/source/base/polynomial_space.cc index e08db5c11b..a87fcefa22 100644 --- a/source/base/polynomial_space.cc +++ b/source/base/polynomial_space.cc @@ -22,7 +22,7 @@ DEAL_II_NAMESPACE_OPEN template unsigned int -PolynomialSpace::compute_n_pols(const unsigned int n) +PolynomialSpace::n_polynomials(const unsigned int n) { unsigned int n_pols = n; for (unsigned int i = 1; i < dim; ++i) @@ -36,7 +36,7 @@ PolynomialSpace::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; } diff --git a/source/base/polynomials_abf.cc b/source/base/polynomials_abf.cc index 6bd98f5747..e018505072 100644 --- a/source/base/polynomials_abf.cc +++ b/source/base/polynomials_abf.cc @@ -48,13 +48,13 @@ namespace template PolynomialsABF::PolynomialsABF(const unsigned int k) - : TensorPolynomialsBase(k, compute_n_pols(k)) + : TensorPolynomialsBase(k, n_polynomials(k)) , polynomial_space(get_abf_polynomials(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::compute( template unsigned int -PolynomialsABF::compute_n_pols(const unsigned int k) +PolynomialsABF::n_polynomials(const unsigned int k) { switch (dim) { diff --git a/source/base/polynomials_bdm.cc b/source/base/polynomials_bdm.cc index 4669b0ddbb..a5388f6e58 100644 --- a/source/base/polynomials_bdm.cc +++ b/source/base/polynomials_bdm.cc @@ -28,7 +28,7 @@ DEAL_II_NAMESPACE_OPEN template PolynomialsBDM::PolynomialsBDM(const unsigned int k) - : TensorPolynomialsBase(k, compute_n_pols(k)) + : TensorPolynomialsBase(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 unsigned int -PolynomialsBDM::compute_n_pols(unsigned int k) +PolynomialsBDM::n_polynomials(unsigned int k) { if (dim == 1) return k + 1; diff --git a/source/base/polynomials_bernardi_raugel.cc b/source/base/polynomials_bernardi_raugel.cc index 62e643274e..7beca60ba3 100644 --- a/source/base/polynomials_bernardi_raugel.cc +++ b/source/base/polynomials_bernardi_raugel.cc @@ -22,7 +22,7 @@ DEAL_II_NAMESPACE_OPEN template PolynomialsBernardiRaugel::PolynomialsBernardiRaugel(const unsigned int k) - : TensorPolynomialsBase(k + 1, compute_n_pols(k)) + : TensorPolynomialsBase(k + 1, n_polynomials(k)) , polynomial_space_Q(create_polynomials_Q()) , polynomial_space_bubble(create_polynomials_bubble()) {} @@ -236,7 +236,7 @@ PolynomialsBernardiRaugel::compute( template unsigned int -PolynomialsBernardiRaugel::compute_n_pols(const unsigned int k) +PolynomialsBernardiRaugel::n_polynomials(const unsigned int k) { (void)k; Assert(k == 1, ExcNotImplemented()); diff --git a/source/base/polynomials_nedelec.cc b/source/base/polynomials_nedelec.cc index de531fada5..96ab333ad8 100644 --- a/source/base/polynomials_nedelec.cc +++ b/source/base/polynomials_nedelec.cc @@ -27,7 +27,7 @@ DEAL_II_NAMESPACE_OPEN template PolynomialsNedelec::PolynomialsNedelec(const unsigned int k) - : TensorPolynomialsBase(k, compute_n_pols(k)) + : TensorPolynomialsBase(k, n_polynomials(k)) , polynomial_space(create_polynomials(k)) {} @@ -1486,7 +1486,7 @@ PolynomialsNedelec::compute( template unsigned int -PolynomialsNedelec::compute_n_pols(unsigned int k) +PolynomialsNedelec::n_polynomials(unsigned int k) { switch (dim) { diff --git a/source/base/polynomials_raviart_thomas.cc b/source/base/polynomials_raviart_thomas.cc index d15e210ca8..531aee636e 100644 --- a/source/base/polynomials_raviart_thomas.cc +++ b/source/base/polynomials_raviart_thomas.cc @@ -36,7 +36,7 @@ DEAL_II_NAMESPACE_OPEN template PolynomialsRaviartThomas::PolynomialsRaviartThomas(const unsigned int k) - : TensorPolynomialsBase(k, compute_n_pols(k)) + : TensorPolynomialsBase(k, n_polynomials(k)) , polynomial_space(create_polynomials(k)) {} @@ -170,7 +170,7 @@ PolynomialsRaviartThomas::compute( template unsigned int -PolynomialsRaviartThomas::compute_n_pols(unsigned int k) +PolynomialsRaviartThomas::n_polynomials(unsigned int k) { if (dim == 1) return k + 1; diff --git a/source/base/polynomials_rt_bubbles.cc b/source/base/polynomials_rt_bubbles.cc index c4412c930c..2b619cfbac 100644 --- a/source/base/polynomials_rt_bubbles.cc +++ b/source/base/polynomials_rt_bubbles.cc @@ -28,7 +28,7 @@ DEAL_II_NAMESPACE_OPEN template PolynomialsRT_Bubbles::PolynomialsRT_Bubbles(const unsigned int k) - : TensorPolynomialsBase(k, compute_n_pols(k)) + : TensorPolynomialsBase(k, n_polynomials(k)) , raviart_thomas_space(k - 1) , monomials(k + 2) { @@ -835,7 +835,7 @@ PolynomialsRT_Bubbles::compute( template unsigned int -PolynomialsRT_Bubbles::compute_n_pols(const unsigned int k) +PolynomialsRT_Bubbles::n_polynomials(const unsigned int k) { if (dim == 1 || dim == 2 || dim == 3) return dim * Utilities::fixed_power(k + 1); -- 2.39.5