From: Martin Kronbichler Date: Tue, 30 Jan 2018 10:18:50 +0000 (+0100) Subject: Fix transfer for high polynomial degrees. X-Git-Tag: v9.0.0-rc1~495^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=161f87af6b6bc4db6228f057b062f4de420061f8;p=dealii.git Fix transfer for high polynomial degrees. --- diff --git a/source/multigrid/mg_transfer_matrix_free.cc b/source/multigrid/mg_transfer_matrix_free.cc index a6e11cc4db..57de8ca64b 100644 --- a/source/multigrid/mg_transfer_matrix_free.cc +++ b/source/multigrid/mg_transfer_matrix_free.cc @@ -274,12 +274,16 @@ namespace template void perform_tensorized_op(const Eval &evaluator, + const unsigned int n_points_in, const unsigned int n_child_cell_dofs, const unsigned int n_components, AlignedVector > &evaluation_data) { if (Eval::n_q_points != numbers::invalid_unsigned_int) AssertDimension(n_components * Eval::n_q_points, n_child_cell_dofs); + if (Eval::dofs_per_cell != numbers::invalid_unsigned_int) + AssertDimension(Eval::dofs_per_cell, n_points_in); + const unsigned int n_points_out = n_child_cell_dofs / n_components; VectorizedArray *t0 = &evaluation_data[0]; VectorizedArray *t1 = &evaluation_data[n_child_cell_dofs]; VectorizedArray *t2 = &evaluation_data[2*n_child_cell_dofs]; @@ -305,13 +309,13 @@ namespace Assert(false, ExcNotImplemented()); if (prolongate) { - t0 += Eval::dofs_per_cell; - t2 += Eval::n_q_points; + t0 += n_points_in; + t2 += n_points_out; } else { - t0 += Eval::n_q_points; - t2 += Eval::dofs_per_cell; + t0 += n_points_out; + t2 += n_points_in; } } } @@ -402,6 +406,7 @@ void MGTransferMatrixFree fe_degree, 2*fe_degree+1); perform_tensorized_op(evaluator, + Utilities::fixed_power(fe_degree+1), n_child_cell_dofs, n_components, evaluation_data); @@ -418,6 +423,7 @@ void MGTransferMatrixFree fe_degree, 2*(fe_degree+1)); perform_tensorized_op(evaluator, + Utilities::fixed_power(fe_degree+1), n_child_cell_dofs, n_components, evaluation_data); @@ -483,6 +489,7 @@ void MGTransferMatrixFree n_components, fe_degree, &evaluation_data[0]); perform_tensorized_op(evaluator, + Utilities::fixed_power(fe_degree+1), n_child_cell_dofs, n_components, evaluation_data); @@ -496,6 +503,7 @@ void MGTransferMatrixFree fe_degree, 2*(fe_degree+1)); perform_tensorized_op(evaluator, + Utilities::fixed_power(fe_degree+1), n_child_cell_dofs, n_components, evaluation_data);