From dd49942329226443a92eda0a8ad131aa717af779 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Wed, 13 Nov 2024 15:07:06 +0100 Subject: [PATCH] Portable MatrixFree: Some cleanup for fe_degree+1 != n_q_points_1d --- .../matrix_free/portable_matrix_free.templates.h | 4 ++-- include/deal.II/matrix_free/tools.h | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/include/deal.II/matrix_free/portable_matrix_free.templates.h b/include/deal.II/matrix_free/portable_matrix_free.templates.h index ed94802a6e..422010cfe6 100644 --- a/include/deal.II/matrix_free/portable_matrix_free.templates.h +++ b/include/deal.II/matrix_free/portable_matrix_free.templates.h @@ -182,7 +182,7 @@ namespace Portable Kokkos::view_alloc("JxW_" + std::to_string(color), Kokkos::WithoutInitializing), n_cells, - scalar_dofs_per_cell); + q_points_per_cell); if (update_flags & update_gradients) data->inv_jacobian[color] = @@ -190,7 +190,7 @@ namespace Portable Kokkos::view_alloc("inv_jacobian_" + std::to_string(color), Kokkos::WithoutInitializing), n_cells, - scalar_dofs_per_cell); + q_points_per_cell); // Initialize to zero, i.e., unconstrained cell data->constraint_mask[color] = diff --git a/include/deal.II/matrix_free/tools.h b/include/deal.II/matrix_free/tools.h index a8903d8d5e..c68490128d 100644 --- a/include/deal.II/matrix_free/tools.h +++ b/include/deal.II/matrix_free/tools.h @@ -1374,7 +1374,11 @@ namespace MatrixFreeTools } // namespace internal - template + template class CellAction { public: @@ -1393,7 +1397,7 @@ namespace MatrixFreeTools const Number *, Number *dst) const { - Portable::FEEvaluation fe_eval( + Portable::FEEvaluation fe_eval( gpu_data, shared_data); m_quad_operation.set_matrix_free_data(*gpu_data); m_quad_operation.set_cell(cell); @@ -1490,8 +1494,8 @@ namespace MatrixFreeTools matrix_free.initialize_dof_vector(diagonal_global); - CellAction cell_action( - quad_operation, evaluation_flags, integration_flags); + CellAction + cell_action(quad_operation, evaluation_flags, integration_flags); LinearAlgebra::distributed::Vector dummy; matrix_free.cell_loop(cell_action, dummy, diagonal_global); -- 2.39.5