]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
fix a bug in poly tensor
authorkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 16 Jun 2008 23:58:23 +0000 (23:58 +0000)
committerkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 16 Jun 2008 23:58:23 +0000 (23:58 +0000)
git-svn-id: https://svn.dealii.org/trunk@16377 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/fe/fe.h
deal.II/deal.II/include/numerics/vectors.templates.h
deal.II/deal.II/source/fe/fe_poly_tensor.cc
deal.II/deal.II/source/numerics/matrices.cc

index 33312cd6b39789f128e09ea7e88fde31b8ca68ac..328f89fe10514a3d5cd31392733e1784a8bcaa0a 100644 (file)
@@ -24,6 +24,7 @@ template <int dim> class FEValues;
 template <int dim> class FEFaceValues;
 template <int dim> class FESubfaceValues;
 template <int dim> class FESystem;
+template <class POLY, int dim> class FE_PolyTensor;
 namespace hp
 {
   template <int dim> class FECollection;
@@ -2473,6 +2474,7 @@ class FiniteElement : public Subscriptor,
     friend class FEFaceValues<dim>;
     friend class FESubfaceValues<dim>;
     template <int dim_> friend class FESystem;
+    template <class POLY, int dim_> friend class FE_PolyTensor;
     friend class hp::FECollection<dim>;
 };
 
index d330023d8b099a3c47471aa1c85b3589c75d00cf..b2999598060ce99d40ec916793ef4c0648281cd8 100644 (file)
@@ -1710,7 +1710,7 @@ VectorTools::project_boundary_values (const Mapping<dim>       &mapping,
   
   DoFTools::map_dof_to_boundary_indices (dof, selected_boundary_components,
                                         dof_to_boundary_mapping);
-
+  
                                   // Done if no degrees of freedom on
                                   // the boundary
   if (dof.n_boundary_dofs (boundary_functions) == 0)
index f3a77aebf6f1bab3bcbc4950e43c967be7298343..5c1c895bf9f0ca0083205066a9b30103fd0cc8e4 100644 (file)
@@ -119,6 +119,15 @@ FE_PolyTensor<POLY,dim>::FE_PolyTensor (const unsigned int degree,
                 poly_space(POLY(degree))
 {
   cached_point(0) = -1;
+                                  // Set up the table converting
+                                  // components to base
+                                  // components. Since we have only
+                                  // one base element, everything
+                                  // remains zero except the
+                                  // component in the base, which is
+                                  // the component itself
+  for (unsigned int comp=0;comp<this->n_components() ;++comp)
+    this->component_to_base_table[comp].first.second = comp;
 }
 
 
index 185f813235d45f80f0d71215ae60c32995bd1428..d436889303d6932230ed91f3ce89b8c93465a663 100644 (file)
@@ -953,15 +953,7 @@ 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());
-  
-  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());
+  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.