]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Mark a bunch of input argument as 'const'.
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 21 Aug 2019 20:05:43 +0000 (14:05 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 22 Aug 2019 17:48:31 +0000 (11:48 -0600)
15 files changed:
include/deal.II/base/polynomials_abf.h
include/deal.II/base/polynomials_bdm.h
include/deal.II/base/polynomials_nedelec.h
include/deal.II/base/polynomials_raviart_thomas.h
include/deal.II/fe/fe_dg_vector.templates.h
source/base/polynomials_bdm.cc
source/base/polynomials_nedelec.cc
source/base/polynomials_raviart_thomas.cc
source/fe/fe_abf.cc
source/fe/fe_bdm.cc
source/fe/fe_bernardi_raugel.cc
source/fe/fe_nedelec.cc
source/fe/fe_raviart_thomas.cc
source/fe/fe_raviart_thomas_nodal.cc
source/fe/fe_rt_bubbles.cc

index 73f1017b86b7a31808c852b803d612bec7d23a6b..041a10b21f40ee6cd9a1ce5f768eebc62bad0468 100644 (file)
@@ -97,7 +97,7 @@ public:
    * FiniteElement classes.
    */
   static unsigned int
-  n_polynomials(unsigned int degree);
+  n_polynomials(const unsigned int degree);
 
   /**
    * @copydoc TensorPolynomialsBase<dim>::clone()
index 2e6a8055f3f030ffd3f1fa254254682c455fb79b..b16e2c3f79320eca05e972075c28d2787c724e4c 100644 (file)
@@ -150,7 +150,7 @@ public:
    * by the FiniteElement classes.
    */
   static unsigned int
-  n_polynomials(unsigned int degree);
+  n_polynomials(const unsigned int degree);
 
   /**
    * @copydoc TensorPolynomialsBase<dim>::clone()
index 604a248749b2f0529a05ef38bb9737007acc791c..07df872a71d07b9271618865836b379f488f0c7c 100644 (file)
@@ -94,7 +94,7 @@ public:
    * the FiniteElement classes.
    */
   static unsigned int
-  n_polynomials(unsigned int degree);
+  n_polynomials(const unsigned int degree);
 
   /**
    * @copydoc TensorPolynomialsBase<dim>::clone()
index 4ad47da7f28112bb9ab4dc2263da28a0fe480377..8c5cd8eae1d77f664145f11120081b534c261775 100644 (file)
@@ -92,7 +92,7 @@ public:
    * required by the FiniteElement classes.
    */
   static unsigned int
-  n_polynomials(unsigned int degree);
+  n_polynomials(const unsigned int degree);
 
   /**
    * @copydoc TensorPolynomialsBase<dim>::clone()
index edba144969ac6bab0a7d6040ddaf4100baf3f0b3..b200a94fe4b6d6aa81ad11876895e00749f6088a 100644 (file)
@@ -39,8 +39,8 @@ FE_DGVector<PolynomialType, dim, spacedim>::FE_DGVector(const unsigned int deg,
                              dim,
                              deg + 1,
                              FiniteElementData<dim>::L2),
-      std::vector<bool>(PolynomialType::compute_n_pols(deg), true),
-      std::vector<ComponentMask>(PolynomialType::compute_n_pols(deg),
+      std::vector<bool>(PolynomialType::n_polynomials(deg), true),
+      std::vector<ComponentMask>(PolynomialType::n_polynomials(deg),
                                  ComponentMask(dim, true)))
 {
   this->mapping_kind                   = {map};
@@ -81,7 +81,7 @@ FE_DGVector<PolynomialType, dim, spacedim>::get_dpo_vector(
   const unsigned int deg)
 {
   std::vector<unsigned int> dpo(dim + 1);
-  dpo[dim] = PolynomialType::compute_n_pols(deg);
+  dpo[dim] = PolynomialType::n_polynomials(deg);
 
   return dpo;
 }
index a5388f6e58c5ec6bd8f76151b577738638cb5931..702f54a3063ff6e3c951c88ed8db2c65dcd128f3 100644 (file)
@@ -429,7 +429,7 @@ square for (unsigned int j=0;j<moment_weight.size();++j)
 
 template <int dim>
 unsigned int
-PolynomialsBDM<dim>::n_polynomials(unsigned int k)
+PolynomialsBDM<dim>::n_polynomials(const unsigned int k)
 {
   if (dim == 1)
     return k + 1;
index 96ab333ad82e51efa42a723b9b1c9d1dc0ab7683..26a97e752b8140aea0e60131f407479fee5cb336 100644 (file)
@@ -1486,7 +1486,7 @@ PolynomialsNedelec<dim>::compute(
 
 template <int dim>
 unsigned int
-PolynomialsNedelec<dim>::n_polynomials(unsigned int k)
+PolynomialsNedelec<dim>::n_polynomials(const unsigned int k)
 {
   switch (dim)
     {
index 531aee636e2742235e694e6c6019419d1506dc91..9889e0b8c5014049b96637e9c135448b7c473fbe 100644 (file)
@@ -170,7 +170,7 @@ PolynomialsRaviartThomas<dim>::compute(
 
 template <int dim>
 unsigned int
-PolynomialsRaviartThomas<dim>::n_polynomials(unsigned int k)
+PolynomialsRaviartThomas<dim>::n_polynomials(const unsigned int k)
 {
   if (dim == 1)
     return k + 1;
index 6a62cd7788557452df8a29e28dd8e4a90dcef0cf..6c1b97c67ed1bd03f22bb782f449c5e275480405 100644 (file)
@@ -52,8 +52,8 @@ FE_ABF<dim>::FE_ABF(const unsigned int deg)
                              dim,
                              deg + 2,
                              FiniteElementData<dim>::Hdiv),
-      std::vector<bool>(PolynomialsABF<dim>::compute_n_pols(deg), true),
-      std::vector<ComponentMask>(PolynomialsABF<dim>::compute_n_pols(deg),
+      std::vector<bool>(PolynomialsABF<dim>::n_polynomials(deg), true),
+      std::vector<ComponentMask>(PolynomialsABF<dim>::n_polynomials(deg),
                                  std::vector<bool>(dim, true)))
   , rt_order(deg)
 {
index c80345675b51809612f825b2a0f8dff506e42af4..0a09f141f848d595f7303798e599e2e9f1c2803b 100644 (file)
@@ -45,7 +45,7 @@ FE_BDM<dim>::FE_BDM(const unsigned int deg)
                              deg + 1,
                              FiniteElementData<dim>::Hdiv),
       get_ria_vector(deg),
-      std::vector<ComponentMask>(PolynomialsBDM<dim>::compute_n_pols(deg),
+      std::vector<ComponentMask>(PolynomialsBDM<dim>::n_polynomials(deg),
                                  std::vector<bool>(dim, true)))
 {
   Assert(dim >= 2, ExcImpossibleInDim(dim));
@@ -222,12 +222,12 @@ FE_BDM<dim>::get_dpo_vector(const unsigned int deg)
   // the element is face-based and we have as many degrees of freedom
   // on the faces as there are polynomials of degree up to
   // deg. Observe the odd convention of
-  // PolynomialSpace::compute_n_pols()!
+  // PolynomialSpace::n_polynomials()!
 
   std::vector<unsigned int> dpo(dim + 1, 0u);
   dpo[dim] =
-    (deg > 1 ? dim * PolynomialSpace<dim>::compute_n_pols(deg - 1) : 0u);
-  dpo[dim - 1] = PolynomialSpace<dim - 1>::compute_n_pols(deg + 1);
+    (deg > 1 ? dim * PolynomialSpace<dim>::n_polynomials(deg - 1) : 0u);
+  dpo[dim - 1] = PolynomialSpace<dim - 1>::n_polynomials(deg + 1);
 
   return dpo;
 }
@@ -244,9 +244,9 @@ FE_BDM<dim>::get_ria_vector(const unsigned int deg)
       return std::vector<bool>();
     }
 
-  const unsigned int dofs_per_cell = PolynomialsBDM<dim>::compute_n_pols(deg);
+  const unsigned int dofs_per_cell = PolynomialsBDM<dim>::n_polynomials(deg);
   const unsigned int dofs_per_face =
-    PolynomialSpace<dim - 1>::compute_n_pols(deg + 1);
+    PolynomialSpace<dim - 1>::n_polynomials(deg + 1);
 
   Assert(GeometryInfo<dim>::faces_per_cell * dofs_per_face <= dofs_per_cell,
          ExcInternalError());
index f4fbd7874bd4b1ae7452320588d015b073639e65..4408442b88041774f98d46820b78b0a9e4ee87e2 100644 (file)
@@ -44,9 +44,8 @@ FE_BernardiRaugel<dim>::FE_BernardiRaugel(const unsigned int p)
                              dim,
                              2,
                              FiniteElementData<dim>::Hdiv),
-      std::vector<bool>(PolynomialsBernardiRaugel<dim>::compute_n_pols(p),
-                        true),
-      std::vector<ComponentMask>(PolynomialsBernardiRaugel<dim>::compute_n_pols(
+      std::vector<bool>(PolynomialsBernardiRaugel<dim>::n_polynomials(p), true),
+      std::vector<ComponentMask>(PolynomialsBernardiRaugel<dim>::n_polynomials(
                                    p),
                                  std::vector<bool>(dim, true)))
 {
index c92aeed119ffda0da11dc8271ab993bdb68481c0..d62b61436c4feed3672a1a7317d5bb560b4c41de 100644 (file)
@@ -75,8 +75,8 @@ FE_Nedelec<dim>::FE_Nedelec(const unsigned int order)
                              dim,
                              order + 1,
                              FiniteElementData<dim>::Hcurl),
-      std::vector<bool>(PolynomialsNedelec<dim>::compute_n_pols(order), true),
-      std::vector<ComponentMask>(PolynomialsNedelec<dim>::compute_n_pols(order),
+      std::vector<bool>(PolynomialsNedelec<dim>::n_polynomials(order), true),
+      std::vector<ComponentMask>(PolynomialsNedelec<dim>::n_polynomials(order),
                                  std::vector<bool>(dim, true)))
 {
 #ifdef DEBUG_NEDELEC
@@ -2003,7 +2003,7 @@ FE_Nedelec<dim>::get_dpo_vector(const unsigned int degree, bool dg)
 
   if (dg)
     {
-      dpo[dim] = PolynomialsNedelec<dim>::compute_n_pols(degree);
+      dpo[dim] = PolynomialsNedelec<dim>::n_polynomials(degree);
     }
   else
     {
index 7007d543b59a5b80a160641d745e251e509d9125..cb2a9ec571a0b02d445e7b80eda09a6874b9b5f4 100644 (file)
@@ -51,9 +51,9 @@ FE_RaviartThomas<dim>::FE_RaviartThomas(const unsigned int deg)
                              dim,
                              deg + 1,
                              FiniteElementData<dim>::Hdiv),
-      std::vector<bool>(PolynomialsRaviartThomas<dim>::compute_n_pols(deg),
+      std::vector<bool>(PolynomialsRaviartThomas<dim>::n_polynomials(deg),
                         true),
-      std::vector<ComponentMask>(PolynomialsRaviartThomas<dim>::compute_n_pols(
+      std::vector<ComponentMask>(PolynomialsRaviartThomas<dim>::n_polynomials(
                                    deg),
                                  std::vector<bool>(dim, true)))
 {
index 802979994b8f16c60476c349f91db58d229fd605..ca1b97bcf533144775f296788f123f7f1e4b0b66 100644 (file)
@@ -45,7 +45,7 @@ FE_RaviartThomasNodal<dim>::FE_RaviartThomasNodal(const unsigned int deg)
                                               FiniteElementData<dim>::Hdiv),
                        get_ria_vector(deg),
                        std::vector<ComponentMask>(
-                         PolynomialsRaviartThomas<dim>::compute_n_pols(deg),
+                         PolynomialsRaviartThomas<dim>::n_polynomials(deg),
                          std::vector<bool>(dim, true)))
 {
   Assert(dim >= 2, ExcImpossibleInDim(dim));
@@ -253,7 +253,7 @@ std::vector<bool>
 FE_RaviartThomasNodal<dim>::get_ria_vector(const unsigned int deg)
 {
   const unsigned int dofs_per_cell =
-    PolynomialsRaviartThomas<dim>::compute_n_pols(deg);
+    PolynomialsRaviartThomas<dim>::n_polynomials(deg);
   unsigned int dofs_per_face = deg + 1;
   for (unsigned int d = 2; d < dim; ++d)
     dofs_per_face *= deg + 1;
index 7319cf29e454cd8d6f19da9ba3a3d02290802cbf..2aed8efd001c7f68028a4a2ac129b709621ec87b 100644 (file)
@@ -37,15 +37,15 @@ DEAL_II_NAMESPACE_OPEN
 
 template <int dim>
 FE_RT_Bubbles<dim>::FE_RT_Bubbles(const unsigned int deg)
-  : FE_PolyTensor<dim>(PolynomialsRT_Bubbles<dim>(deg),
-                       FiniteElementData<dim>(get_dpo_vector(deg),
-                                              dim,
-                                              deg + 1,
-                                              FiniteElementData<dim>::Hdiv),
-                       get_ria_vector(deg),
-                       std::vector<ComponentMask>(
-                         PolynomialsRT_Bubbles<dim>::compute_n_pols(deg),
-                         std::vector<bool>(dim, true)))
+  : FE_PolyTensor<dim>(
+      PolynomialsRT_Bubbles<dim>(deg),
+      FiniteElementData<dim>(get_dpo_vector(deg),
+                             dim,
+                             deg + 1,
+                             FiniteElementData<dim>::Hdiv),
+      get_ria_vector(deg),
+      std::vector<ComponentMask>(PolynomialsRT_Bubbles<dim>::n_polynomials(deg),
+                                 std::vector<bool>(dim, true)))
 {
   Assert(dim >= 2, ExcImpossibleInDim(dim));
   Assert(
@@ -239,7 +239,7 @@ std::vector<bool>
 FE_RT_Bubbles<dim>::get_ria_vector(const unsigned int deg)
 {
   const unsigned int dofs_per_cell =
-    PolynomialsRT_Bubbles<dim>::compute_n_pols(deg);
+    PolynomialsRT_Bubbles<dim>::n_polynomials(deg);
   unsigned int dofs_per_face = deg + 1;
   for (unsigned int d = 2; d < dim; ++d)
     dofs_per_face *= deg + 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.