From: kronbichler Date: Thu, 18 Nov 2010 10:16:27 +0000 (+0000) Subject: Fix linker problem with Intel compiler: need to explicitly state 1D functions that... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6121bda39bf338735dd1829f21cd8f99c6d5bd1c;p=dealii-svn.git Fix linker problem with Intel compiler: need to explicitly state 1D functions that otherwise might contain uncompiled code like create_boundary_mass_matrix or FEFaceValues. git-svn-id: https://svn.dealii.org/trunk@22802 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/numerics/vectors.templates.h b/deal.II/include/deal.II/numerics/vectors.templates.h index d6eb80d65f..f1340a2929 100644 --- a/deal.II/include/deal.II/numerics/vectors.templates.h +++ b/deal.II/include/deal.II/numerics/vectors.templates.h @@ -894,6 +894,36 @@ void VectorTools::create_point_source_vector (const hp::DoFHandler +// separate implementation for 1D because otherwise we get linker errors since +// FEFaceValues<1> is not compiled +template <> +void +VectorTools::create_boundary_right_hand_side (const Mapping<1,1> &, + const DoFHandler<1,1> &, + const Quadrature<0> &, + const Function<1> &, + Vector &, + const std::set &) +{ + Assert (false, ExcImpossibleInDim(1)); +} + + + +template <> +void +VectorTools::create_boundary_right_hand_side (const Mapping<1,2> &, + const DoFHandler<1,2> &, + const Quadrature<0> &, + const Function<2> &, + Vector &, + const std::set &) +{ + Assert (false, ExcImpossibleInDim(1)); +} + + + template void VectorTools::create_boundary_right_hand_side (const Mapping &mapping, @@ -903,12 +933,6 @@ VectorTools::create_boundary_right_hand_side (const Mapping Vector &rhs_vector, const std::set &boundary_indicators) { - if (dim == 1) - { - Assert (false, ExcImpossibleInDim(dim)); - return; - } - const FiniteElement &fe = dof_handler.get_fe(); Assert (fe.n_components() == rhs_function.n_components, ExcDimensionMismatch(fe.n_components(), rhs_function.n_components)); @@ -1039,6 +1063,8 @@ VectorTools::create_boundary_right_hand_side (const DoFHandler & +// separate implementation for 1D because otherwise we get linker errors since +// hp::FEFaceValues<1> is not compiled template <> void VectorTools::create_boundary_right_hand_side (const hp::MappingCollection<1,1> &, @@ -1069,11 +1095,11 @@ VectorTools::create_boundary_right_hand_side (const hp::MappingCollection<1,2> template void -VectorTools::create_boundary_right_hand_side (const hp::MappingCollection &mapping, - const hp::DoFHandler &dof_handler, - const hp::QCollection &quadrature, - const Function &rhs_function, - Vector &rhs_vector, +VectorTools::create_boundary_right_hand_side (const hp::MappingCollection &mapping, + const hp::DoFHandler &dof_handler, + const hp::QCollection &quadrature, + const Function &rhs_function, + Vector &rhs_vector, const std::set &boundary_indicators) { const hp::FECollection &fe = dof_handler.get_fe(); @@ -1201,10 +1227,10 @@ VectorTools::create_boundary_right_hand_side (const hp::MappingCollection void -VectorTools::create_boundary_right_hand_side (const hp::DoFHandler &dof_handler, - const hp::QCollection &quadrature, - const Function &rhs_function, - Vector &rhs_vector, +VectorTools::create_boundary_right_hand_side (const hp::DoFHandler &dof_handler, + const hp::QCollection &quadrature, + const Function &rhs_function, + Vector &rhs_vector, const std::set &boundary_indicators) { Assert (DEAL_II_COMPAT_MAPPING, ExcCompatibility("mapping")); @@ -1829,25 +1855,54 @@ VectorTools::interpolate_boundary_values // -------- implementation for project_boundary_values with std::map -------- -template +// separate implementations for 1D because otherwise we get linking errors +// because create_boundary_mass_matrix is not compiled for 1D +template <> void -VectorTools::project_boundary_values (const Mapping &mapping, - const DoFHandler &dof, - const typename FunctionMap::type &boundary_functions, - const Quadrature &q, +VectorTools::project_boundary_values (const Mapping<1,1> &mapping, + const DoFHandler<1,1> &dof, + const FunctionMap<1>::type &boundary_functions, + const Quadrature<0> &, std::map &boundary_values, - std::vector component_mapping) + std::vector component_mapping) { - if (dim == 1) - { - Assert (component_mapping.size() == 0, ExcNotImplemented()); + Assert (component_mapping.size() == 0, ExcNotImplemented()); // projection in 1d is equivalent // to interpolation - interpolate_boundary_values (mapping, dof, boundary_functions, - boundary_values, std::vector()); - return; - } + interpolate_boundary_values (mapping, dof, boundary_functions, + boundary_values, std::vector()); +} + + +template <> +void +VectorTools::project_boundary_values (const Mapping<1,2> &mapping, + const DoFHandler<1,2> &dof, + const FunctionMap<2>::type &boundary_functions, + const Quadrature<0> &, + std::map &boundary_values, + std::vector component_mapping) +{ + Assert (component_mapping.size() == 0, ExcNotImplemented()); + // projection in 1d is equivalent + // to interpolation + interpolate_boundary_values (mapping, dof, boundary_functions, + boundary_values, std::vector()); +} + + + + +template +void +VectorTools::project_boundary_values (const Mapping &mapping, + const DoFHandler&dof, + const typename FunctionMap::type &boundary_functions, + const Quadrature &q, + std::map &boundary_values, + std::vector component_mapping) +{ //TODO:[?] In VectorTools::project_boundary_values, no condensation of sparsity // structures, matrices and right hand sides or distribution of // solution vectors is performed. This is ok for dim<3 because then