]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix incorrect calculation of n_child_dofs_1d
authorKarl Ljungkvist <k.ljungkvist@gmail.com>
Mon, 21 Nov 2016 16:35:29 +0000 (17:35 +0100)
committerKarl Ljungkvist <k.ljungkvist@gmail.com>
Tue, 22 Nov 2016 08:01:20 +0000 (09:01 +0100)
source/multigrid/mg_transfer_internal.cc

index 6561d033a06e9f71bb98e801925e5d8592792856..253292a58267faca2104e247346e59f13c68c15a 100644 (file)
@@ -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<dim>(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);

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.