]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Implement the component_mapping bugfix according to the implementation in the second...
authorhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 10 Jul 2008 13:05:35 +0000 (13:05 +0000)
committerhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 10 Jul 2008 13:05:35 +0000 (13:05 +0000)
git-svn-id: https://svn.dealii.org/trunk@16444 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/numerics/matrices.cc

index 0a731611eaa09950bf19678bfb3a79e4b9e22c5d..148f4d8cc9767511e26aa3153a80ecd5d84b1e87 100644 (file)
@@ -945,10 +945,6 @@ MatrixCreator::create_boundary_mass_matrix (const Mapping<dim>        &mapping,
 {
   const FiniteElement<dim> &fe = dof.get_fe();
   const unsigned int n_components  = fe.n_components();
-
-  if (component_mapping.size() == 0)
-    for (unsigned int i=0;i<n_components;++i)
-      component_mapping.push_back(i);
   
   Assert (matrix.n() == dof.n_boundary_dofs(boundary_functions),
           ExcInternalError());
@@ -957,7 +953,15 @@ MatrixCreator::create_boundary_mass_matrix (const Mapping<dim>        &mapping,
   Assert (boundary_functions.size() != 0, ExcInternalError());
   Assert (dof_to_boundary_mapping.size() == dof.n_dofs(),
          ExcInternalError());
-  AssertDimension (n_components, component_mapping.size());
+
+  if (component_mapping.size() == 0)
+    {
+      AssertDimension (n_components, boundary_functions.begin()->second->n_components);
+      for (unsigned int i=0;i<n_components;++i)
+       component_mapping.push_back(i);
+    }
+  else
+    AssertDimension (n_components, component_mapping.size());
   
   Assert (coefficient ==0 ||
          coefficient->n_components==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.