From: Martin Kronbichler Date: Wed, 6 Mar 2024 09:19:03 +0000 (+0100) Subject: Matrix-free MG transfer: Switch interpolation matrices to double type X-Git-Tag: v9.6.0-rc1~505^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F16721%2Fhead;p=dealii.git Matrix-free MG transfer: Switch interpolation matrices to double type --- diff --git a/include/deal.II/multigrid/mg_transfer_global_coarsening.h b/include/deal.II/multigrid/mg_transfer_global_coarsening.h index 8820af597b..6c369fb284 100644 --- a/include/deal.II/multigrid/mg_transfer_global_coarsening.h +++ b/include/deal.II/multigrid/mg_transfer_global_coarsening.h @@ -651,29 +651,28 @@ private: /** * Prolongation matrix for non-tensor-product elements. */ - AlignedVector prolongation_matrix; + AlignedVector prolongation_matrix; /** * 1d prolongation matrix for tensor-product elements. */ - AlignedVector prolongation_matrix_1d; + AlignedVector prolongation_matrix_1d; /** * Restriction matrix for non-tensor-product elements. */ - AlignedVector restriction_matrix; + AlignedVector restriction_matrix; /** * 1d restriction matrix for tensor-product elements. */ - AlignedVector restriction_matrix_1d; + AlignedVector restriction_matrix_1d; /** * ShapeInfo description of the coarse cell. Needed during the * fast application of hanging-node constraints. */ - internal::MatrixFreeFunctions::ShapeInfo - shape_info_coarse; + internal::MatrixFreeFunctions::ShapeInfo shape_info_coarse; }; /** diff --git a/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h b/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h index f035321886..ec20cb9d82 100644 --- a/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h +++ b/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h @@ -115,14 +115,14 @@ namespace /** * Helper class containing the cell-wise prolongation operation. */ - template + template class CellProlongator { public: CellProlongator(const AlignedVector &prolongation_matrix, const AlignedVector &prolongation_matrix_1d, - const Number *evaluation_data_coarse, - Number *evaluation_data_fine) + const Number2 *evaluation_data_coarse, + Number2 *evaluation_data_fine) : prolongation_matrix(prolongation_matrix) , prolongation_matrix_1d(prolongation_matrix_1d) , evaluation_data_coarse(evaluation_data_coarse) @@ -170,21 +170,21 @@ namespace private: const AlignedVector &prolongation_matrix; const AlignedVector &prolongation_matrix_1d; - const Number *evaluation_data_coarse; - Number *evaluation_data_fine; + const Number2 *evaluation_data_coarse; + Number2 *evaluation_data_fine; }; /** * Helper class containing the cell-wise restriction operation. */ - template + template class CellRestrictor { public: CellRestrictor(const AlignedVector &prolongation_matrix, const AlignedVector &prolongation_matrix_1d, - Number *evaluation_data_fine, - Number *evaluation_data_coarse) + Number2 *evaluation_data_fine, + Number2 *evaluation_data_coarse) : prolongation_matrix(prolongation_matrix) , prolongation_matrix_1d(prolongation_matrix_1d) , evaluation_data_fine(evaluation_data_fine) @@ -235,8 +235,8 @@ namespace private: const AlignedVector &prolongation_matrix; const AlignedVector &prolongation_matrix_1d; - Number *evaluation_data_fine; - Number *evaluation_data_coarse; + Number2 *evaluation_data_fine; + Number2 *evaluation_data_coarse; }; class CellProlongatorTest @@ -2975,11 +2975,13 @@ MGTwoLevelTransfer>:: if (needs_interpolation) for (int c = n_components - 1; c >= 0; --c) { - CellProlongator cell_prolongator( - scheme.prolongation_matrix, - scheme.prolongation_matrix_1d, - evaluation_data_coarse.begin() + c * n_scalar_dofs_coarse, - evaluation_data_fine.begin() + c * n_scalar_dofs_fine); + CellProlongator + cell_prolongator(scheme.prolongation_matrix, + scheme.prolongation_matrix_1d, + evaluation_data_coarse.begin() + + c * n_scalar_dofs_coarse, + evaluation_data_fine.begin() + + c * n_scalar_dofs_fine); if (scheme.prolongation_matrix_1d.size() > 0) cell_transfer.run(cell_prolongator); @@ -3173,11 +3175,13 @@ MGTwoLevelTransfer>:: if (needs_interpolation) for (int c = n_components - 1; c >= 0; --c) { - CellRestrictor cell_restrictor( - scheme.prolongation_matrix, - scheme.prolongation_matrix_1d, - evaluation_data_fine.begin() + c * n_scalar_dofs_fine, - evaluation_data_coarse.begin() + c * n_scalar_dofs_coarse); + CellRestrictor + cell_restrictor(scheme.prolongation_matrix, + scheme.prolongation_matrix_1d, + evaluation_data_fine.begin() + + c * n_scalar_dofs_fine, + evaluation_data_coarse.begin() + + c * n_scalar_dofs_coarse); if (scheme.prolongation_matrix_1d.size() > 0) cell_transfer.run(cell_restrictor); @@ -3296,11 +3300,13 @@ MGTwoLevelTransfer>:: if (needs_interpolation) for (int c = n_components - 1; c >= 0; --c) { - CellRestrictor cell_restrictor( - scheme.restriction_matrix, - scheme.restriction_matrix_1d, - evaluation_data_fine.begin() + c * n_scalar_dofs_fine, - evaluation_data_coarse.begin() + c * n_scalar_dofs_coarse); + CellRestrictor + cell_restrictor(scheme.restriction_matrix, + scheme.restriction_matrix_1d, + evaluation_data_fine.begin() + + c * n_scalar_dofs_fine, + evaluation_data_coarse.begin() + + c * n_scalar_dofs_coarse); if (scheme.restriction_matrix_1d.size() > 0) cell_transfer.run(cell_restrictor);