From a2bdb36abca7dc14e41edec3e64c306a03a77886 Mon Sep 17 00:00:00 2001 From: bangerth Date: Mon, 6 May 2013 22:18:42 +0000 Subject: [PATCH] Instantiate FETools::interpolate for general vector types. git-svn-id: https://svn.dealii.org/trunk@29468 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/doc/news/changes.h | 6 +++ deal.II/include/deal.II/fe/fe_tools.h | 6 +-- deal.II/source/fe/fe_tools.inst.in | 66 ++++++++------------------- 3 files changed, 29 insertions(+), 49 deletions(-) diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index 572d9d1cb9..6c1458c3df 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -117,6 +117,12 @@ this function.
    +
  1. Changed: FETools::interpolate is now instantiated for all +vector types, not just dealii::Vector and dealii::BlockVector. +
    +(Wolfgang Bangerth, 2013/05/06) +
  2. +
  3. Fixed: Generate an error if the users tries to refine a cell that is already on the maximum level in a distributed triangulation.
    diff --git a/deal.II/include/deal.II/fe/fe_tools.h b/deal.II/include/deal.II/fe/fe_tools.h index 926eaa6e50..38ac6ecf1b 100644 --- a/deal.II/include/deal.II/fe/fe_tools.h +++ b/deal.II/include/deal.II/fe/fe_tools.h @@ -546,7 +546,7 @@ namespace FETools * course Q1 on each cell. * * For this case (continuous elements on grids with hanging nodes), please - * use the @p interpolate function with an additional @p ConstraintMatrix + * use the @p interpolate() function with an additional ConstraintMatrix * argument, see below, or make the field conforming yourself by calling the * @p distribute function of your hanging node constraints object. */ @@ -573,8 +573,8 @@ namespace FETools * interpolation. The same is true if @p fe1 is a continuous and @p fe2 is a * discontinuous finite element. For the case that @p fe1 is a discontinuous * and @p fe2 is a continuous finite element there is no point interpolation - * defined at the discontinuities. Therefore the meanvalue is taken at the - * DoF values on the discontinuities. + * defined at the discontinuities. Therefore the mean value is taken at the + * DoF values at the discontinuities. */ template class DH1, diff --git a/deal.II/source/fe/fe_tools.inst.in b/deal.II/source/fe/fe_tools.inst.in index ab7eafa183..22ee6025b0 100644 --- a/deal.II/source/fe/fe_tools.inst.in +++ b/deal.II/source/fe/fe_tools.inst.in @@ -12,6 +12,25 @@ //--------------------------------------------------------------------------- +for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS; Vector : SERIAL_VECTORS) + { + namespace FETools + \{ +#if deal_II_dimension <= deal_II_space_dimension + template + void interpolate + (const DoFHandler &, const Vector &, + const DoFHandler &, Vector &); + + template + void interpolate + (const DoFHandler &, const Vector &, + const DoFHandler &, const ConstraintMatrix &, + Vector &); +#endif + \} + } + for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) { namespace FETools @@ -30,52 +49,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS template void compute_embedding_matrices (const FiniteElement &, - std::vector > >&,bool); - - template - void interpolate - (const DoFHandler &, const Vector &, - const DoFHandler &, Vector &); - - template - void interpolate - (const DoFHandler &, const Vector &, - const DoFHandler &, const ConstraintMatrix &, - Vector &); - - template - void interpolate - (const DoFHandler &, const Vector &, - const DoFHandler &, Vector &); - template - - void interpolate - (const DoFHandler &, const Vector &, - const DoFHandler &, const ConstraintMatrix &, - Vector &); - - - template - void interpolate - (const DoFHandler &, const BlockVector &, - const DoFHandler &, BlockVector &); - - template - void interpolate - (const DoFHandler &, const BlockVector &, - const DoFHandler &, const ConstraintMatrix &, - BlockVector &); - - template - void interpolate - (const DoFHandler &, const BlockVector &, - const DoFHandler &, BlockVector &); - - template - void interpolate - (const DoFHandler &, const BlockVector &, - const DoFHandler &, const ConstraintMatrix &, - BlockVector &); + std::vector > >&,bool); #endif \} } -- 2.39.5