From: Daniel Arndt Date: Mon, 20 Aug 2018 13:50:10 +0000 (+0200) Subject: Replace Utilities::fixed_int_power by Utilities::pow X-Git-Tag: v9.1.0-rc1~802^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F7086%2Fhead;p=dealii.git Replace Utilities::fixed_int_power by Utilities::pow --- diff --git a/include/deal.II/matrix_free/evaluation_kernels.h b/include/deal.II/matrix_free/evaluation_kernels.h index e6262b4822..7cfa435b6a 100644 --- a/include/deal.II/matrix_free/evaluation_kernels.h +++ b/include/deal.II/matrix_free/evaluation_kernels.h @@ -1550,10 +1550,9 @@ namespace internal Utilities::pow(fe_degree + 1, dim - 1) : (dim > 1 ? Utilities::fixed_power(data.fe_degree + 1) : 1); - const unsigned int n_q_points = - fe_degree > -1 ? - Utilities::fixed_int_power::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) diff --git a/source/multigrid/mg_transfer_matrix_free.cc b/source/multigrid/mg_transfer_matrix_free.cc index ff573648ca..906fdda090 100644 --- a/source/multigrid/mg_transfer_matrix_free.cc +++ b/source/multigrid/mg_transfer_matrix_free.cc @@ -353,7 +353,7 @@ MGTransferMatrixFree::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(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::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(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) diff --git a/tests/cuda/matrix_vector_mf.h b/tests/cuda/matrix_vector_mf.h index e175d3791b..1279251019 100644 --- a/tests/cuda/matrix_vector_mf.h +++ b/tests/cuda/matrix_vector_mf.h @@ -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::value; + dealii::Utilities::pow(fe_degree + 1, dim); static const unsigned int n_q_points = - dealii::Utilities::fixed_int_power::value; + dealii::Utilities::pow(n_q_points_1d, dim); }; diff --git a/tests/mpi/periodicity_04.cc b/tests/mpi/periodicity_04.cc index 10b825e12f..ba8c79099a 100644 --- a/tests/mpi/periodicity_04.cc +++ b/tests/mpi/periodicity_04.cc @@ -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