]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix a real error: The copy constructor of MappingQ did not copy
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 21 Aug 2011 00:22:17 +0000 (00:22 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 21 Aug 2011 00:22:17 +0000 (00:22 +0000)
n_outer but rather initialized it with garbage.

git-svn-id: https://svn.dealii.org/trunk@24133 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/fe/mapping_q.cc

index 526bd86f83c0ed9d9f6f6a928ecae6850390ba04..874491dd0aa30487cc76160f66f4d3ecb8245630 100644 (file)
@@ -115,8 +115,9 @@ MappingQ<dim,spacedim>::MappingQ (const unsigned int p,
                degree(p),
                n_inner(Utilities::fixed_power<dim>(degree-1)),
                n_outer((dim==1) ? 2 :
-                       (dim==2) ? 4+4*(degree-1)
-                       :8+12*(degree-1)+6*(degree-1)*(degree-1)),
+                       ((dim==2) ?
+                        4+4*(degree-1) :
+                        8+12*(degree-1)+6*(degree-1)*(degree-1))),
                tensor_pols(0),
                n_shape_functions(Utilities::fixed_power<dim>(degree+1)),
                renumber(FETools::
@@ -157,7 +158,7 @@ MappingQ<dim,spacedim>::MappingQ (const MappingQ<dim,spacedim> &mapping)
                MappingQ1<dim,spacedim>(),
                degree(mapping.degree),
                n_inner(mapping.n_inner),
-               n_outer(n_outer),
+               n_outer(mapping.n_outer),
                tensor_pols(0),
                n_shape_functions(mapping.n_shape_functions),
                renumber(mapping.renumber),
@@ -1360,8 +1361,8 @@ transform_unit_to_real_cell (const typename Triangulation<dim,spacedim>::cell_it
   if(p_data->shape_values.size()<p_data->mapping_support_points.size())
     p_data->mapping_support_points.resize
       (GeometryInfo<dim>::vertices_per_cell);
-  
-  
+
+
   return this->transform_unit_to_real_cell_internal(*p_data);
 }
 
@@ -1400,7 +1401,7 @@ transform_real_to_unit_cell (const typename Triangulation<dim,spacedim>::cell_it
                                       // points on the vertices.
       if(mdata->shape_values.size()<points.size())
        points.resize(GeometryInfo<dim>::vertices_per_cell);
-      
+
 
       this->transform_real_to_unit_cell_internal(cell, p, *mdata, p_unit);
     }

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.