From: Peter Munch Date: Tue, 28 Jan 2025 11:56:42 +0000 (+0100) Subject: Remve n_dofs_1d from local operation class of matrix-free operation X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b615a00505542d5fc7cf10d13fad003ab6c03be;p=dealii.git Remve n_dofs_1d from local operation class of matrix-free operation --- diff --git a/doc/news/changes/minor/20250128Munch b/doc/news/changes/minor/20250128Munch new file mode 100644 index 0000000000..7eb5ca9e25 --- /dev/null +++ b/doc/news/changes/minor/20250128Munch @@ -0,0 +1,4 @@ +Improved: Local operation classes of the portable matrix-free +infrastructure do not need n_dofs_1d anymore. +
+(Peter Munch, 2024/01/28) diff --git a/examples/step-64/step-64.cc b/examples/step-64/step-64.cc index 8c01989c05..aee6c20258 100644 --- a/examples/step-64/step-64.cc +++ b/examples/step-64/step-64.cc @@ -76,9 +76,8 @@ namespace Step64 // arrays, we need to store the number of quadrature points and the // number of degrees of freedom in this class to do necessary index // conversions. - static const unsigned int n_dofs_1d = fe_degree + 1; - static const unsigned int n_local_dofs = Utilities::pow(n_dofs_1d, dim); - static const unsigned int n_q_points = Utilities::pow(n_dofs_1d, dim); + static const unsigned int n_local_dofs = Utilities::pow(fe_degree + 1, dim); + static const unsigned int n_q_points = Utilities::pow(fe_degree + 1, dim); private: double *coef; @@ -191,7 +190,6 @@ namespace Step64 // Again, the Portable::MatrixFree object doesn't know about the number // of degrees of freedom and the number of quadrature points so we need // to store these for index calculations in the call operator. - static constexpr unsigned int n_dofs_1d = fe_degree + 1; static constexpr unsigned int n_local_dofs = Utilities::pow(fe_degree + 1, dim); static constexpr unsigned int n_q_points = diff --git a/include/deal.II/matrix_free/portable_matrix_free.h b/include/deal.II/matrix_free/portable_matrix_free.h index 8dcfa4e0ee..dc1b9c22cf 100644 --- a/include/deal.II/matrix_free/portable_matrix_free.h +++ b/include/deal.II/matrix_free/portable_matrix_free.h @@ -327,7 +327,6 @@ namespace Portable * Portable::SharedData * shared_data, * const Number * src, * Number * dst) const; - * static const unsigned int n_dofs_1d; * static const unsigned int n_local_dofs; * static const unsigned int n_q_points; * \endcode @@ -349,7 +348,6 @@ namespace Portable * DEAL_II_HOST_DEVICE void operator()( * const unsigned int cell, * const typename Portable::MatrixFree::Data *gpu_data); - * static const unsigned int n_dofs_1d; * static const unsigned int n_local_dofs; * static const unsigned int n_q_points; * \endcode diff --git a/tests/matrix_free_kokkos/coefficient_eval_device.cc b/tests/matrix_free_kokkos/coefficient_eval_device.cc index db5fdaca95..a7fc778f09 100644 --- a/tests/matrix_free_kokkos/coefficient_eval_device.cc +++ b/tests/matrix_free_kokkos/coefficient_eval_device.cc @@ -42,7 +42,6 @@ public: const double *src, double *dst) const; - static const unsigned int n_dofs_1d = fe_degree + 1; static const unsigned int n_local_dofs = dealii::Utilities::pow(fe_degree + 1, dim); static const unsigned int n_q_points = diff --git a/tests/matrix_free_kokkos/matrix_free_device_no_index_initialize.cc b/tests/matrix_free_kokkos/matrix_free_device_no_index_initialize.cc index ae841c73d8..5bd9c5943f 100644 --- a/tests/matrix_free_kokkos/matrix_free_device_no_index_initialize.cc +++ b/tests/matrix_free_kokkos/matrix_free_device_no_index_initialize.cc @@ -32,8 +32,7 @@ template &data_in) @@ -94,10 +93,6 @@ protected: const Portable::MatrixFree &data; }; -template -const unsigned int - MatrixFreeTest::n_dofs_1d; - template const unsigned int MatrixFreeTest::n_local_dofs; diff --git a/tests/matrix_free_kokkos/matrix_vector_device_mf.h b/tests/matrix_free_kokkos/matrix_vector_device_mf.h index 49fb2aaaff..4e5c8524ea 100644 --- a/tests/matrix_free_kokkos/matrix_vector_device_mf.h +++ b/tests/matrix_free_kokkos/matrix_vector_device_mf.h @@ -71,7 +71,6 @@ template class HelmholtzOperator { public: - static const unsigned int n_dofs_1d = fe_degree + 1; static const unsigned int n_local_dofs = dealii::Utilities::pow(fe_degree + 1, dim); static const unsigned int n_q_points = diff --git a/tests/matrix_free_kokkos/matrix_vector_host_device_multi_component.cc b/tests/matrix_free_kokkos/matrix_vector_host_device_multi_component.cc index c5b8926966..3dc2b7226d 100644 --- a/tests/matrix_free_kokkos/matrix_vector_host_device_multi_component.cc +++ b/tests/matrix_free_kokkos/matrix_vector_host_device_multi_component.cc @@ -198,7 +198,6 @@ public: phi.distribute_local_to_global(dst); } - static const unsigned int n_dofs_1d = fe_degree + 1; static const unsigned int n_local_dofs = Utilities::pow(fe_degree + 1, dim) * n_components; static const unsigned int n_q_points = Utilities::pow(fe_degree + 1, dim);