From 7852e91f2daf97597c33f20fad0a40ab64d357b2 Mon Sep 17 00:00:00 2001 From: bangerth Date: Wed, 27 Nov 2013 15:17:29 +0000 Subject: [PATCH] Work around the Intel ICC bug that leads to forgotten template instantiations. git-svn-id: https://svn.dealii.org/trunk@31811 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/doc/news/changes.h | 13 ++++++++ .../include/deal.II/numerics/vector_tools.h | 10 +++--- .../deal.II/numerics/vector_tools.templates.h | 32 +++++++++---------- .../numerics/vector_tools_interpolate.inst.in | 2 +- 4 files changed, 34 insertions(+), 23 deletions(-) diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index 89ec0b712c..26b054bb08 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -40,6 +40,19 @@ inconvenience this causes.

    +
  1. + Changed: The kinds of template arguments for the VectorTools::interpolate + function taking a Mapping as first argument has changed. This was done to + work around a bug in the Intel ICC compiler which led to linker errors. Since + the actual function argument list remains unchanged, the only way you will + notice this change is if you explicitly specify template arguments. + The only place one would typically do that is if you take the address of + a template function. Since this is not a common operation, the impact of this + change is probably limited. +
    + (Wolfgang Bangerth, 2013/11/27) +
  2. +
  3. Changed: The ghost handling of the parallel::distributed::Vector class has been reworked: The vector now carries a global state that stores whether diff --git a/deal.II/include/deal.II/numerics/vector_tools.h b/deal.II/include/deal.II/numerics/vector_tools.h index daf77a045d..28c5fa3f10 100644 --- a/deal.II/include/deal.II/numerics/vector_tools.h +++ b/deal.II/include/deal.II/numerics/vector_tools.h @@ -451,11 +451,11 @@ namespace VectorTools * replaced by a hp::MappingCollection in * case of a hp::DoFHandler. */ - template - void interpolate (const Mapping &mapping, - const DH &dof, - const Function &function, - VECTOR &vec); + template class DH> + void interpolate (const Mapping &mapping, + const DH &dof, + const Function &function, + VECTOR &vec); /** * Calls the @p interpolate() diff --git a/deal.II/include/deal.II/numerics/vector_tools.templates.h b/deal.II/include/deal.II/numerics/vector_tools.templates.h index a3748c86b8..77cc717739 100644 --- a/deal.II/include/deal.II/numerics/vector_tools.templates.h +++ b/deal.II/include/deal.II/numerics/vector_tools.templates.h @@ -74,24 +74,22 @@ DEAL_II_NAMESPACE_OPEN namespace VectorTools { - template - void interpolate (const Mapping &mapping, - const DH &dof, - const Function &function, - VECTOR &vec) + template class DH> + void interpolate (const Mapping &mapping, + const DH &dof, + const Function &function, + VECTOR &vec) { - const unsigned int dim=DH::dimension; - Assert (dof.get_fe().n_components() == function.n_components, ExcDimensionMismatch(dof.get_fe().n_components(), function.n_components)); - const hp::FECollection fe (dof.get_fe()); + const hp::FECollection fe (dof.get_fe()); const unsigned int n_components = fe.n_components(); const bool fe_is_system = (n_components != 1); - typename DH::active_cell_iterator cell = dof.begin_active(), - endc = dof.end(); + typename DH::active_cell_iterator cell = dof.begin_active(), + endc = dof.end(); // For FESystems many of the // unit_support_points will appear @@ -180,7 +178,7 @@ namespace VectorTools const unsigned int max_rep_points = *std::max_element (n_rep_points.begin(), n_rep_points.end()); std::vector dofs_on_cell (fe.max_dofs_per_cell()); - std::vector > rep_points (max_rep_points); + std::vector > rep_points (max_rep_points); // get space for the values of the // function at the rep support points. @@ -199,9 +197,9 @@ namespace VectorTools // Transformed support points are computed by // FEValues - hp::MappingCollection mapping_collection (mapping); + hp::MappingCollection mapping_collection (mapping); - hp::FEValues fe_values (mapping_collection, + hp::FEValues fe_values (mapping_collection, fe, support_quadrature, update_quadrature_points); for (; cell!=endc; ++cell) @@ -213,7 +211,7 @@ namespace VectorTools // get location of finite element // support_points fe_values.reinit(cell); - const std::vector > &support_points = + const std::vector > &support_points = fe_values.get_present_fe_values().get_quadrature_points(); // pick out the representative @@ -5218,11 +5216,11 @@ namespace VectorTools case H1_norm: exponent = 2.; break; - + case L1_norm: exponent = 1.; break; - + default: break; } @@ -5247,7 +5245,7 @@ namespace VectorTools if (spacedim == dim+1) update_flags |= UpdateFlags (update_normal_vectors); // no break! - + default: update_flags |= UpdateFlags (update_values); break; diff --git a/deal.II/source/numerics/vector_tools_interpolate.inst.in b/deal.II/source/numerics/vector_tools_interpolate.inst.in index e44dd85c4e..bbc0d6b237 100644 --- a/deal.II/source/numerics/vector_tools_interpolate.inst.in +++ b/deal.II/source/numerics/vector_tools_interpolate.inst.in @@ -22,7 +22,7 @@ for (VEC : SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_dimens template void interpolate - (const Mapping::dimension,DoFHandler::space_dimension>&, + (const Mapping &, const DoFHandler&, const Function&, VEC&); -- 2.39.5