From: kanschat Date: Mon, 16 Jun 2008 23:58:23 +0000 (+0000) Subject: fix a bug in poly tensor X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f915526efeccdd42502a70c0d31be35b8b0f0ee4;p=dealii-svn.git fix a bug in poly tensor git-svn-id: https://svn.dealii.org/trunk@16377 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/fe/fe.h b/deal.II/deal.II/include/fe/fe.h index 33312cd6b3..328f89fe10 100644 --- a/deal.II/deal.II/include/fe/fe.h +++ b/deal.II/deal.II/include/fe/fe.h @@ -24,6 +24,7 @@ template class FEValues; template class FEFaceValues; template class FESubfaceValues; template class FESystem; +template class FE_PolyTensor; namespace hp { template class FECollection; @@ -2473,6 +2474,7 @@ class FiniteElement : public Subscriptor, friend class FEFaceValues; friend class FESubfaceValues; template friend class FESystem; + template friend class FE_PolyTensor; friend class hp::FECollection; }; diff --git a/deal.II/deal.II/include/numerics/vectors.templates.h b/deal.II/deal.II/include/numerics/vectors.templates.h index d330023d8b..b299959806 100644 --- a/deal.II/deal.II/include/numerics/vectors.templates.h +++ b/deal.II/deal.II/include/numerics/vectors.templates.h @@ -1710,7 +1710,7 @@ VectorTools::project_boundary_values (const Mapping &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) diff --git a/deal.II/deal.II/source/fe/fe_poly_tensor.cc b/deal.II/deal.II/source/fe/fe_poly_tensor.cc index f3a77aebf6..5c1c895bf9 100644 --- a/deal.II/deal.II/source/fe/fe_poly_tensor.cc +++ b/deal.II/deal.II/source/fe/fe_poly_tensor.cc @@ -119,6 +119,15 @@ FE_PolyTensor::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;compn_components() ;++comp) + this->component_to_base_table[comp].first.second = comp; } diff --git a/deal.II/deal.II/source/numerics/matrices.cc b/deal.II/deal.II/source/numerics/matrices.cc index 185f813235..d436889303 100644 --- a/deal.II/deal.II/source/numerics/matrices.cc +++ b/deal.II/deal.II/source/numerics/matrices.cc @@ -953,15 +953,7 @@ MatrixCreator::create_boundary_mass_matrix (const Mapping &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;in_components==1 ||