From fb2c124c6f83df212458e3371f8a9aebf2dc4c46 Mon Sep 17 00:00:00 2001 From: Karl Ljungkvist Date: Mon, 21 Nov 2016 17:35:29 +0100 Subject: [PATCH] fix incorrect calculation of n_child_dofs_1d --- source/multigrid/mg_transfer_internal.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/multigrid/mg_transfer_internal.cc b/source/multigrid/mg_transfer_internal.cc index 6561d033a0..253292a582 100644 --- a/source/multigrid/mg_transfer_internal.cc +++ b/source/multigrid/mg_transfer_internal.cc @@ -428,7 +428,8 @@ namespace internal points_refined[shift*c+j][0] = c*0.5 + 0.5 * basic_support_points[renumbering[j]][0]; - unsigned int n_child_dofs_1d = points_refined.size(); + const unsigned int n_child_dofs_1d = points_refined.size(); + elem_info.n_child_cell_dofs = elem_info.n_components*Utilities::fixed_power(n_child_dofs_1d); // step 1.4: evaluate the polynomials and store the data in ShapeInfo @@ -483,7 +484,6 @@ namespace internal setup_element_info(elem_info,fe,mg_dof); - unsigned int n_child_dofs_1d = elem_info.shape_info.n_q_points; // -------------- 2. Extract and match dof indices between child and parent const unsigned int n_levels = tria.n_global_levels(); @@ -695,6 +695,8 @@ namespace internal // ---------------------- 3. compute weights to make restriction additive + const unsigned int n_child_dofs_1d = fe.degree + 1 + fe.dofs_per_cell - fe.dofs_per_vertex; + // get the valence of the individual components and compute the weights as // the inverse of the valence weights_on_refined.resize(n_levels-1); -- 2.39.5