]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Replace Utilities::fixed_int_power by Utilities::pow 7086/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Mon, 20 Aug 2018 13:50:10 +0000 (15:50 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Mon, 20 Aug 2018 16:06:20 +0000 (18:06 +0200)
include/deal.II/matrix_free/evaluation_kernels.h
source/multigrid/mg_transfer_matrix_free.cc
tests/cuda/matrix_vector_mf.h
tests/mpi/periodicity_04.cc

index e6262b482276d6cf98fce64144e2606dfefd15b0..7cfa435b6ad3dd7aaa58d0aeacfe1cc58248101d 100644 (file)
@@ -1550,10 +1550,9 @@ namespace internal
           Utilities::pow(fe_degree + 1, dim - 1) :
           (dim > 1 ? Utilities::fixed_power<dim - 1>(data.fe_degree + 1) : 1);
 
-      const unsigned int n_q_points =
-        fe_degree > -1 ?
-          Utilities::fixed_int_power<n_q_points_1d, dim - 1>::value :
-          data.n_q_points_face;
+      const unsigned int n_q_points = fe_degree > -1 ?
+                                        Utilities::pow(n_q_points_1d, dim - 1) :
+                                        data.n_q_points_face;
 
       if (integrate_grad == false)
         for (unsigned int c = 0; c < n_components; ++c)
index ff573648ca2963f3ace8b8a8b96158445d079337..906fdda090f0ffdeae90fe6361a6f7f326ac3eea 100644 (file)
@@ -353,7 +353,7 @@ MGTransferMatrixFree<dim, Number>::do_prolongate_add(
   const unsigned int n_child_dofs_1d = 2 * degree_size - element_is_continuous;
   const unsigned int n_scalar_cell_dofs =
     Utilities::fixed_power<dim>(n_child_dofs_1d);
-  const unsigned int three_to_dim = Utilities::fixed_int_power<3, dim>::value;
+  constexpr unsigned int three_to_dim = Utilities::pow(3, dim);
 
   for (unsigned int cell = 0; cell < n_owned_level_cells[to_level - 1];
        cell += vec_size)
@@ -468,7 +468,7 @@ MGTransferMatrixFree<dim, Number>::do_restrict_add(
   const unsigned int n_child_dofs_1d = 2 * degree_size - element_is_continuous;
   const unsigned int n_scalar_cell_dofs =
     Utilities::fixed_power<dim>(n_child_dofs_1d);
-  const unsigned int three_to_dim = Utilities::fixed_int_power<3, dim>::value;
+  constexpr unsigned int three_to_dim = Utilities::pow(3, dim);
 
   for (unsigned int cell = 0; cell < n_owned_level_cells[from_level - 1];
        cell += vec_size)
index e175d3791b00afb98737d81a536e417452426a12..12792510190b08ea513bc416388338b1bbe8ae20 100644 (file)
@@ -63,9 +63,9 @@ public:
 
   static const unsigned int n_dofs_1d = fe_degree + 1;
   static const unsigned int n_local_dofs =
-    dealii::Utilities::fixed_int_power<fe_degree + 1, dim>::value;
+    dealii::Utilities::pow(fe_degree + 1, dim);
   static const unsigned int n_q_points =
-    dealii::Utilities::fixed_int_power<n_q_points_1d, dim>::value;
+    dealii::Utilities::pow(n_q_points_1d, dim);
 };
 
 
index 10b825e12fef0dae5c7b977c01d7f2210cbdb841..ba8c79099a029c947892a32b9b4c8d4565280d71 100644 (file)
@@ -232,8 +232,7 @@ check(const unsigned int orientation, bool reverse)
     }
   const unsigned int n_constraints =
     Utilities::MPI::sum(n_local_constraints, MPI_COMM_WORLD);
-  const unsigned int n_expected_constraints =
-    Utilities::fixed_int_power<9, dim - 1>::value;
+  constexpr unsigned int n_expected_constraints = Utilities::pow(9, dim - 1);
   if (myid == 0)
     deallog << "n_constraints: " << n_constraints
             << " n_expected_constraints: " << n_expected_constraints

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.